Instant vs Converged Member Events
I think it depends on the use case if you are interested in immediate notification of member event or defer it until everybody has seen the transition (that doesn’t say anything about who has received the published member event).
For example, if I have a service that I want to start when my node is part of the cluster (Up), why should I care to wait until everybody have seen that I’m Up? Wouldn’t it make sense to start the service when I see that I’m Up. Sometimes you need the other thing, but not always.
I suggest we should support both instant and converged member events.
For example, if I have a service that I want to start when my node is part of the cluster (Up), why should I care to wait until everybody have seen that I’m Up? Wouldn’t it make sense to start the service when I see that I’m Up. Sometimes you need the other thing, but not always.
I suggest we should support both instant and converged member events.
MemberEvent
ConvergedMemberEvent extends MemberEvent
MemberJoined extends ConvergedMemberEvent
MemberUp extends ConvergedMemberEvent
InstantMemberEvent extends MemberEvent
InstantMemberJoined extends InstantMemberEvent
InstantMemberUp extends InstantMemberEvent
Leave a comment
on 2013-01-04 04:39 *
By Jonas Bonér
But in your example it can be the case that there will never be a convergence (due to network split or whatever), in that case you most likely do not want to take any action until the problem have been resolved. This InstantMemberEvent is a bit like cheating, taking a bet and hoping that it will hold (i.e. become a converged decision sometime in the future).
Theoretically there could be a need for this special case but I can't see any real practical use and it will complicate things for the users since we give them an option. They might pick the wrong one not fully understanding its implications.
The theory is sound if the user thinks in terms of that there is no solid ground to make decisions upon unless there has been a convergence.
Theoretically there could be a need for this special case but I can't see any real practical use and it will complicate things for the users since we give them an option. They might pick the wrong one not fully understanding its implications.
The theory is sound if the user thinks in terms of that there is no solid ground to make decisions upon unless there has been a convergence.
on 2013-01-04 04:44 *
By Patrik Nordwall
but for many transitions (e.g. Joining -> Up) the decision is already taken, by the leader (on convergence), it's just that everybody has not seen the new state yet
on 2013-01-04 04:59 *
By Jonas Bonér
That is true. We just need to make sure to document it well so user knows the potential risks/drawbacks in certain scenarios.
on 2013-01-14 11:33 *
By Patrik Nordwall
Assigned to set to Patrik Nordwall
Component changed from None to cluster
Milestone changed from Rollins to Current
Status changed from New to Accepted
I need the instant events for solving the heartbeat problems.