Hi Tal,
I think you should start out by analysing our akka-sample-cluster
<https://typesafe.com/activator/template/akka-sample-cluster-scala> activator
template,
it has a nice tutorial along with the code, it should get you started with
the basics :-)


   - Since I assume (and hope) the source code will be the same for all
   nodes, then is the difference in behavior (loading different actors and so
   on) only coming from the application.conf file ?

Though that's not a hard requirement, that's often the case.
And of course the differences come from actor interactions - you can
randomly pick 2 nodes to start some actors on them => so they'll be
"different" than the rest of the nodes - it's all pretty dynamic.
Like a crowd of people in different rooms - sending each other text
messages ;-)


   - Do I create a different applicaiton.conf file for each node? what if i
   don't know the number of nodes or their addresses in advance? is there even
   a way to handle that situation ?

Sure, no problem. You don't really need to use seed-nodes anyway. It's just
a simplification if you have a bunch of addresses that you know "will be
there".
You can join a cluster manually - see documentation (read the entire
section, it also covers programmatically joining):
http://doc.akka.io/docs/akka/snapshot/scala/cluster-usage.html#joining-to-seed-nodes


   - If you could point me to any examples of that it would be great! Only
   examples I found were using the same machine with just different ports and
   not actually different machines.

Like I said, try the akka-sample-cluster activator template.
It does not really matter if it's different ports or different machines,
the code will be the same, with the difference of how the different actor
system addresses look like.


On Thu, Jul 17, 2014 at 3:29 PM, Ashvin Nair <nair.ash...@gmail.com> wrote:

> It's not very clean but this is the the most straightforward way I've
> found to get off the ground with it (I've just started using akka as well):
>
>
> http://doc.akka.io/docs/akka/snapshot/scala/remoting.html#programmatic-remote-deployment
>
> Start a generic actor system in a remote node, then in another node define
> a host address to the first node and deploy actors with that address.
>
> On Tuesday, July 15, 2014 4:23:26 PM UTC-4, Tal wrote:
>>
>> Hi, I recently started using Akka and I'm not at a point where I want to
>> take my working actor system and distribute it on a cluster.
>>
>> I have some general questions about getting started with the process
>> (mostly perceptual)
>>
>> I'll start by explaining what i'm trying to do: my system currently has
>> 10 or so actors that are like tree roots, in that they create many children
>> that spawn more children. What i would like to do is basically distribute
>> only those 10 or so "root" actors on several nodes (1 on each node will be
>> ideal but let's say if at a certain time i have less than that number of
>> nodes then just an even distribution). Those "root" actors each do the
>> process alone and don't really ever need to communicate with one another,
>> but I wouldn't want to distribute it to many independent programs because
>> I'd like to be able to just take it as is throw it on any cluster and be
>> able to run.
>> Example: lets say i have actors 6 to run, and i get a cluster of 3 nodes
>> i'd like to be able to run the program and for it to see that there's 6
>> actors to distribute among 3 nodes and run 2 on each.
>>
>> Questions:
>>
>>    - Since I assume (and hope) the source code will be the same for all
>>    nodes, then is the difference in behavior (loading different actors and so
>>    on) only coming from the application.conf file ?
>>    - Do I create a different applicaiton.conf file for each node? what
>>    if i don't know the number of nodes or their addresses in advance? is 
>> there
>>    even a way to handle that situation ? (without creating some sort of 
>> script
>>    to rewrite application.conf when i deploy it) How will I state seed nodes
>>    if i don't know their addresses in advance? (In the examples they usually
>>    have the host address stated in the remote section of application.conf)
>>    - If you could point me to any examples of that it would be great!
>>    Only examples I found were using the same machine with just different 
>> ports
>>    and not actually different machines.
>>
>> 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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Cheers,
Konrad 'ktoso' Malawski
hAkker @ Typesafe

<http://typesafe.com>

-- 
>>>>>>>>>>      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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to