Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do you use this? #2

Closed
bmizerany opened this issue Nov 8, 2017 · 2 comments
Closed

How do you use this? #2

bmizerany opened this issue Nov 8, 2017 · 2 comments

Comments

@bmizerany
Copy link

This looks rad! I’ve read the readme and godoc but there isn’t much showing how to use the library. An example showing a simple text editor or collaborative drawing would be rad. Maybe you already have examples of this in use elsewhere?

The deepdive into the wire protocol and format is awesome though. :)

@gritzko
Copy link
Owner

gritzko commented Nov 9, 2017

Thanks!

This is exactly a protocol spec and a parser. It also has two example data types: LWW and RGA.
LWW is more or less what Cassandra is using. I may also add Yeschenko-style counters if I have time.
The RGA is actually close to Causal Trees than to Replicated Growable Arrays by Roh et al (I published that in 2010, 2014).

This model was in use in some deployed projects, so I am rather familiar with ins and outs.
But, it was never defined as a formal language before.
To actually use it, you have to bolt it on.

For a browser-based collaborative editor, the essential parts are:

  1. a JavaScript parser (https://github.com/gritzko/swarm-ron, needs a revisit),
  2. a WebStorage/IndexedDB/WebSocket caching client implementation,
  3. a Go WebSocket server,
  4. a back-end database speaking RON (key-value is enough),
  5. the editor per se (likely Quill or Prosemirror, plus the bindings).

This year, I may release 4, 1 and probably a bunch of other parsers (Java, C++, etc), depending on circumstances.
Not being a (massively VC-funded) company, I cannot aim higher.

@gritzko gritzko closed this as completed Nov 13, 2017
@bmizerany
Copy link
Author

bmizerany commented Nov 13, 2017 via email

gritzko added a commit that referenced this issue Jan 13, 2018
to my poor neck devotedly carrying my heavy head for 38yrs

* adjust context semantics: now, only reduced ops use
  the previous value for every omitted spec UUID;
  headers, queries and raw ops must reference the
  previous value *explicitly*; that prevents various
  inadvertent UUID carry-over bugs

  e.g.
        *lww#obj@time1:key=1; @time2:key2=2;
  should now be spelled as
        *lww#obj@time1:key=1; *# @time2:key2=2;

* put reducer test primers into separate files;
  those are much easier to edit with vim highlighting

* misc small stuff
olebedev added a commit that referenced this issue Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants