#GWGaaronpk: How do you want to store your weather data? I see your notation about adding it to compass as an open issue
snarfed, dougbeal|imac, [tantek], [kenbauer], tw2113, jjuran, danyao, ingoogni, cweiske, [Rose], [xavierroy] and KartikPrabhu joined the channel; mblaney1 left the channel
#aaronpkGWG: in my posts it's stored as another property along with everything else. I also have a separate Compass database that stores the weather info every five minutes or so, I think it stores the JSON that Atlas returns
#GWGI was able to hook in the US National Weather Service
#GWGWant to find something that might not have rate limits or insane costs for Europe
[Rose] joined the channel
#[Rose]I find Dark Sky to be pretty accurate for me
#[Rose]The Austrian government has a whole website of free APIs you can use, but it seems weather doesn't make an appearance except as a historical "statistical book"
#[Rose]Though that does take you over the 1000/month Dark Sky allows, but every hour is still quite accurate, and if you make a larger call you could use it to backfill other data
#[grantcodes]!tell doubleloop You are exactly right about if I build granary integration into together then it is only in together. An ideal way would probably be to have an external client that could work on it's own. But perhaps with a simple rest api or something that other clients can integrate to make life easier for their users?
#[Rose]Aha, figured out the API for ZAMG, you get a CSV file and the contents change every hour. Why they don't use JSON like everyone else I have no idea, but it's a start!
#ZegnatThis sounds like we need an etherpad or wiki page or something to collect all APIs
#ZegnatSure. We probably have a weather page you can add to. Or add -developer to the wiki page name and start a new page just for development purposes (like /Webmention has)
[jgmac1106] and [kimberlyhirsh] joined the channel
#[jgmac1106]adafruit micrpub weather rock...not publishing weather on my blog until i build that
[kenbauer], ingoogni and [eddie] joined the channel
#[eddie]Hmm, man. I'm trying to figure out how to get a free standing serverless Media Endpoint and it is not going well.
#[eddie]It seems like all the "serverless" providers max out at 10mb per payload (which in practice ends up about 5mb of actual file size). which is not very big for a media endpoint
#[eddie]The other option was to try to upload directly to say Amazon s3, so I thought my Micropub endpoint could create presigned s3 upload urls whenever apps do the config query
#[eddie]and apps don't really expect the media endpoint urls to expire
#ZegnatOh, interesting issue. Wonder what the answer is to: what if the media enpoint URL changes?
#[eddie]I think the current expectation is that people log out and back in
#ZegnatI mean, there is a reason why it is defined seperately from the micropub endpoint. Specifically because you may want to use separate storage and so on
#ZegnatSo it makes sense for clients to catch that somehow
#[eddie]and like Quill has a "reset" button I believe to requery the config
#[Rose]I dislike having to log out and in again - I would prefer to be able to click a button (hidden within settings) to look for the changes
#[Rose]Or perhaps clients should automatically check to see if all is well from time to time, which if the timeout could be set in q config might alleviate Eddie's issue
#[eddie]ohhh the reset login on Quill still logs you out
#[Rose]If updated since the client last checked, check again, but then the clients need to decide how often to check for updates to the config
#[Rose]Which leads us back to the timeout type option
#[eddie]maybe like you said, that's the option. The Micropub config query tells the client how long the current config options are valid for
#[eddie]when it's "expired", the client should refetch the config details
#ZegnatThey have the same issue with access tokens that time-out, btw
#[Rose]And perhaps there should be a "standard" value for if it's not set?
#[eddie]That's true, and we don't currently have a solution for that outside of OAuth's refresh tokens. But we haven't even thought about how those should work
#ZegnatYou could write an entire post, hit submit, only for the client to find your token has expired. I wonder how that is handled today. It would suck for you to be suddenly logged out and for the post to be lost
#[eddie]I think in most cases that's exactly what would happen
#ZegnatThe solution is to ask the user to reauth, when you lack refresh tokens. The important part is just how you handle the request to reauth
#ZegnatNow I want to make a micropub endpoint specifically for testing this.
#[eddie]I guess in Indigenous for iOS it would present an error which would allow you to save your post as a draft
#[Rose]What happens if you write a post, hit submit, and then the endpoint is invalid?
#[eddie]although then to get a new token you log out and back in and I'm not sure what happens to the draft when logging out
#[eddie]especially if I end up updating drafts to be support by the server because then you can't save a draft without a server
#ZegnatEh, that sounds like a bad feature. I often write draft emails on the train, where I would not have access to a server either because of lack of connectivity
#[eddie]That's true, I guess drafts should just be "synced" to the server
#[eddie]so you can have offline drafts but then when there is a connection, if enabled, it would sync the draft content into posts on the server
#[Rose]And for something like Quill, if it finds the endpoints are invalid I would hope we could extend it to give the user a .txt file download they can save
#[Rose]Maybe not the most elegant of solutions, but it means they can easily copy/paste the data back in after re-auth if the draft can't be maintained any other way
#ZegnatNot sure how it would check the endpoint... I guess it does an info query request and if that fails assumes the entire mp endpoint to be down?
#[eddie]Yeah, I would assume the config query will always represent the status of the Micropub endpoint
#Zegnatso you’d have to do the config query with the access token included, so it can tell you whether it will accept that token, I guess?
#ZegnatAs it seems unwise to me to do a whole token endpoint discovery system for verifying that
#[eddie]right now all config queries require the access token
#[eddie]because it can contain private information
#ZegnatAh, gotcha, I wasn’t sure it always required that
#[eddie]ohhh yeah I guess I'm not sure if it has "always" required that but it has in recent history
snarfed joined the channel
#ZegnatI think my micropub receiver doesn’t even support config query at all, that is how old of an implementation it is
#[eddie]for OAuth 2.0, when providing an access_token that expires, it will return an "expires_in":3600 attribute. So if we started paying more attention to that in Micropub clients, we could also add that same thing to the Config query
#ZegnatThat would be a good indicator of an auto-expiring token, yes
#[eddie]The other thing is if a token is revoked or auto-expired, it's not 100% clear but I think it looks like it should return a 401
#ZegnatOf course wouldn’t cover tokens that are revoked in some other way. So you will probably have to implement some generic check anyway
#ZegnatOh, good question, my first thought was 403, because you are sending along authentication, it just isn’t valid for the action you want to do
#[eddie]I know Nintendo Switch is using something like Open ID so it's not pure OAuth 2.0, but it's similar and I know they were sending back 401's when my tokens were expired
#ZegnatDouble checked with OAuth, 401 is correct for “expired, revoked, malformed, or invalid”
#ZegnatAt least as far as OAuth 2.0 errors are concerned. But I see no reason why we wouldn’t just mirror that in the micropub endpoint.
#[eddie]ahh gotcha. okay, so if a client receives a 401, we should walk through the authentication flow again but without actually logging out the user
#ZegnatThat is my gut feeling. As in: you should try and obtain a new token. If that fails, that is when you log them out.
#ZegnatAnd of course “log them out” may just mean you disable the post button and remove the token from storage. The client doesn’t need to throw up a boot screen and lock away drafts
#Loqi[eddie] has 38 karma in this channel over the last year (94 in all channels)
snarfed joined the channel
#aaronpkLooks like you all talked through that :-)
#aaronpkI think more smarts in the clients about saving offline stuff is good
#aaronpknever assume the user has an internet connection, and also don't assume that just because a token expired that it means you should completely reset the app state
#[eddie]Yeah I think one challenge is because most stuff started out to be Micropub web apps without much state it didn't matter if you logged out and back in
#[eddie]but now Micropub apps are getting more complex, being introduced as native apps and being integrated into Reader experiences
#[eddie]so I think that's a big thing that starts making us rethink what used to not really be as big of an issue 🙂
#[eddie]because when you're building a web app you kind of assume the person has internet lol
ingoogni joined the channel
#aaronpkI'm just excited I can write offline apps without having to deal with the native development platforms now :-) no offense to native app development, it's just overkill in some cases
#[eddie]No that's definitely huge. iOS was really getting behind on offline web stuff in safari, like sadly so
#[eddie]There's something nice about being able to just load up a website. I just find a lot of "web app" experiences provide the functionality but they feel clunky. That is the main thing that pushes me to native apps
#[eddie]So one thing I thought was having the media endpoint url be a serverless url
#aaronpkI have two that I use regularly now, Teacup and Airplane Time. They're not perfect by any means, but they are pretty simple and would be overkill as native apps, and also I probably wouldn't have been able to make a very good native app experience anyway
#aaronpkMaking good apps is hard, whether it's native or web ;-)
#[schmarty]aaronpk: i am starting to like using shortcuts for micropub and inching closer to a good reusable do-all-the-micropubs shortcut
#[eddie]from what I've been reading (i haven't tested it yet) if I write a function in serverless that redirects to another url, but then I sent an upload of 10mb to it, it would get a 500 error because of the size rather than the 302 redirect
#aaronpkthatd be awesome. I got out of the habit of using it when they broke images in shortcuts so I'm having to train myself to use it again
#[schmarty]eddie: yeah, HTTP POST and redirects don't really do what you might hope anyway.
#LoqiIt looks like we don't have a page for "serverless" yet. Would you like to create it? (Or just say "serverless is ____", a sentence describing the term)
#[eddie]they expect you to upload directly to their object storage
#[schmarty]because it is ridiculous to expect all clients to handle this odd case
#[eddie]I think in serverless they expect that you probably own the app
#[eddie]so if I were building Instaawesomegram, it would be super easy to push all uploads directly to s3
#[schmarty]aaronpk: last week i got a shortcut working that lets me make a read post out of any goodreads.com book link from safari by sharing it to the shortcut. iti s raddd.
#[eddie]the challenge is that in the IndieWeb we actually believe in decentralizing 😆
#[eddie]it's tough, this might mean I just can't use serverless in this way but with my outage on DreamHost's compute platform makes me want to get as much off of my single box as possible
#[schmarty]the image was just fine but cloudinary was like "no way"
#[schmarty]took me a minute to think of trying to read the headers returned in the proxied request, but they spelled out the error.
#[eddie]oh that's nice though, rather than some abstract error lol
#[schmarty]haha yep. i was able to crop the image, send it to my media endpoint via shortcuts, and edit the post to use the new image (had to do that part by hand...)
#[schmarty]i really appreciate your research on trying to get a media endpoint going on AWS lambda. i wonder if that should get captured somewhere.
#[eddie][schmarty] I added my investigation into Lambda and S3 media endpoint usage to the wiki. Feel free to comment on if there seems to be any missing info
#sknebel[eddie]: if you're in AWS land, can't you make a fixed url through the loadbalancer layer (whatever that's called in that case, api gateway?) that sends traffic to the changing s3 url?
jonnybarnes joined the channel
#[eddie]hmm interesting. There is the Gateway API which has the same payload limit
#[eddie]there is also the Elastic Load Balancing but I think that's just for EC2 instances
#KartikPrabhunote the preferences stuff does not allow you to add exceptions only remove them
#aaronpk[eddie]: yeah most of the AWS stuff does not expect you to be using it standalone. They kind of expect you to use all their products together, like adding a load balancer in front of ec2 servers
#LoqiIt looks like we don't have a page for "Airplane Time" yet. Would you like to create it? (Or just say "Airplane Time is ____", a sentence describing the term)
[jgmac1106], [kenbauer] and [Rose] joined the channel
#[Rose][schmarty] I'm doing a lot of stuff with Shortcuts too, working on several mini micropub ones
#[Rose]I'm working on being able to use things offline, and then posting the offline ones when I get internet again
#LoqiIt looks like we don't have a page for "offline first" yet. Would you like to create it? (Or just say "offline first is ____", a sentence describing the term)
jonnybarnes, snarfed and [eddie] joined the channel
#[eddie]I have a new Media Endpoint on Lambda road to research. Apparently Lambda@Edge (aka a lambda function running on amazon's CDN) can catch error statuses and do things like return a redirect
#[eddie]so I haven't looked into it quite enough yet, but I'm wondering if I can set up a url that is my "media endpoint" and then if I catch the 50-something error when the payload is too big and in that case return a redirect to my presigned s3 url
#[tantek]offline first is a method of developing a website that once a user has visited it once on their device, it will always provide at least some content ([[posts]]) and or features (like [[creating]] posts) when they revisit even without internet access, using technologies like Service Workers and Local Storage.
#LoqiIt looks like we don't have a page for "offline first" yet. Would you like to create it? (Or just say "offline first is ____", a sentence describing the term)
#[tantek]offline first is a method of developing a website that once a user has visited it once on their device, it will always provide at least some content ([[posts]]) and or features (like [[creating]] posts) when they revisit even without internet access, using technologies like Service Workers and Local Storage.
#calumryanThe closest we have is possibly https://indieweb.org/Progressive_Web_App but not Offline first, likewise no page for Mobile first? They’re quite broad terms for methodology as well as technologies to cover