News for hackers. Stuff that matters.

mikesdawson

Re:Some notes on local-first development on Thursday September 14, 2023 @06:14AM (#37507037)
Query-based replication works when you know what the user probably wants to have in advance (e.g. a device in a warehouse needs records for that stock in that warehouse, not others). But that's still push.

You still need pull on demand access when a user opens any random item where we don't know in advance what they probably want (e.g. a discussion board scenario).

Re:Some notes on local-first development on Wednesday September 13, 2023 @04:01PM (#37501025)
I've been working on mobile apps developed for education in Afghanistan, rural Rwanda, etc for the last 9 years. I used to think that sync was the way, but I have learned from painful experience.

4 (extended): What happens when the user has access to millions of items, but they probably only want a few (e.g. an ebook library catalog)? Do you waste huge amounts of bandwidth and storage to transfer data, of which 99.9% will be useless? We had a situation where the admin user logging in on a project that had been running for years resulted in a sync of 500MB+, 99.99% of that data the admin would never directly use.

Also: do you make users wait for all that old data to sync before they can do anything when they login?

Relying on sync is basically relying on push-only data access. I think in reality most offline/local first applications will work best when they push what a user probably wants (e.g. because they selected it for offline sync, starred it, etc) and can pull any other data on demand (in a way that it can be accessed later offline).

I've outlined that here: https://medium.com/@mike_21858/auto-generating-an-http-serve...

Re:Some notes on local-first development on Wednesday September 13, 2023 @03:47PM (#37500886)
Thanks for sharing that! On the Web: we are using Kotlin/JS and SQLite.js (which uses WASM and talks to the HTML via a web worker). But you're right, Kotlin and Javascript definitely do not connect as naturally as Kotlin and the JVM. Its possible, but it will be trickier.

Offline Mesh Networking on Android?

I want to get 30-100+ Android devices to connect to each other offline without requiring a WiFi access point. I also want to have high connection speeds between them to enable transfer of video files etc. The main purposes is for an education app that is used in areas with limited connectivity (Afghanistan, Tajikistan, Rwanda, and a few others).Google Nearby API is proprietary and doesn't do...

( Read More... | no comments | 3 points | on HN )