Questions tagged [crdt]

Commutative Replicated Data Type

Commutative Replicated Data Type

A CRDT is a data type designed so that operations on it commute - give the same result independent of the order in which they are applied.

See: A comprehensive study of Convergent and Commutative Replicated Data Types

46 questions
2
votes
1 answer

Riak max-counter

I'd like to implement sth like a max-counter using Riak's CRDTs to use w/ Yokozuna. The idea I had was to have a Riak map, two counters inside it, one to be modified, then the other to be updated to the max of both in a pre-commit hook. However, I…
miau
  • 227
  • 2
  • 9
2
votes
1 answer

Process messages at specific time reliably

Let's assume I have a chat application. Client send message to chat which resulted in some command to some Actor. Now, I want to process what he wrote immediately and make it available to other users in this chat, so I process this command. At the…
bobby
  • 617
  • 1
  • 8
  • 19
2
votes
2 answers

G-Counters in Riak: Don't the underlying vclocks provide the same data?

I've been reading into CvRDTs and I'm aware that Riak has already added a few to Riak 2. My question is: why would Riak implement a gcounter when it sounds like the underlying vclock that is associated with every object records the same information?…
Lawrence Wagerfield
  • 6,471
  • 5
  • 42
  • 84
1
vote
0 answers

How to handle different paths when working with CRDTs (Yjs), when 2 changes happen concurrently?

I'm currently trying to build a collaborative Drag&Drop HTML-Editor with Yjs. I'm using Node.js with JavaScript and jQuery. A node server (y-websocket) handles the distribution of events to other connected users. The Data-Structure I am representing…
halvar114
  • 11
  • 1
1
vote
0 answers

How real time collaborative editors store document in database ? What should be the schema to support "Operational Transform" or CRDT data structure?

I am trying to understand the schema and right database for the real-time collaborative editor. I could not find a suitable article or research paper about database requirements so I am posting my question here. It would be really helpful if someone…
Ajeet
  • 675
  • 1
  • 6
  • 20
1
vote
1 answer

Is it possible to implement transaction with CRDTs?

By the definition CRDTs (Conflict-free replicated data types) are conflict-free. So it means that any update made on one node will finally be applied (merged) on all other nodes. So it leads me to the assumption that CRDT can't logically restrict or…
Aleksei Gutikov
  • 343
  • 4
  • 10
1
vote
0 answers

How to manage and keep the size of the delta-state minimal in delta-crdt

I'm quite new to (delta) crdt. According to my understanding delta crdt keeps a "global" (eventual consistent) state and a delta state. It occasionally sends the delta part (and sometimes the full state) to other replicas. Some other crdt algorithms…
gzp
  • 11
  • 1
  • 1
1
vote
1 answer

When using 2P CRDT data structures (for example 2P-set), how do you free up space?

2P-set allows to remove the elements from a set, but doesn't allow to free the space those removed elements take up. In fact, removal of an element consumes space, rather that frees it. What's the algorithm to free up space for 2P structures? I'm…
1
vote
1 answer

IPFS for collaborative text editing

I am new to ReactJS and IPFS, trying to create webpages with textarea where, when I type in textarea of webpage 1 it should reflect on the other and vice versa. Also, I need to do this with ipfs. Any help in understanding how to proceed on this. I…
Diva
  • 35
  • 4
1
vote
1 answer

Which CRDTs can be used to implement a full-featured collaborative rich text editor?

I have been studying CRDTs and understand that they have been used to build collaborative editors, including Ritzy, TreeDoc, WOOT and Logoot. I'm interested in building such an editor, and need to know if CRDTs are known to be able to handle this…
bright
  • 4,700
  • 1
  • 34
  • 59
1
vote
1 answer

Syntax for setting/updating register fields in Map CRDT on server

What is the syntax for setting lwwreg register values in CRDT Map on server side in Riak? I tried a code like below which doesn't seem to be valid: %% Obj is a map object to which we want to add/set a register "uname" with value %%…
Sal
  • 4,312
  • 1
  • 17
  • 26
1
vote
1 answer

Riak Dataypes: default values vs non-existing keys

It seems that Riak Datatype API does not allow to distinguish between non-existing keys and default values. For example, if I query for non-existing key as follows: val fetchOp = new FetchCounter.Builder(key).build() val c =…
Tim
  • 2,008
  • 16
  • 22
1
vote
1 answer

How to use a secondary index on a Riak map

Is there a way to use the Java client to create a secondary index on values that are maps in Riak? The code I have for creating the map is as follows RegisterUpdate value = new RegisterUpdate(rawValue); MapUpdate data = new…
wegrata
  • 1,596
  • 1
  • 15
  • 19
0
votes
0 answers

how to switch the doc when using yjs to implement an online collaboration editor without websocket reconnection

I am trying to using yjs "yjs": "^13.6.7" https://github.com/yjs/yjs to implement an online collaboration editor. This is how I initial the yjs in react function component: import { useRef } from "react"; import { EditorView } from…
Dolphin
  • 29,069
  • 61
  • 260
  • 539
0
votes
0 answers

React rerendering too much when using YJS

I'm making a collaborative app using: "next": "^13.4.12", "yjs": "^13.6.7", "y-webrtc": "^10.2.5", // Slate and its YJS implementation probably aren't the issue, I think "slate": "^0.94.1", "slate-history": "^0.93.0", "slate-react":…
nusantara
  • 1,109
  • 1
  • 15
  • 38