[akka-user] Creating multiple instances of ActorSystem

2016-09-21 Thread Mark Kaberman
I am wondering if it is possible to create multiple instances of ActorSystem within a single JVM? I create my systems as ActorSystem actorSystem = ActorSystem.create("mySystem", ConfigFactory.load ().getConfig("mySystem")); and when I call startTime() of each system created it seems to

Re: [akka-user] out-of-the-box support for json serialization for akka persistence?

2016-09-21 Thread Justin du coeur
A few general reactions (personally, I'm using Kryo over Cassandra, so I can't address the direct questions): Keep in mind that json is a relatively bulky serialization format -- it's going to take rather more disk space than more typical options like protobuf. In *general*, the serialization

[akka-user] out-of-the-box support for json serialization for akka persistence?

2016-09-21 Thread Tim Pigden
Hi Reading http://doc.akka.io/docs/akka/2.4.10/scala/persistence-schema-evolution.html and thinking about what we currently do, I've concluded that I'd like to serialize my events as json. The article suggests I should check the list of plugins to see which specifically support json. But I

Re: [akka-user] Creating multiple instances of ActorSystem

2016-09-21 Thread Justin du coeur
On Wed, Sep 21, 2016 at 10:24 AM, Mark Kaberman wrote: > I am wondering if it is possible to create multiple instances of > ActorSystem within a single JVM? > Possible, yes, but it's rarely a good idea -- ActorSystems are very heavyweight, and there are almost no

[akka-user] Memory Bounding Akka Streams

2016-09-21 Thread Dagny T
Just wanted to check with folks if I had the correct implementation for how to protect from blowing up memory when working with Akka Streams. I've merged a Lightbend Blog post's code, with the latest API changes for Akka v2.4.9, and the latest documentation about buffered streams in the

[akka-user] How to configure cluster for two machines

2016-09-21 Thread Gerard W
I'm using Akka 2.3.15 (java) and I'm trying to get a cluster with two members in two different hosts. Everything runs fine when I start the two nodes on a single machine, but then when I try to start up the second node on a different machine, it keeps getting "Association with remote system

Re: [akka-user] On cluster node failure is there an automatic way to recover cluster shard persistent actors in the failed node to other node?

2016-09-21 Thread Patrik Nordwall
Automatic startup on other node is how it is supposed to work, and we have tests for it. How do you down the dead node? /Patrik mån 19 sep. 2016 kl. 22:00 skrev Ajmal Babu : > Working on AKKA persistence with cluster sharding and the flag >

Re: [akka-user] out-of-the-box support for json serialization for akka persistence?

2016-09-21 Thread Patrik Nordwall
For Lagom I wrote json serializer that is using Jackson. You can look at it for inspiration. It's stored in Cassandra as bytes, but how it's stored is less important as far as I can see. /Patrik ons 21 sep. 2016 kl. 17:58 skrev Tim Pigden : > Hi Justin > Thanks for the

[akka-user] Managing Lifetimes for Http and WebSocket Connections

2016-09-21 Thread Dagny T
I had taken code from the Akka Documentation about handling WebSocket connections server-side with Akka Streams; and was able to take the essentials of that to connect to a simple Javascript Client to send data to the Server, augment it on Server, then echo it back to the Client. However, I

Re: [akka-user] Creating multiple instances of ActorSystem

2016-09-21 Thread Patrik Nordwall
It's fine to create more than one in the same jvm. It can be useful for tests. Be careful to not pass ActorRef instances in a way that would not be possible if the ActorSystems were in different jvms. Only pass them with messages. Locate them initially with actorSelection. /Patrik ons 21 sep.

[akka-user] Akka FSM, persistence and timeouts

2016-09-21 Thread Eugene Dzhurinsky
Hello all! I have to create the simple workflow execution engine, that supports timeouts in its states. The sample made-up definition and the sequence of the states could be as following: 1) Send the confirmation e-mail to the customer *once* 2) Await the confirmation event for 24 hours 3) If

Re: [akka-user] Scala Akka Alignment

2016-09-21 Thread Endre Varga
Also, why not the latest version 2.4.10? On Wed, Sep 21, 2016 at 1:19 AM, Konrad Malawski < konrad.malaw...@lightbend.com> wrote: > You can see which version of Scala an Akka artifact is released for by > looking at the artifact names: >

Re: [akka-user] [Akka Stream] Happens-before relation and runForEach

2016-09-21 Thread Viktor Klang
Technically I think the solution holds water, there are appropriate barriers in place. (multi-materialization aside) However, as mentioned, fold() would be a much cleaner, safer and maintainable solution. -- Cheers, √ On Sep 21, 2016 07:05, "Roland Kuhn" wrote: >

Re: [akka-user] How to configure cluster for two machines

2016-09-21 Thread Viktor Klang
You're setting the port to 0 but are trying to connect to 2552? -- Cheers, √ On Sep 21, 2016 20:29, "Gerard W" wrote: > I'm using Akka 2.3.15 (java) and I'm trying to get a cluster with two > members in two different hosts. Everything runs fine when I start the two >

[akka-user] How to manage Fault-Tolerance Complexity for Akka Actors with Streams

2016-09-21 Thread Dagny T
I had found a good blog about the basics of the Akka Actor Model; and everything looked cool. However, I then started following up to look at the Akka Docs for information about Best Practices to handle the complexities of distributed Fault-Tolerance. At the moment; the options for handling