This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-16
Channels
- # admin-announcements (2)
- # bangalore-clj (3)
- # beginners (15)
- # boot (303)
- # carry (18)
- # cider (7)
- # cljs-dev (222)
- # cljsrn (103)
- # clojure (196)
- # clojure-czech (2)
- # clojure-russia (69)
- # clojure-spec (21)
- # clojure-uk (48)
- # clojurescript (68)
- # cursive (18)
- # datomic (185)
- # events (1)
- # hoplon (2)
- # lambdaisland (1)
- # leiningen (1)
- # mount (10)
- # off-topic (1)
- # om (14)
- # onyx (154)
- # parinfer (1)
- # pedestal (3)
- # planck (5)
- # protorepl (9)
- # re-frame (17)
- # reagent (27)
- # ring (2)
- # specter (58)
- # test-check (1)
- # testing (7)
- # untangled (59)
- # yada (35)
Morn'
so this morning zookeeper died of dysentery or something and totally shat all over its snapshots 😢
first time it's ever un-recoverably borked for me
it looks like the ubuntu 14 current version has several critical bugs in it which are fixed in the following point releases
though the number of "critical" bugs in their release notes really doesn't inspire confidence
@mccraigmccraig: Do you use zookeeper directly?
@dominicm: indirectly - mesos, kafka and onyx all use it
sweeet: JSON CRDTs http://arxiv.org/abs/1608.03960
That looks like you might have just opened up the rabbit hole I've been looking for ...
looks interesting, I’ve spotted a mini typo We introduce a single, general mechansim
I like that this looks like it will apply to an awful lot of clojure style data structures too
I have a question that may relate to CRDTs: - User updates username to A - User very quickly updates username to B Due to distribution, B hits the database first. How do I prevent A from becoming the username?
@dominicm: in that case you could supply ordering information from the user's client to allow the server to discriminate with something like update users set username=X where id=ID and timestamp<Y
if there are two or more clients making concurrent changes with no obvious priority then you may want CRDTs
even better @glenjamin
I think I see. I thought it might be. That was the best idea I had too. Could that break if a user tried A->A->B->A, and ended up with A->A->A->B ?
yeah, the most robust is probably using the revision number, what to do when you actually do hit conflicts in interesting
Something else I'm trying to figure out is how to make idempotent writes. Onyx can retry a message if it's not sure it succeeded. Datomic is pretty easy if you create a custom transactor function which looks for transactions with a particular message-id. Something more traditional like postgres confuses me a little still though.
In general, datomic is great for distributed systems, because even if a write happens during a process, your reads are consistent.
Distributed systems just seem hard for updating state. Better to just store a history of messages and reprocess them on-demand.
dominicm: any ACID database should be consistent during reads (tho many are not configured that way)
If something doesn't process for 10s, I still want it to operate with the way the world was 10s ago, I think?
@dominicm: your history of messages is also state - all participants have to agree on the history, otherwise their notions of eventual state may be different
most databases throw away context, the more you can keep, the more options you have to reconcile conflicts
In seriousness, is there a way I can learn to handle all of this stuff? Resources you guys could recommend?
I reckon it’s entirely contextual, depending on what you’re building you may or may not need any of this
One of my interests is replayable events, as in, you can rebuild your database from scratch from the list of events. But that means you must be truly consistent, you can't have out of order changes screwing with things.
@dominicm: Martin Kleppmann’s blog is a good resource and his book is really good https://martin.kleppmann.com/