Live data from Hacker News

Web Applications from the Future: A Database in the Browser

stopa.io

71–75 of 75 posts

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

#71

Earlier quoted context omitted.

The common abstraction is a shared log. I'm boiling down my current side project ( http://www.adama-lang.org/ ) into reusable components. I'm also looking at WebAssembly as the way of doing work ( http://www.adama-lang.org/blog/micro-monoliths ) versus generic operations. Something interesting to consider is how important is offline use these days? If we get to an online-99.9% world, then the solution feels ... simpl…

But you'd want to allow the client query a snapshot before doing a full sync on the shared log.

Absolutely, this is a key reason why I strongly believe what goes in the log matters. If the log is a list of commands, then you have two representations to contend with: the differential/patch form and then the aggregated state.

An area that I'm playing around with is a log reducer which transforms a region within a log into a single item. For instance, if the log entries are just JSON (without arrays) then json merge (RFC 7396) is an example reducer. See http://www.adama-lang.org/blog/json-on-the-brain for more detail.

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

#72

Earlier quoted context omitted.

But you'd want to allow the client query a snapshot before doing a full sync on the shared log.

Absolutely, this is a key reason why I strongly believe what goes in the log matters. If the log is a list of commands, then you have two representations to contend with: the differential/patch form and then the aggregated state. An area that I'm playing around with is a log reducer which transforms a region within a log into a single item. For instance, if the log entries are just JSON (without arrays) then json mer…

Interesting approach to reduce or even eliminate the workload of left folding the logs

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

#73

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…

The common abstraction is a shared log. I'm boiling down my current side project ( http://www.adama-lang.org/ ) into reusable components. I'm also looking at WebAssembly as the way of doing work ( http://www.adama-lang.org/blog/micro-monoliths ) versus generic operations. Something interesting to consider is how important is offline use these days? If we get to an online-99.9% world, then the solution feels ... simpl…

Offline first is a majors selection criteria for me.

First, it's just faster. Offline apps are an order of magnitude faster and the speed is stable.

Secondly, data is way easier to backup. I don't trust any provider with important data. Your account can be banned, or you could be locked out. There are outage, data corruption, human errors from people you share data with...

Then there is the no internet part. Internet at home can go off for many reasons, you may be abroad, in a plane, in a tunnel, in the country side. Or internet could be slow, unreliable, behind an agressive proxy, etc.

That's why i use thunderbird and not a web mail, dynalist and not the competition, mp3 and not spotify... That's why i keep osmand next to waze and torrents next to netflix.

Last week internet went down in accounting. They took the day off, because they used office 365. Great for them, not so much for the work to be done.

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

#74

Just use Firebase (firestore) ... It's got: offline first, latency compensation, pubsub, partial sync, authorization rules and serverside timestamps, and global transactions, and 5 9s availability backed by spanner for umpteen languages. https://tomlarkworthy.endpointservices.net/blogs/firestores-...

Firestore is not really offline-first. Your app wont start without internet connection because the auth handler needs that.

no, it works as long as you logged in once. You have to ensure auth persistence is on (https://firebase.google.com/docs/auth/web/auth-state-persist...). You cannot login when offline, but if you were already logged in, and expiry is set to indefinate, you can stay logged in while offline.

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

#75

Earlier quoted context omitted.

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…

Yjs is exactly that. It is a simple abstraction for building any kind of collaborative application. It has ready to use solutions for most problems related to this problem space. The selective UndoManager, for example, is generic&configurable and can be reused for all kinds of stuff. It supports many different editors. It supports many different (scalable) backends.

It is much more than state synchronization.

If there is anything missing, then let's work on it. Yjs is extensible and allows for custom features that others can reuse.

Post reply on HN