--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>>>>>>> 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+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/groups/opt_out.
Patrik Nordwall
Typesafe - Reactive apps on the JVM
Twitter: @patriknw
Every club needs to have a founding member.
On Mon, Oct 28, 2013 at 11:30 PM, João Alves <joaoq...@gmail.com> wrote:
Okay. But it raises a question: If I'm building a blind cluster (i.e. no node knows how many nodes are in the system nor their addresses), how am I supposed to do that?If I join every initialized node with itself I get this message when I'm trying to join it to another node:
[INFO] [10/28/2013 22:24:21.953] [inesc-aa4all-gateway-akka.actor.default-dispatcher-4] [Cluster(akka://inesc-aa4all-gateway)] Cluster Node [akka.tcp://inesc-aa4all-gat...@127.0.1.1:43229] - Trying to join [akka.tcp://inesc-aa4all-gat...@127.0.1.1:43379] when already part of a cluster, ignoring
The reason is to make sure that you can't form islands of isolated nodes.You can also use the Cluster(system).joinSeedNodes and programmatically construct the list of seed nodes as described in the documentation: http://doc.akka.io/docs/akka/2.3-M1/scala/cluster-usage.html#Joining_to_Seed_NodesThen the first seed node is special, for the very same reason./Patrik
On Tue, Oct 29, 2013 at 3:26 AM, João Alves <joaoq...@gmail.com> wrote:
Ok, I see your point. It's solved. Thank you!
On Monday, October 28, 2013 10:39:03 PM UTC, √ wrote:
Every club needs to have a founding member.
On Mon, Oct 28, 2013 at 11:30 PM, João Alves <joaoq...@gmail.com> wrote:
Okay. But it raises a question: If I'm building a blind cluster (i.e. no node knows how many nodes are in the system nor their addresses), how am I supposed to do that?If I join every initialized node with itself I get this message when I'm trying to join it to another node:
[INFO] [10/28/2013 22:24:21.953] [inesc-aa4all-gateway-akka.actor.default-dispatcher-4] [Cluster(akka://inesc-aa4all-gateway)] Cluster Node [akka.tcp://inesc-aa4all-gatewa...@127.0.1.1:43229] - Trying to join [akka.tcp://inesc-aa4all-gatewa...@127.0.1.1:43379] when already part of a cluster, ignoring
--
Yes, I get the point but I think it should be possible to "merge" clusters. I mean:Node 1 is connected with Node 2, 3 and 4.Node 5 is in a cluster with itself and is discovered by one of the above nodes. It should be possible to merge clusters. It just makes sense to me.
Node 1 starts and clusters with itself (29 Oct 2013, 15:28:05).Node 2 starts and clusters with itself (29 Oct 2013, 15:28:07).Node 3 starts and clusters with itself (29 Oct 2013, 15:28:08).Node 4 starts and clusters with itself (29 Oct 2013, 15:28:08).Node 5 starts and clusters with itself (29 Oct 2013, 15:28:10).
- Node 1 discovers Node 2. The first created/larger cluster is maintained. In this case, the size of both clusters is 1, so the first created is maintained. Node 2 disconnects from the cluster with itself and joins Node 1.
- Node 3 discovers Node 4. Since node 3 and 4 have the same size and timestamp, both nodes should send a (multi-cast?) message and the first to arrive is maintained, the rest of the nodes should join it.
@ViktorYes, I'm aware that Akka Cluster does not use multi-cast. Let me be clear here: the discovery part is up to the programmer. You can just assume that is a blackbox and you just get the available nodes from there. It does not influence the problem here.
Questions such as "who becomes the leader?" could be solved with leader election algorithms, right? Anyway, I think the Akka Cluster documentation should be more clear about this.