The more I talk with people about offline-first, the more I realise the term has different meanings for everyone. Here's what we mean when we say @storyarkapp is "offline-first":
The database in your device is a one-to-one copy of what's in the backend, with the only difference being that the remote version is encrypted with your private key. How data security is handled in @storyarkapp is a separate topic I will discuss another day.
Changes to your local data get opportunistically replicated to the backend and your other devices whenever network conditions allow. Conflicts are implicitly handled by the system thanks to our extensive use of #CRDT.
This means that your device always has a complete, consistent and (hopefully) recent copy of your data that is available even when you have no internet access, like if you're out exploring caves, traveling in an airplane, or living in #Germany.
However, what offline-first does *not* mean for us is that the client device keeps a complete local copy of your media as well. Photos and videos can easily take up a lot of space, especially for an app like @storyarkapp that stores data in its original quality.
When you import media into your library the app automatically generates downscaled versions and uploads those too. This is done in the client device since the server never gets to see the unencrypted data, but that's part of the security topic that I'll cover in a different post.
Generally the device will download the smallest version of your media that it needs to display, so if you're looking at a thumbnail odds are you only had to fetch and store a couple of KB.
@storyarkapp caches its media in the device not only to save on bandwidth, but also to make it available offline. The cache is actively managed so that media that you haven't looked at recently gets cleaned up, though the user can also do it manually.
The cache can even be cleared by the system on some devices at any moment if it needs to free up storage. @storyarkapp is fine with that, the cache is nice to have but not essential for the app's functionality - we'll just have to fetch the data again when needed.
When you do open a picture, you will rarely see a loading screen. The app shows the best available version even if it's the thumbnail: we'll upscale the low-resolution image while sneakily fetching a larger version in the background. Once it is available, it's replaced in-situ.
The process is so seamless that I sometimes wonder if it's working at all. See if you can spot it (and please excuse Twitter's video compression):
TLDR; offline-first doesn't mean you have to walk around with a full copy of your entire media library, but rather that you have a fully functional app that makes a best-effort to show you your data regardless of network conditions.
Want to try it out? We'll start the closed beta soon.
Sign up at storyark.de
• • •
Missing some Tweet in this thread? You can try to
force a refresh