Hi Jakub,
You can't do that with configuration, but with programmatic deployment
http://doc.akka.io/docs/akka/2.3.2/scala/remoting.html#Programmatic_Remote_Deployment

The address is something you can get from the Member information in cluster
events.

Regarding the heap memory metrics you might be able to grab that from the
cluster metrics:
http://doc.akka.io/docs/akka/2.3.2/scala/cluster-usage.html#Subscribe_to_Metrics_Events

Regards,
Patrik


On Sun, Apr 27, 2014 at 7:48 PM, Jakub Kahovec <[email protected]>wrote:

> Hi there,
>
> I'd like to ask if it's possible to create and deploy an actor (one or
> more on each node, each with a different constructor arg i.e server name)
> in a cluster without a router. Something like with remoting where I can
> only specify that for a certain actor path I want it to be created remotely
> on a given address, but in the cluster I would only specify to create and
> deploy it somewhere on a cluster node with a certain role which has i.e.
> most memory available.
> I have tried several configuration but without any success.
>
> I 'd like to use something like:
>
> deployment {
>       /myClusterActorOnePerServer {
>
>
>    -          router = adaptive
>    -          metrics-selector = heap
>
>          cluster {
>
> enabled = on
> user-role = backend
>  allow-local-routees = on
> }
>
>
>       }
> }
>
> and then, when creating an actor, I would write
>
> val serverDataFetcher = 
> context.actorOf(ServerDataFetcher.props("serverName"), 
> "myClusterActorOnePerServer")
>
> which would grab the configuration from the config and create and deploy the 
> actor somewhere in the cluster.
> Allowing to have for instance two data fetching actors on one node and one 
> data fetcher on a different node, based on memory available
> on each node at the time of actors creation.
>
> Any help or advices appreciated.
>
> Thanks
>
> Jakub
>
>
>  --
> >>>>>>>>>> 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
JOIN US. REGISTER TODAY! <http://www.scaladays.org/>
Scala <http://www.scaladays.org/>
Days <http://www.scaladays.org/>
June 16th-18th, <http://www.scaladays.org/>
Berlin <http://www.scaladays.org/>

-- 
>>>>>>>>>>      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