celluloid / dcell

UNMAINTAINED: See celluloid/celluloid#779 - Actor-based distributed objects in Ruby based on Celluloid and 0MQ
http://celluloid.io
MIT License
595 stars 65 forks source link

MongoDB Registry #47

Closed cognusion closed 11 years ago

cognusion commented 11 years ago

Hi,

I'm hacking a new Ruby framework and figured I'd give DCell a look as it seems to be doing some of the 0MQ heavy-lifting I need to do. I'm using MongoDB for a couple of other reasons, so I figured I'd hack in a MongoDB Registry.

It works fine for the Itchy/Scratchy demo, but likely breaks for anything harder. I'm going to be adding more features, but my Free Time is up for the night.

TODO: connection options, authentication options, error handling

coveralls commented 11 years ago

Coverage Status

Coverage increased (+0%) when pulling 21841681c63b0dfa472e2bb96f413e1573d6f4ac on cognusion:master into 2257aa2ce788a2cdb0d7ef568fa16f751c6fe834 on celluloid:master.

tarcieri commented 11 years ago

There's a couple problems here which would preclude us from accepting this patch, and so I'm closing this, sorry:

1) DCell registries must provide a total ordering of events in a distributed system (a.k.a in the CAP triangle it must provide "CP" properties ala Paxos or Raft). MongoDB does not provide these semantics 2) The registry API is in flux and we are in general not accepting patches for additional registries. We should probably get this into the contributor guidelines ASAP

cognusion commented 11 years ago

I've never heard anyone place MongoDB as anything but a CP-solver (unless you set too small of a write concern and read from replicas, in which case it isn't as C as one would like; or if you're the company that wrote it and then it's a CAP-solver, of course). That notwithstanding, I appreciate your feedback and won't invest more time on it.

tarcieri commented 11 years ago

See http://aphyr.com/posts/284-call-me-maybe-mongodb