Get the latest tech news

Stop using REST for state synchronization (2024)


mber 22, 2024 tl;dr: Most apps need state synchronization, not state transfer. We should replace REST and friends with proper state synchronization protocols where appropriate.

This mismatch means that we usually implement ad-hoc state synchronization on top of REST, and it turns out that this is not entirely trivial and actually incredibly cumbersome to get right. It’s probably easiest to explain what I mean with an example that’s part of most webapps in some variant: An input element that allows the user to edit a piece of text that is saved to the backend database. I’m not in a position to give an accurate overview of the field, but there are some initiatives to push for actual state synchronization mechanisms: Automerge, Yjs, the Braid working group, Electric SQL and others.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of rest

rest

Related news:

News photo

Eight Sleep Pod 5 aims to improve your rest with new blanket and 'zero-gravity' base

News photo

Ash Framework – Model your domain, derive the rest

News photo

The best tech gifts for mom that she'll appreciate for the rest of 2025