Behind the Scenes: How does Streamified Update?
Updating your streams is one of the most deceptively complex, yet also the most common task that Streamified performs. It look a little different depending on what client you’re using (such as iOS app vs. our web app), but the basic steps are always the same. It’s Zane here to take you through these steps; hopefully by the end, you’ll better understand what’s going on underneath the hood.
1. Streamified Polls the Server
When this is happening, you’ll see some sort of loading indicator. In the iOS app, it appears in the title bar (next to the system clock). In the Android and web app, it appears in the brown header bar.
“Polling” means that the Streamified client is reaching out to our servers (at api.streamified.me) on a regular interval. This is in contrast to a different method (known as “push,” where the server tells the client about updates as-needed). We chose polling because of some technical reasons which actually made it (surprisingly) more suited for Streamified.
Your client sends a number of pieces of data to identify itself and authenticate you, and the whole request is protected by OAuth (a popular scheme for protecting user accounts, also employed by Facebook, Twitter, etc.) At this point the server does a lot of voodoo magic, deciding how often your streams should be updated (for example, free users can only receive updates every 5 minutes), and sends the data back to your client based upon the contents of your Streamified account.
This step can take anywhere from a second to around 30 seconds, depending on how many accounts you have connected. If another social network (eg, Twitter) or subscription (like a blog you subscribe to) is down or offline, it can delay this step even further.
2. The Streamified Client Pre-Processes the Data
During this step, the iOS app no longer shows a loading “spinner,” but rather, you can see the “loading streams” text if you pull-down on your streams (as if you were doing a “pull to refresh”). The Web and Android apps still show the normal spinner.
Now your client, with all the new posts, needs to do some calculations. We try to download much of the media (images, etc.) during this step, making as much of the post immediately available as possible. Mostly, Streamified is examining the new posts and figuring out where they fit in to your existing streams.
3. Streamified Displays New Posts
Finally, the posts become available for you to look at. Depending on the speed of your device, we sometimes inject the posts in groups (eg, 10 at a time) instead of all at once, in order to keep everything running smoothly. In the web app, if there are a large number of new posts (more than 50 or so), we will not display them but rather show the text “new stream” at the top, which you can click in order to show the new posts. Again, this is done in order to preserve the speed of the application.
When new posts are inserted, we generally try to maintain your place in the stream as best as possible. This can sometimes be a bit tricky if you’re in the middle of scrolling down (for example), but for the most part Streamified should generally maintain your reading position.
Still got a question about Streamified’s post loading? Let us know what you think at GetSatisfaction, or drop us a note at Facebook, Twitter, or Google+. If you like our products, leave us a review in the iTunes App Store or the Chrome Web Store!