Duh, my bad. I keep mistaking the use of oldest and leader in this somehow.
Thanks for the correction Patrik!

On 15 Aug 2016 13:50, "Patrik Nordwall" <patrik.nordw...@gmail.com> wrote:

>
>
> On Mon, Aug 15, 2016 at 11:27 AM, Konrad Malawski <
> konrad.malaw...@lightbend.com> wrote:
>
>> Hi Yutao,
>> look at the return type – Option, so it's a single element.
>> It returns the leader of a given role (role == multiple nodes, 1 of them
>> is the leader).
>> I.e. it would host the the Singleton if it were constrained to this role.
>>
>
> That is not correct. Singleton runs on the oldest node. The leader is
> simply the node (with given role) with the lowest address with some
> additional rules. It's not at all as strict as the singleton. It's mostly
> used to manage the cluster membership and applications typically use the
> singleton instead of the leader.
>
> /Patrik
>
>
>
>
>>
>> --
>> Konrad `ktoso` Malawski
>> Akka <http://akka.io> @ Lightbend <http://lightbend.com>
>>
>> On 15 August 2016 at 04:23:26, Yutao Shuai (szqs...@gmail.com) wrote:
>>
>>
>> <https://lh3.googleusercontent.com/-tZtLqoK9VUY/V7EnCA2ZVKI/AAAAAAAAAL0/Gm66R8FjZqIZOmBWrT8b29IL8PdUJboCwCLcB/s1600/TT%25E6%2588%25AA%25E5%259B%25BE%25E6%259C%25AA%25E5%2591%25BD1%25E5%2590%258D.jpg>
>>
>> What this function means? Select a nodes with specfic roles as the
>> cluster leader or every roles has its leader?
>> --
>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/c
>> urrent/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 akka-user+unsubscr...@googlegroups.com.
>> To post to this group, send email to akka-user@googlegroups.com.
>> Visit this group at https://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/c
>> urrent/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 akka-user+unsubscr...@googlegroups.com.
>> To post to this group, send email to akka-user@googlegroups.com.
>> Visit this group at https://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
>
> Patrik Nordwall
> Akka Tech Lead
> Lightbend <http://www.lightbend.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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to