On Thu, Aug 14, 2014 at 5:26 PM, misael neto <[email protected]> wrote:

> Wow,
>
> ClusterSingleton sounds scary... I was thinking of a way to update some
> kind of property on the Cluster Member have that be replicated and visible
> to all other Members int the cluster. This seems easyier and more manageble
> and gives me a sense of control.
>

Good attitude, you should always be sceptical when someone suggest a
singleton ;-)
You said it first: "MUST have ONLY ONE"

Seriously, sometimes you need it.

/Patrik


> I came across the SimpleClusterListener example here:
> http://doc.akka.io/docs/akka/snapshot/java/cluster-usage.html and the
> ClusterDomainEvent class and this example here:
> http://stackoverflow.com/questions/17911862/akka-how-to-find-the-current-nodes-in-a-cluster.
> It sounds like your akka-datareplication
> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fpatriknw%2Fakka-datareplication&sa=D&sntz=1&usg=AFQjCNE4nvDn7fzkV_S4emQyzV7YLNGvdg>
>  could
> do the trick also. I'll have a look at it. Thanks Patrik.
>
> I'll try to post an update here.
>
> On Thursday, August 14, 2014 10:05:17 AM UTC-3, Patrik Nordwall wrote:
>
>> Hi,
>>
>>
>> On Thu, Aug 14, 2014 at 8:05 AM, misael neto <[email protected]> wrote:
>>
>>> Hi all,
>>>
>>> I was thinking about the following scenario:
>>>
>>> Suppose there's Job that's executed every now and again In the cluster,
>>> maybe a database cleanup, a message queue lookup, whatever... But you have
>>> a large cluster and you MUST have ONLY ONE node executing the job.
>>>
>>> I would be nice to let the cluster decide on it's own, which one of the
>>> nodes should run the job. Even better would be to let the cluster recognise
>>> that node that was executing the Job just crashed and there's no node doing
>>> the durty work and proactively promote a node for the task.
>>>
>>
>> All that is provided as the Cluster Singleton
>> <http://doc.akka.io/docs/akka/2.3.5/contrib/cluster-singleton.html>.
>>
>>
>>>
>>> There's lots of ways to implement this but I think that node roles fits
>>> very well with this problem. My question is, in order to promote a node and
>>> give it a new Role, do I have to "restar/reconect" the member? Or can it be
>>> updated at runtime?
>>>
>>
>> No, it is immutable.
>> For more dynamic information you would have to use something like
>> akka-datareplication <https://github.com/patriknw/akka-datareplication>.
>>
>> /Patrik
>>
>>
>>>
>>> Thanks.
>>>
>>> --
>>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>>> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/
>>> current/additional/faq.html
>>> >>>>>>>>>> Search the archives: https://groups.google.com/
>>> group/akka-user
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Akka User List" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>>
>>> Visit this group at http://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>>
>> Patrik Nordwall
>> Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
>> Twitter: @patriknw
>>
>>   --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Patrik Nordwall
Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
Twitter: @patriknw

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to