automerge/automerge: A JSON-like data structure that can be modified concurrently by different users, and merged again automatically.


72 bookmarks. First posted by mattmueller september 2017.


A JSON-like data structure that can be modified concurrently by different users, and merged again automatically. Automerge is a library of data structures for building collaborative applications in JavaScript.
json  concurrency 
4 days ago by dlkinney
Neat consensus editing tool.
5 days ago by traggett
Automerge is a library of data structures for building collaborative applications in JavaScript.
collaboration  json  js  merge  data  library  realtime  sync 
6 days ago by andrewn
Github repo
Name: automerge
Tagline: A JSON-like data structure that can be modified concurrently by different users, and merged again automatically.
Languages:
JavaScript = 152269 bytes

# Automerge

[Join the Automerge Slack community](https://communityinviter.com/apps/automerge/automerge)

Automerge is a library of data structures for building collaborative applications in JavaScript.

A common approach to building JavaScript apps involves keeping the state of your application in
model objects, such as a JSON document. For example, imagine you are developing a task-tracking app
in which each task is represented by a card. In vanilla JavaScript you might write the following:

```js
var doc = {cards: []}

// User adds a card
doc.cards.push({title: 'Reticulate splines', done: false})

// User marks a task as done
doc.cards[0].done = true

// Save the document to disk
localStorage.setItem('MyToDoList', JSON.stringify(doc))
```

Automerge is used in a similar way, but the big difference is that it supports **automatic syncing
and merging**:

* You can have a copy of the application state locally on several devices (which may belong to the
same user, or to different users). Each user can independently update the application state on
their local device, even while offline, and save the state to local disk.

(Similar to git, which allows you to edit files and commit changes offline.)

* When a network connection is available, Automerge figures out which changes need to be synced from
one device to another, and brings them into the same state.

(Similar to git, which lets you push your own changes, and pull changes from other developers,
when you are online.)

* If the state was concurrently changed on different devices, Automerge automatically merges the
changes together cleanly, so that everybody ends up in the same state, and no changes are lost.

(Different from git: **no merge conflicts to resolve!**)

## Features and Design Principles

* **Network-agnostic**. Automerge is a pure data structure library that does not care what kind of
network you use: client/server, peer-to-peer, Bluetooth, carrier pigeon, whatever, anything goes.
Bindings to particular networking technologies are handled by separate libraries. For example, see
[MPL](https://github.com/automerge/mpl) for an implementation that uses Automerge in a
peer-to-peer model using [WebRTC](https://webrtc.org/).
* **Immutable state**. An Automerge object is an immutable snapshot of the application state at one
point in time. Whenever you make a change, or merge in a change that came from the network, you
get back a new state object reflecting that change. This fact makes Automerge compatible with the
functional reactive programming style of [Redux](http://redux.js.org/) and
[Elm](http://elm-lang.org/), for example. Internally, Automerge is built upon Facebook's
[Immutable.js](http://facebook.github.io/immutable-js/), but the Automerge API uses regular
JavaScript objects (using
[`Object.freeze`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze)
to prevent accidental mutation).
* **Automatic merging**. Automerge is a so-called Conflict-Free...
github  programming  github-starred-to-pinboard  crypto 
7 days ago by brianyang
automerge - A JSON-like data structure that can be modified concurrently by different users, and merged again automatically.
javascript  github  collaboration  json  sync  offline  library  hn 
11 days ago by e2b
Automerge is a library of data structures for building collaborative applications in JavaScript.
json  database  javascript 
14 days ago by shearichard
matthewmueller starred automerge/automerge
javascript 
14 days ago by kurver
By automerge. "JSON-like data structure that can be modified concurrently by different users, and merged again automatically."
javascript  data 
14 days ago by hanyu
Library to implement a "merge" operation in JavaScript. Sort of an eventual-consistency data model.
javascript  replication 
14 days ago by andrewbe
A JSON-like data structure that can be modified concurrently by different users, and merged again automatically.
javascript  library  distributed  collaboration  sync  merge 
14 days ago by segfault
merge changes to json data structures
js  javascript  datastructures  cscw  :velo:tool?  :vos:tool? 
14 days ago by reedhedges
automerge - A JSON-like data structure that can be modified concurrently by different users, and merged again automatically.
javascript  structured  lib  p2p 
14 days ago by fiatjaf
A JSON-like data structure that can be modified concurrently by different users, and merged again automatically.
json  javascript  library  CRDTs 
14 days ago by adagios
"A JSON-like data structure that can be modified concurrently by different users, and merged again automatically."
collaboration  javascript  json 
15 days ago by kevinrood
Wow. A library bringing CRDTs to the masses, with and among the authors...
from twitter_favs
15 days ago by abolibibelot
Automerge is a so-called Conflict-Free Replicated Data Type (CRDT), which allows concurrent changes on different devices to be merged automatically without requiring any central server. It is based on academic research on JSON CRDTs, but the details of the algorithm in Automerge are different from the JSON CRDT paper, and we are planning to publish more detail about it in the future.
datastructures  crdt 
15 days ago by vipom
jaygooby starred automerge/automerge
github  starred  favorite 
15 days ago by jaygooby
JSON-like data structure that can be modified concurrently by different users, and merged again automatically.
json  merge  collaboration  sync  distributed 
15 days ago by mjlassila
interesting approach for mergeable versioned json objects
collaboration  github  javascript  json 
16 days ago by jkriss
automerge - A JSON-like data structure that can be modified concurrently by different users, and merged again automatically.
json  merge  conflict  resolve  history  cms 
16 days ago by diff_sky
automerge - A JSON-like data structure that can be modified concurrently by different users, and merged again automatically.
javascript  json 
16 days ago by geetarista
A JSON-like data structure that can be modified concurrently by different users, and merged again automatically.
javascript  collaboration 
16 days ago by makenosound
fabianmoronzirfas starred automerge/automerge
github  stars 
16 days ago by fabianmoronzirfas
Automerge () is on Hacker News, and commenters are unsurprisingly getting the wrong end of the stick
from twitter_favs
16 days ago by adrahon
Automerge () is on Hacker News, and commenters are unsurprisingly getting the wrong end of the stick
from twitter_favs
16 days ago by WibbleFarmer
Automerge () is on Hacker News, and commenters are unsurprisingly getting the wrong end of the stick
from twitter_favs
16 days ago by ngpestelos
Automerge: JSON-like data structure for building collaborative apps (JavaScript)
from twitter_favs
16 days ago by adz
automerge - A JSON-like data structure that can be modified concurrently by different users, and merged again automatically.
javascript  json  crdt 
4 weeks ago by twleung
The apps we are building around Automerge () use a Redux pattern.
from twitter_favs
4 weeks ago by briantrice
A JSON-like data structure that can be modified concurrently by different users, and merged again automatically.
js  crdt  sync 
8 weeks ago by cramm
> A JSON-like data structure that can be modified concurrently by different users, and merged again automatically.
json  javascript  merge  collaboration 
10 weeks ago by barryf
RT : Nice little CRDT JSON module for p2p programs:
from twitter_favs
10 weeks ago by jimpick
matthewmueller starred automerge/automerge
github  development 
september 2017 by mattmueller