neurodrone / crdt Goto Github PK
View Code? Open in Web Editor NEWA Golang implementation of CRDTs.
License: MIT License
A Golang implementation of CRDTs.
License: MIT License
Instead of resolving conflicts in the read-path, we can try to resolve them in the write-path.
By adding a [element, time, contains?]
version we can add or remove an element from the set depending on the timestamp for which op is higher.
When times for conflicting ops (both add and remove) are same then we pick the value for contains?
depending on the biasValue that is passed in.
We save all the added timestamps for each LWW-e-set
element within an array. This makes it easier to add multiple entries that have the same timestamps.
Ideally, only one entry across multiple duplicate timestamps should exist.
In file g_counter.go line 22, the identity of replica is ident: uuid.NewV4().String() but uuid.NewV4() returns a tuple with of format (UUID, error).
As I saw this reference is used in other places as well!
Currently, the implemented LWW-e-set CvRDT ensures that Adds always wins over Removes. The ability to control this should rely on the value of BiasType
key that is passed in while creating a new object of type LWWSet
.
In order to make persistence an easier problem to solve we should be able to serialize every data-structure currently present in the repository. The data-structures should implement json.Marshaler
interface to suffice a baseline scenario.
https://github.com/neurodrone/crdt/blob/master/lww_e_set.go#L68-L74 the results for each of the switch cases should be swapped.
I am working on Synchronisation for online, offline apps.
CRDTS are a core part of that and great that this lib is here.
Google's vandium implements CRDT's btw for a database called Syncbase.
I am sure you know the project. Yesterday was announced that the project is closing down.
The CRDT related problems they solves are impressive.
Have you looked a this ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.