[akka-user] ClusterSingleton router location and routing logic

2016-11-28 Thread Shyam kumar Akirala
Hi, We are having several kinds of tasks and we wanted to control the number of actors spawned across the cluster to do a particular task. So we went with having many cluster singleton routers (1000s) in our project. All the routers are sitting on the oldest member of the cluster as mentioned in t

Re: [akka-user] Re: Distributed data

2016-11-28 Thread Justin du coeur
That's all quite common for Cluster Sharding. The notion of Sharding is that, if you set it up correctly, a given identity will always map to a particular Actor on a particular node -- so long as the Cluster itself is consistent, the data for a given room should always exist on at most one live Ac

Re: [akka-user] UnboundedMailbox - One at a Time?

2016-11-28 Thread Viktor Klang
Hi Kevin, this is explained in the following section: http://doc.akka.io/docs/akka/2.4/general/jmm.html#Futures_and_the_Java_Memory_Model On Mon, Nov 28, 2016 at 8:58 PM, Kevin Meredith wrote: > Thanks, Viktor, for that link. > > So, in the following: > >1. class MyActor extends Actor { >

Re: [akka-user] UnboundedMailbox - One at a Time?

2016-11-28 Thread Kevin Meredith
Thanks, Viktor, for that link. So, in the following: 1. class MyActor extends Actor { 2. var state = ... 3. def receive = { 4. case _ => 5. //Wrongs 6. 7. // Very bad, shared mutable state, 8. // will break your application in weird ways 9. Future { state = NewState

Re: [akka-user] UnboundedMailbox - One at a Time?

2016-11-28 Thread Viktor Klang
Hi Kevin, have you read this: http://doc.akka.io/docs/akka/2.4/general/jmm.html ? On Mon, Nov 28, 2016 at 8:44 PM, Kevin Meredith wrote: > Looking at the Mailboxes > > docs, > for the *UnboundedMailbox,

[akka-user] UnboundedMailbox - One at a Time?

2016-11-28 Thread Kevin Meredith
Looking at the Mailboxes docs, for the *UnboundedMailbox, *is it true that an Actor with this mailbox will only read a single message from its mailbox at a time? In other words, if mutating a field with

[akka-user] Re: Distributed data

2016-11-28 Thread Steve Winfield
Hey Rafał, thanks for your response. Yes, but I wasn't sure whether the data is consistent across the cluster and how to create the room only *if it's not existent *(I might not understand it properly). Cheers, Steve Am Montag, 28. November 2016 18:43:26 UTC+1 schrieb Rafał Krzewski: > > Hi St

[akka-user] Re: Distributed data

2016-11-28 Thread Rafał Krzewski
Hi Steve, have you looked at http://doc.akka.io/docs/akka/2.4/scala/cluster-sharding.html? It seems well suited to your use case if I understood it correctly. Cheers, Rafał W dniu poniedziałek, 28 listopada 2016 18:24:23 UTC+1 użytkownik Steve Winfield napisał: > > Hey, > > I'm currently progr

Re: [akka-user] Is there a recommended max number of shard regions in a cluster?

2016-11-28 Thread Patrik Nordwall
start message doesn't make sense, youmus know the identifiers and send va region anyway. stop message would only be best effort, since another may be started right afterwards. Easiest if they passivate themselves after inactivity. mån 28 nov. 2016 kl. 14:12 skrev Justin du coeur : > Hmm. I'll h

Re: [akka-user] Re: Problem with clean shutdown using artery in cluster

2016-11-28 Thread Guido Medina
Last method call in main thread, no other thread needed as it will block until SigTerm is received. On 28 Nov 2016 4:40 p.m., "Marek Żebrowski" wrote: > Guido, how exactly do you use registerShutdownHook(ActorSystem system) ? > Is it last call in application main() > I tried to write something s

[akka-user] Distributed data

2016-11-28 Thread Steve Winfield
Hey, I'm currently programming a room service application which gets a room actor reference from a map (given an id) or creates a new room actor if there is no reference existent. Right now, it works fine because there is only one service. Nevertheless, I want to create a cluster of room servic

[akka-user] Re: Problem with clean shutdown using artery in cluster

2016-11-28 Thread Marek Żebrowski
Guido, how exactly do you use registerShutdownHook(ActorSystem system) ? Is it last call in application main() I tried to write something similar - I created a thread val shutdownThread = new Thread(new Runnable() { override def run() = { new SigIntBarrier().await() application

Re: [akka-user] Is there a recommended max number of shard regions in a cluster?

2016-11-28 Thread Justin du coeur
Hmm. I'll have to defer that one to others -- I haven't done much with wildcarding, so I can't speak to whether that's a significant issue or not... On Mon, Nov 28, 2016 at 2:19 AM, Richard Ney wrote: > Maybe I'm just missing something with addressing messages to actors in a > shared sharding r

Re: [akka-user] Re: Problem with clean shutdown using artery in cluster

2016-11-28 Thread Guido Medina
Hmmm, maybe suggest Aeron guys to add an option to disable shutdown hooks, I know the same is possible for Log4j2 which is why my shutdown code fragment does once Akka system has been terminated. On Mon, Nov 28, 2016 at 11:05 AM, Patrik Nordwall wrote: > Thanks. Please let us know how it goes. W

Re: [akka-user] Akka streams - tripped up by buffers

2016-11-28 Thread Viktor Klang
Sorry for the late response, sounds like you found a solution to your problem! On Wed, Nov 23, 2016 at 12:34 PM, Julian Howarth <10.howa...@gmail.com> wrote: > Is there any value in this approach for anyone else? Quite happy to raise > issues/PR if there is. > > Thanks, > > Julian > > > On Thurs

Re: [akka-user] Re: Problem with clean shutdown using artery in cluster

2016-11-28 Thread Patrik Nordwall
Thanks. Please let us know how it goes. We have noticed all the struggling with those different shutdown sequences and will soon try to improve it. It would be great to collect your findings in issue https://github.com/akka/akka/issues/21537 On Mon, Nov 28, 2016 at 11:53 AM, Marek Żebrowski wrote

[akka-user] Re: Problem with clean shutdown using artery in cluster

2016-11-28 Thread Marek Żebrowski
Thanks! I'll try this approach in my system -- >> 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 t