Live data from Hacker News

Show HN: RemoteStorage – sync localStorage across devices and browsers

github.com

51–60 of 69 posts

Re: Show HN: RemoteStorage – sync localStorage across devices and browsers

#52
post #9

Your landing page at https://remote.storage/ is so good, I love the minimalism. Six lines of code tell me exactly what it does.

> Six lines of code tell me exactly what it does

I like the minimalism too, but I don't think it tells me "exactly what it does". I have no idea from that page what the backend requirements are. Is it a hosted solution? Is it using some browser profile functionality? Do I have to set up a server?

It demonstrates the simplicity of the client side code for sure. But the server stack is obviously where the details are going to be.

Re: Show HN: RemoteStorage – sync localStorage across devices and browsers

#53

Earlier quoted context omitted.

It's pretty good... but what if it showed a different landing page after visiting the website on a second machine? :)

Haha good call! Let's do it.

What mechanism for user tracking could you possibly use to do this?

Re: Show HN: RemoteStorage – sync localStorage across devices and browsers

#54
post #25

Earlier quoted context omitted.

Your app might not need it but if you want partial replication or relational querying in addition to offline-first syncing then check out https://github.com/aspen-cloud/triplit (disclaimer: I'm working on this)

how does this compare to https://electric-sql.com/

I think our goals are pretty similar but Triplit offers more flexible storage options (Durable Objects, IndexedDB, SQLite), deeper Typescript integration, and is probably a good deal simpler to operate--we are closer to Firebase/Firestore in that regard. ElectricSQL instead builds on the robustness of Postgres and SQLite.

Re: Show HN: RemoteStorage – sync localStorage across devices and browsers

#56
post #21

I love the simplicity and kinda wish that was actually built into Chrome. I know it would probably break things but if Google could automatically sync local storage and IndexedDB when I'm signed into Chrome on all my devices then a lot browser of apps wouldn't require making an account or even a server for that matter.

I am going to nit pick you a little bit but if you want a good reason to use Firefox, then here it is.

"built into Chrome" implies that Chrome is the only web browser.

Re: Show HN: RemoteStorage – sync localStorage across devices and browsers

#57

Earlier quoted context omitted.

This is handled by Redis, as such, the last write will win. As the primary key is tied to the user id, there will not really be a concept of Machine A vs Machine B as the end user can only be in one place at a time.

Users can have an app in multiple tabs though, and apps can read/write local storage in the background.

The funny thing is that localStorage supports that.

Judging by the title, I thought this tool actually just synced the existing localStorage instead of being its own storage. Since localStorage has onChange events it would be trivial to built, it would still be sync, it wouldn’t require any changes to the existing code, etc

Re: Show HN: RemoteStorage – sync localStorage across devices and browsers

#58
What if you assigned each user a unique ID, used this to determine the user session data and persisted this data in a server that was accessible by both web browsers. You could authenticate yourself against this user id by means of a secret only this user knows

It sounds a bit radical but it may work!

Re: Show HN: RemoteStorage – sync localStorage across devices and browsers

#59
post #48

The use case is limited, a project has it's own backend, why need to add a new sub-system for tiny data storage?

I would state the opposite, the use case is huge.

To add something new, that needs to persist, will not require going to a backend team and begging for a new API from them.

A common difficulty is the simplest scenario, where do I store this frontend user preference? How do I store this that prevents nagging multiple times across devices?

Backend teams will argue this is a frontend piece of data, and they provide APIs and backend storage that is agnostic of a specific frontend.

This feels like a valuable addition.

Re: Show HN: RemoteStorage – sync localStorage across devices and browsers

#60
post #46

The bit about finding a unique ID for the user is the whole pain point though. The only way to do that really is for the user to create an account on some service that I host. And if I have that, I probably have my own hosted data storage anyway.

You totally _should_ have your own backend / auth when using this. It is not a database.

But it’s dead simple if e.g. using something like Clerk.dev for your auth.

Post reply on HN