https://github.com/rdner/crdt
CRDT LWW Set and Directional graph implementations made for educational purposes.
https://github.com/rdner/crdt
crdt graph
Last synced: about 1 year ago
JSON representation
CRDT LWW Set and Directional graph implementations made for educational purposes.
- Host: GitHub
- URL: https://github.com/rdner/crdt
- Owner: rdner
- Created: 2021-07-26T16:15:45.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-12-12T18:06:42.000Z (over 4 years ago)
- Last Synced: 2025-02-08T23:46:05.284Z (over 1 year ago)
- Topics: crdt, graph
- Language: Go
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Last-Writer-Wins State-based Directional Graph
## Introduction
[Conflict-Free Replicated Data Types](https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type) (CRDTs) are data structures that power real-time collaborative applications in distributed systems. CRDTs can be replicated across systems, they can be updated independently and concurrently without coordination between the replicas, and it is always mathematically possible to resolve inconsistencies that might result.
## Reading
* https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type
* https://github.com/pfrazee/crdt_notes
* https://hal.inria.fr/inria-00555588/PDF/techreport.pdf
## Implementation
This is a state-based LWW-Element-Graph implementation with test cases.
This includes implementation of a LWW-Element-Set which is composed into the graph for storing vertices and edges.
The graph contains functionalities to:
* add a vertex/edge
* remove a vertex/edge,
* check if a vertex is in the graph,
* query for all vertices connected to a vertex,
* find any path between two vertices,
* merge with concurrent changes from other graph/replica.
## Running tests
You need to have docker installed in order to run the tests.
Use `make test` command to run the tests.
## Author
MIT License
[Denis Rechkunov](https://rdner.de) denis@rdner.de