geertvos / gossip

Gossip Cluster Framework
39 stars 10 forks source link

Add more states for members #2

Open romix opened 11 years ago

romix commented 11 years ago

It could be useful to have a more fine-grained distinction of states for cluster members, e.g. joining, up, leaving, down and so on.

For example, when a member tries to join it is in a joining state until everyone else in the cluster agrees that this node is available now. Then it can be promoted to to the "up" state. Other states can be handled in a similar way.

The reason for this proposal is to be able to see when a node should start or stop performing user-defined tasks as a cluster member. E.g. the node that is joining, but is not up yet should not be allowed to serve application level requests (assuming that cluster nodes, when they are ready, serve some sort of requests or perform other application specific tasks).

Or, when node is about to leave, it could do it gracefully, so that others are aware and can prepare for that, e.g. by migrating tasks/data from this node to other cluster nodes.

geertvos commented 11 years ago

Again, thank you for your feedback, I appreciate it.

Currently I am working on a project that builds on top of the Gossip library. I already found out that at least the event handlers should get more information. But, including the state might indeed useful. Currently you can get events for joining and leaving nodes. This allows you to track why the cluster is destabilized.

I have to think on how to add this feature.

romix commented 11 years ago

May be this can help and give you a better idea of what I'm thinking of: http://doc.akka.io/docs/akka/snapshot/common/cluster.html#Member_States

geertvos commented 11 years ago

Thanks, will have a look. Akka is definitely something that inspires me. On top of this library I am working on a distributed actor framework. The gossip library is just the start.

On 26 apr. 2013, at 19:00, "romix" notifications@github.com<mailto:notifications@github.com> wrote:

May be this can help and give you a better idea of what I'm thinking of: http://doc.akka.io/docs/akka/snapshot/common/cluster.html#Member_States

— Reply to this email directly or view it on GitHubhttps://github.com/geertvos/gossip/issues/2#issuecomment-17086608.

romix commented 11 years ago

May I ask why do you want to develop new gossip and actors frameworks? Why not using Akka or something similar directly?

And BTW, how does this gossip framework scales?

geertvos commented 11 years ago

That reason to develop this Gossip library was twofold. First of all, I had trouble finding good open source clustering libraries for Java. Secondly in my daily work I work a lot with distributed systems and I wanted to work out one of my ideas. So it is also fun to work on. For instance, I know that Cassandra has a pretty good implementation, but it is not a library you can easily integrate in your project. My goal is to develop a library that will.

To answer your other question, why another actor framework? Because I think there are currently no actor frameworks that fit the design I have in mind. It will of course share some concepts of Akka, but in general will have a different design.