Tutorial: Use FlatBuffers in Rust
rwinslow.com2 pointsby rw0 comments
$ wget https://spamassassin.apache.org/publiccorpus/20030228_spam.tar.bz2
$ tar -jxvf 20030228_spam.tar.bz2
$ cat spam/0* > spam-corpus.txt
$ echo "The Magic Words are Squeamish Ossifrage" | plainsight -m encipher -f spam-corpus.txt > spam_ciphertext
$ cat spam_ciphertext
(8.11.6/8.11.6) 3 (Normal) Internet can send e-mails until to transfer 26 10 [127.0.0.1]
also include address from the most logical, mail business for your Car have a many our
portals ESMTP Thu, 29 1.0 this letter on internet, <a style=3D"color: 0px; text/plain;
cellspacing=3D"0" how quoted-printable about receiving you would like width=3D"15%"
width=3D"15%" border="0" width="511" Date: Tue, 27 Thu, 19 26 because
[email protected] for
$ cat spam_ciphertext | plainsight -m decipher -f spam-corpus.txt
Adding models:
Model: spam-corpus.txt added in 2.57s (context == 2)
input is "<stdin>", output is "<stdout>"
deciphering: 100% | 543.84 B/s | Time: 0:00:00
The Magic Words are Squeamish Ossifrage [1,2,3] -> [4,5,_] -> [7,8,9]
And insert 2.5? An inevitable tree restructuring would have to occur, which vastly complicates the insertion logic.
As the author explains, OT relies on some ordering of system events, and CRDTs don't. That means CRDTs need to be commutative (and probably associative), and OT doesn't.
So, OT is less scalable but more powerful, and CRDTs are more scalable but less powerful (in theory).
It's sort of like comparing Paxos/Raft to Bittorrent.
(I am not an expert on OT.)