Live data from Hacker News

Web Applications from the Future: A Database in the Browser

stopa.io

21–30 of 75 posts

Re: Web Applications from the Future: A Database in the Browser

#21

Having been a dev on EtherPad, Google Wave, Coda, and other real-time collaborative apps with OT, undo, and so on... I think it's correct that, ideally, there would be a framework that handles real-time collaboration, undo/redo, and offline support for you, and then you build your app with these problems already solved. I will probably create such a framework eventually. I don't see it as a database engineering probl…

There are a few of those frameworks. The first one that comes to mind is YJS here is a getting started[1]. 1. https://www.tag1consulting.com/blog/deep-dive-real-time-coll...

Re: Web Applications from the Future: A Database in the Browser

#22
post #14

Having been a dev on EtherPad, Google Wave, Coda, and other real-time collaborative apps with OT, undo, and so on... I think it's correct that, ideally, there would be a framework that handles real-time collaboration, undo/redo, and offline support for you, and then you build your app with these problems already solved. I will probably create such a framework eventually. I don't see it as a database engineering probl…

Where would one go to follow along if you start building this framework? You’ve got one pending GH star from me :)

You could start by watching the Fluid Framework github.com/microsoft/fluidframework (I'm a dev on the team).

We solve a lot of these problems. This whole article speaks to the longer term vision. Even the article's Title is effectively our internal pitch: a web first database... that enables very low latency collab

Re: Web Applications from the Future: A Database in the Browser

#23
To me it always come down to permissions. I've tried firebase, I've tried graphql. I just can't use them for anything other than admin endpoints or things with very simple permissions. I'm glad the author mentioned permissions, but I would need to see some seriously compelling evidence that I could trust a declarative, resource-based permissions system to accomplish what I need.

Re: Web Applications from the Future: A Database in the Browser

#24

Having been a dev on EtherPad, Google Wave, Coda, and other real-time collaborative apps with OT, undo, and so on... I think it's correct that, ideally, there would be a framework that handles real-time collaboration, undo/redo, and offline support for you, and then you build your app with these problems already solved. I will probably create such a framework eventually. I don't see it as a database engineering probl…

There are a few of those frameworks. The first one that comes to mind is YJS here is a getting started[1]. 1. https://www.tag1consulting.com/blog/deep-dive-real-time-coll...

YJS (and Kevin Jahns!) is fantastic, although I'm not sure they're interested in addressing all of these problems. In so far YJS has been very focused on replicating state from one place to another.

And the parent comment may be making light of some of the big issues in the space. You need to be generic, but also performant and simple compared to the competition.

Real time text editing is not trivial although there's solid prior art now. Even undo management is a whole problem space (what should a cross user undo look like if there have been dependent changes).

Re: Web Applications from the Future: A Database in the Browser

#25

Earlier quoted context omitted.

"as long as we’re okay with having a single leader, and are fine with last-write-wins kind of semantics, we can drastically simplify this and just facts are enough" It's not a direct reference to CfRDTs or operational transforms. They're not wrong that last-write-wins is easiest to implement, but some applications it doesn't quite cut it.

Most CRDTs (last-write-wins being one of them) will result in a terrible user experience, and nobody would want to use it for collaboration. That's why most of these collab systems use OT, which is not trivial to implement.

Both CRDTs and OTs are broken. If you wrote them on your own, it's always "the next fixed bug will finally make it work!".

Re: Web Applications from the Future: A Database in the Browser

#26
post #17

Earlier quoted context omitted.

+1. I would even pay to watch you code this.

Didn’t know there was a market for coding session watchers. Let me know if someone’s interested in watch me slow-code my current long running side project: Focusly.

> Didn’t know there was a market for coding session watchers.

I think this is an actual niche on Twitch.

Re: Web Applications from the Future: A Database in the Browser

#27

You should have a look at RxDB which does exactly what you have described. Also notice that neither firebase nor supabase is really offline-first. https://github.com/pubkey/rxdb

RxDB + GraphQL (via Hasura) is amazing, and offers all the things the author notes.

Re: Web Applications from the Future: A Database in the Browser

#28

Having been a dev on EtherPad, Google Wave, Coda, and other real-time collaborative apps with OT, undo, and so on... I think it's correct that, ideally, there would be a framework that handles real-time collaboration, undo/redo, and offline support for you, and then you build your app with these problems already solved. I will probably create such a framework eventually. I don't see it as a database engineering probl…

Firebase?

Re: Web Applications from the Future: A Database in the Browser

#29

Not a single mention of CRDTs or operational transforms in the article. If all you need is a client side database to replicate Figma and Google Docs then they would have long shut down.

For readers like me who do not know every single term in data:

https://en.wikipedia.org/wiki/Conflict-free_replicated_data_...

Post reply on HN