Live data from Hacker News

Every System is a Log: Avoiding coordination in distributed applications

restate.dev

1–10 of 157 posts

Re: Every System is a Log: Avoiding coordination in distributed applications

#2
A short summary:

Complex distributed coordination and orchestration is at the root of what makes many apps brittle and prone to inconsistencies.

But we can mitigate much of complexity with a neat trick, building on the fact that every system (database, queue, state machine) is effectively a log underneath the hood. By implementing interaction with those systems as (conditional) events on a shared log, we can build amazingly robust apps.

If you have come across “Turning the Database Inside Out” (https://martin.kleppmann.com/2015/11/05/database-inside-out-...), you can think of this a bit like “Turning the Microservice Inside Out”

The post also looks at how this can be used in practice, given that our DBs and queues aren't built like this, and how to strike a sweet-spot balance between this model with its great consistency, and maintaining healthy decoupling and separation of concerns.

Re: Every System is a Log: Avoiding coordination in distributed applications

#4

whats your take on handling log compaction to prevent unbounded growth, especially in systems with high write throughput?

Nice question! Restate is not a log that retains the raw events for a long time - conceptually just until they where processed by the handlers, DB, locking, etc.

When you build stateful handlers, the state per key is in the internal DB, and that get's you a similar effect to log compaction, i.e., retain one value per key.

Re: Every System is a Log: Avoiding coordination in distributed applications

#5
Since we’re on the subject of logs and embarassingly parallel distributed systems, I know someone who’s also in NYC who’s been building a project exactly along these lines. It’s called gossiplog and it uses Prolly trees to make some interesting results.

https://www.npmjs.com/package/@canvas-js/gossiplog

Joel Gustafson started this stuff at MIT and used to work at Protocol Labs. It’s very straightforward. By any chance sewen do you know him?

I first became aware of this guy’s work when he posted “merklizing the key value store for fun and profit” or something like that. Afterwards I looked at log protocols, including SLEEP protocol for Dat/Hypercore/ pear and time-travel DBs that track diffs, including including Dolt and even Quadrable.

https://news.ycombinator.com/item?id=36265429

Gossiplog’s README says exactly what this article says— everything is a log underneath and if you can sync that (using prolly tree techniques) people can just focus on business logic and get sync for free!

Re: Every System is a Log: Avoiding coordination in distributed applications

#7
post #2

A short summary: Complex distributed coordination and orchestration is at the root of what makes many apps brittle and prone to inconsistencies. But we can mitigate much of complexity with a neat trick, building on the fact that every system (database, queue, state machine) is effectively a log underneath the hood. By implementing interaction with those systems as (conditional) events on a shared log, we can build am…

Is this summary AI generated?

Re: Every System is a Log: Avoiding coordination in distributed applications

#8
post #5

Since we’re on the subject of logs and embarassingly parallel distributed systems, I know someone who’s also in NYC who’s been building a project exactly along these lines. It’s called gossiplog and it uses Prolly trees to make some interesting results. https://www.npmjs.com/package/@canvas-js/gossiplog Joel Gustafson started this stuff at MIT and used to work at Protocol Labs. It’s very straightforward. By any chanc…

Never encountered it before, but it looks cool.

I think they are trying to solve a related problem. "We can consolidate the work by making a generic log that has networking and syncing built-in. This can be used by developers to make automatically-decentralized apps without writing a single line of networking code."

At a first glance, I would say that Gossiplog is a bit more low level, targeting developers of databases and queues, to save them from re-building a log every time. But then there are elements of sharing the log between components. Worth a deeper look, but seems a bit lower level abstraction.

Re: Every System is a Log: Avoiding coordination in distributed applications

#9
post #7
post #2

A short summary: Complex distributed coordination and orchestration is at the root of what makes many apps brittle and prone to inconsistencies. But we can mitigate much of complexity with a neat trick, building on the fact that every system (database, queue, state machine) is effectively a log underneath the hood. By implementing interaction with those systems as (conditional) events on a shared log, we can build am…

Is this summary AI generated?

Haha, no, but maybe all the AI-generated contents out there is starting to train me to write in a similar style...

Re: Every System is a Log: Avoiding coordination in distributed applications

#10
post #9
post #7

Earlier quoted context omitted.

Is this summary AI generated?

Haha, no, but maybe all the AI-generated contents out there is starting to train me to write in a similar style...

I feel this happening to me too... depressing
Post reply on HN