[akka-user] akka-stream: How to define a Processor in Java

2016-04-12 Thread Guofeng Zhang
Hi, I am learning akka-stream, so I want to understand the low-level detail. I found the following post is very useful for my case: http://bryangilbert.com/blog/2015/02/04/akka-reactive-streams/ In this post, the processor is defined in Scala as the following: class DoublingProcessor extends Acto

[akka-user] Akka recovery mechanism

2016-04-12 Thread Amruta
Does Akka use persistence id to get records from journal during recovery? Or does it retrieve all the records and then process? -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >>

[akka-user] Akka Http Client handling 'Connection: close' and 'Transfer-Encoding: chunked'

2016-04-12 Thread csham
I'm using Akka Http Client 2.4.3 to invoke an API. I suspect the combination of 'Connection: close' and 'Transfer-Encoding: chunked' causing the databytes never materialized. The raw response from the API as captured from curl is: HTTP/1.1 200 OK Date: Tue, 12 Apr 2016 18:13:13 GMT Server: Ap

[akka-user] Re: How to upgrade a mutable stateful Akka application in product without downtime ?

2016-04-12 Thread Paul Cleary
I have a somewhat similar issue I am dealing with. Our volume requirements aren't enormous, so I have separated processing of commands into two states 1. Save the command in an external database in a "Pending" status 2. Process the command. 3. Update the command to be completed when it is done.

Re: [akka-user] Diffing streams

2016-04-12 Thread Richard Rodseth
Not a very well thought out question on my part :) I guess I'm picturing something like two infinite streams A and B where rather than ending, they'd keep emitting a dummy "NoValue" element. Sort of like Option.getOrElse. A way to make a finite stream infinite. Then comparison (in a zipped stream)

Re: [akka-user] Split Brain?

2016-04-12 Thread Paul Cleary
Thanks, yea, guess it makes sense to have each member auto-down themselves... "If my cluster doesn't reach quorum size, then stop me" > > -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >>

[akka-user] Re: How to upgrade a mutable stateful Akka application in product without downtime ?

2016-04-12 Thread Chelios
That's a great idea. A bit of work to do there ... but I will give this a shot. Thank you :) On Tuesday, April 12, 2016 at 8:36:04 PM UTC+10, Guido Medina wrote: > > What I meant by distributed data was "in-memory akka distributed data > extension" > > On Tuesday, April 12, 2016 at 11:35:01

Re: [akka-user] Split Brain?

2016-04-12 Thread Patrik Nordwall
On Tue, Apr 12, 2016 at 4:00 PM, Paul Cleary wrote: > Thanks Patrik... > > So, if I just put all nodes in the seed node list, then there would be no > split brain on start, did I follow that correctly? > Yes, and make sure that the same node is at the first position in the list (that's why I sai

Re: [akka-user] Split Brain?

2016-04-12 Thread Paul Cleary
Thanks Patrik... So, if I just put all nodes in the seed node list, then there would be no split brain on start, did I follow that correctly? I planned on implementing a simple resolver based on a static quorum size. Seems pretty simple to just have a cluster singleton that listens to cluster

[akka-user] activator-akka-distributed-workers-java - problem with master failover

2016-04-12 Thread Atul Deopujari
Hi I am yet unable to get the distributed-workers example to work for the case when the lead master is terminated. To eliminate any effects of any local code changes, I did a git clone of https://github.com/typesafehub/activator-akka-distributed-workers-java.git and worked on the code in the mas

[akka-user] Re: How to upgrade a mutable stateful Akka application in product without downtime ?

2016-04-12 Thread Guido Medina
What I meant by distributed data was "in-memory akka distributed data extension" On Tuesday, April 12, 2016 at 11:35:01 AM UTC+1, Guido Medina wrote: > > When shutting down your old actor, send its latest state to some > distributed data, when loading the actor check the state at that > distrib

[akka-user] Re: How to upgrade a mutable stateful Akka application in product without downtime ?

2016-04-12 Thread Guido Medina
When shutting down your old actor, send its latest state to some distributed data, when loading the actor check the state at that distributed data repository. The tricky part is if messages are sent to the old actor after it got poisoned, then you will have to drain its mailbox to your distribut

Re: [akka-user] Akka streams: stage that combines consecutive elements

2016-04-12 Thread Arno Haase
Great idea, thanks for pointing it out! Am 12.04.2016 um 11:37 schrieb Roland Kuhn: > Well, you could also concat an EOF marker and use that to flush … > >> 12 apr 2016 kl. 11:33 skrev Endre Varga > >: >> >> No, for that you need to write a custom stage. >> >> -E

Re: [akka-user] Akka streams: stage that combines consecutive elements

2016-04-12 Thread Endre Varga
True, I missed that option. On Tue, Apr 12, 2016 at 11:37 AM, Roland Kuhn wrote: > Well, you could also concat an EOF marker and use that to flush … > > 12 apr 2016 kl. 11:33 skrev Endre Varga : > > No, for that you need to write a custom stage. > > -Endre > > On Tue, Apr 12, 2016 at 11:01 AM, A

[akka-user] How to upgrade a mutable stateful Akka application in product without downtime ?

2016-04-12 Thread Chelios
Hey Guys, Suppose I have an Akka application which always keeps the state of all the actors in memory and commands are flowing through which are modifying the state of the Actors constantly and I want to upgrade my application code to a newer version. How do I do that without any downtime ? T

Re: [akka-user] Akka streams: stage that combines consecutive elements

2016-04-12 Thread Roland Kuhn
Well, you could also concat an EOF marker and use that to flush … > 12 apr 2016 kl. 11:33 skrev Endre Varga : > > No, for that you need to write a custom stage. > > -Endre > > On Tue, Apr 12, 2016 at 11:01 AM, Arno Haase > wrote: > Hi Endre, > > thanks

Re: [akka-user] Akka streams: stage that combines consecutive elements

2016-04-12 Thread Endre Varga
No, for that you need to write a custom stage. -Endre On Tue, Apr 12, 2016 at 11:01 AM, Arno Haase < arno.ha...@haase-consulting.com> wrote: > Hi Endre, > > thanks for the reply. Is there any way I can get statefulMapConcat to > emit cached data after upstream is completed? > > - Arno > > Am 12.

Re: [akka-user] Akka streams: stage that combines consecutive elements

2016-04-12 Thread Arno Haase
Hi Endre, thanks for the reply. Is there any way I can get statefulMapConcat to emit cached data after upstream is completed? - Arno Am 12.04.2016 um 09:27 schrieb Endre Varga: > Hi Arno, > > statefulMapConcat is likely what you need. If that does not work, then > build a custom stage. > > -En

Re: [akka-user] Re: Akka HTTP Websockets Java with Actor

2016-04-12 Thread Alan Klikic
Hi all, any feedback on this? Thank you in advance. Br, Alan Dana petak, 1. travnja 2016. u 15:53:17 UTC+2, korisnik Alan Klikic napisao je: > > Hi Endre, > > thank you for the info. > > All, > > I tested this example and noticed that AnActor is instanced only ones when > Router.createRoute is

Re: [akka-user] Akka streams: stage that combines consecutive elements

2016-04-12 Thread Endre Varga
Hi Arno, statefulMapConcat is likely what you need. If that does not work, then build a custom stage. -Endre On Mon, Apr 11, 2016 at 8:09 PM, Arno Haase wrote: > I have a Source of element type A, and I am looking for a way to build a > stage combining several of them into elements of type B.

Re: [akka-user] Diffing streams

2016-04-12 Thread Viktor Klang
What does keep going mean? On Mon, Apr 11, 2016 at 11:42 PM, Richard Rodseth wrote: > I need to compare two streams of timeseries data. I thought of doing > something with zip() but in the case where the data is missing in one > stream at the beginning or end, I'd like to keep going. Of course,