Skip to content

Instantly share code, notes, and snippets.

@reiddraper
Created January 5, 2012 14:37
Show Gist options
  • Select an option

  • Save reiddraper/1565520 to your computer and use it in GitHub Desktop.

Select an option

Save reiddraper/1565520 to your computer and use it in GitHub Desktop.

Some thoughts...

  1. What about putting the type in the Content-Type field? Something like x-crdt-g-set-v1
  2. What's the rationale for representing things as a hash with lists as values instead of two hashes (in the OR and LWW set for example)? This to me seems closer to how it'll be represented in code (or at least how I've chosen to do with knockbox).

On JSON vs. Protobuf:

JSON has the advantage of easily being used in the browser, so you could actually use the browser's timestamp for some of the operations. This can be useful if for a single key, the single browser is the main actor doing writes. JSON also works easily with javascript mapreduce. If size is a concern, I'd be curious to see the size difference between compressed (snappy maybe?) JSON and Protobuf. I'm not saying Protobuf is a bad choice, just things to consider.

@seancribbs
Copy link

seancribbs commented Jan 6, 2012 via email

@reiddraper
Copy link
Author

I can't immediately think of any downsides to requiring strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment