-
Hi, this library looks fantastic, but one thing holding me back is the SessionID size. Why not use a full 128-bit UUID? Unless there is a central server coordinating everything, it seems possible for two forks of a document to end up with two identical SessionIDs that then cannot be later merged. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
Hi @tsukkiren, the 53-bit session IDs ( The reason for choosing 53-bit values is because it is the largest numeric value in JavaScript with which one can performantly work with. Storing and working with 128-bit UUID is inefficient. There are storage costs, but also runtime costs: all algorithms need to constantly do Also, runtime memory costs, all document nodes and RGA chunks have an ID assigned to them, when a document with thousands of nodes is loaded, it is thousands of nodes times the number of bytes the The likelihood that two If there is a central server, non of that applies; the server just enforces the Going forward the 53-bit value could potentially be increased to 64 bits. The 53-bit limitation currently exists in |
Beta Was this translation helpful? Give feedback.
Hi @tsukkiren, the 53-bit session IDs (
sid
) should not be a problem. I think even smaller values would work.The reason for choosing 53-bit values is because it is the largest numeric value in JavaScript with which one can performantly work with. Storing and working with 128-bit UUID is inefficient. There are storage costs, but also runtime costs: all algorithms need to constantly do
sid
comparisons and having asid
in anumber
is the most efficient way.Also, runtime memory costs, all document nodes and RGA chunks have an ID assigned to them, when a document with thousands of nodes is loaded, it is thousands of nodes times the number of bytes the
sid
consumes. If thesid
is represented b…