Webapp local data synchronization service

I have an elm application that has two ports to read and write key-value data currently persisted in the user web browser’s local storage.

Now I’m looking for a service that would allow to sync data with an other device, for example between a laptop and a mobile.

Do you have any suggestion for such service ?

My first approach would be to use Lamdera. If that doesn’t work then maybe some database-as-a-service type thing?

Something like cloud storage for firebase? You could also try supabase as an alternative.

1 Like

haven’t tried it, but i’m curious about peer to peer options - Peer-to-Peer Data Sync Solution | Learn More with Couchbase Lite . I would definitely start with something simpler like the suggestions above before entertaining peer to peer.

https://www.airsequel.com/ is also a solution that has been posted on this forum.

1 Like

Naturally, the more I think about it, the more I come with refined requirements :slight_smile:

I’d like the service to work anonymously. A user will generate or choose a uniq name (preferably complicated), and only those who know the name will access the data.

Something similar to etherpad, but to sync key-value pairs.

Lamdera would work well for this as well

I did tinker with Lambdera long time ago ; my account is still alive but I’m rusted.

No sure how I would implement some kind of segregation of data ?

What do you mean by “segregation of data”?

I mean I don’t want a user to access data of another user.

This will likely conflict with

The second requirement here would require some form of authentication (not that you have to implement this) as there would need to be some form of identification when accessing the data. This conflicts with the first requirement of the data access being, essentially, only a password.

As far as the anonymity of an account, that’s hard to say as it can vary by service used or implementation. E.g. if you setup authentication through a magic link setup (sends a unique code to an email) then the anonymity is determined by the email address used.

1 Like

if you setup authentication through a magic link setup

yes that’s the idea. but no need to send it by email. just let the user choose (generate) it and bookmark it.

I get inspiration from Etherpad, you click on “new pad”, a unique code is generated and only user(s) knowing this code can access the content.

It means on backend side, there is a segregation of data based on this code (or a derivative).

This is this kind of backend I’m looking for.

I’m considering a message bus like NATS. I already used it to implement a chat in Elm. Just a port to create to bind the websocket and send/receive messages. Was nice.

But still, I have to find a way to segregate users data. I don’t thing it is possible to create a topic in Nats on the fly …

This is very doable with Lamdera and you could have this setup in a few minutes. However you’d want to be careful about what you put into this system. It’s not secure at all. As you said before

and this isn’t practical for the system you’re describing.

If you want information to be publicly available, then this is a perfectly fine setup to have. If you want people to put private information in this system then I’d recommend something with user authentication.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.