-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Apache Cassandra MembershipTable implementation? #1218
Comments
I will take a look. |
@gabikliot From experience I can tell that Cassandra is a lot easier to set up and operate. Maybe only me? :) |
Briefly: for Orleans's membership table the underlying system store has to support:
I have been reading a bit about Cassandra, without spending too much time on that, and it does seem pretty clear that cassandras lightweight transactions definitely do support 1. As for 2 - batched atomic isolated writes - I am not sure. I wasn't able to find a definite answer. So it actually looks like Cassandra does NOT satisfy 2. The question now is: if Cassandra does not satisfy 2 even in the same partition, can it still be used for Orleans's membership and what would we loose in Orleans's membership if we used non-isolated batched writes? If you are interested in proceeding this route, my suggestion would be:
|
I know nothing about Cassandra, but I've just found this here:
and from your link (c)
|
Yes, indeed @shayhatsor , I saw all those and that is indeed what confused me. It looks like it "maybe" works for the same partition, but I am not 100% sure. The documentation could have been more explicit I think (the first link you send is for individual row, which indeed is pretty clear fully isolated). Basically, this is the only place I found a mention of isolation levels within the partition. I would recommend @globeport to establish the batch isolation level beyond any doubt, maybe by asking in some Cassandra forums. |
Thanks guys. I'm pretty sure that batch updates in Cassandra are not isolated, but I'll get some clarification. Apache Zookeeper would work just fine. However, the system I'm building is using Cassandra as the primary datastore and therefore it would be nice to proceed with one less moving part if possible. If there was an 'easy change' that could remove the requirement for isolated batches that would be ideal. |
http://grokbase.com/t/cassandra/user/155jx7wdt1/batch-isolation-within-a-single-partition Actually, infact it does seem that Cassandra supports batch isolation for row updates with the same partition key. So I think it may indeed be possible to use Cassandra as is, providing the data is partitioned with this in mind. |
Great! No problem then. I recommend reading both the IMembershipTable interface, the describes the semantics of the operations, and also to use Azure Table and ZK implementation as references. |
Looks like this got resolved. |
@globeport did you manage to implement a Cassandra provider? Thanks |
This is a really old thread, but let me provide some insight into the problem: Orleans needs to update both the membership version and the target membership entry at the same time, thus needing to update two tables in a transaction (when viewed from an RDBMS point of view). With Cassandra there are two ways to address this problem:
Note, both solutions require the entire membership data to exist in one partition only. However, it's hard to imagine a cluster with so many nodes that storing membership data in one partition would have a negative impact on performance (at least for me), so it shouldn't be a problem. |
Would it be possible to implement the cluster MembershipTable in cassandra? Ive just had a quick scan through the protocol and I can see there is a requirement for optimistic concurrency but not full blown transactions. Can anyone confirm whether cassandras lightweight transactions can support a MembershipTable implementation? I'll take a look at developing this if someone with more knowledge can just confirm it should be possible.
Thanks,
Stuart
The text was updated successfully, but these errors were encountered: