[akka-user] Custom GraphStage with Java Future

2016-02-23 Thread Gary Struthers
I'm calling a 3rd party Java library that returns a Java Future from my GraphStageLogic onPush(). I want the future to complete before calling pull(in). Simply blocking with Java Future's get(...) works. So do I really need to do this within a blocking-dispatcher? If so, how do I setup onPush()

Re: [akka-user] Re: Using local file system to store Actor's state ?

2016-02-23 Thread Chelios
Hi Endre, Never heard of LevelDB before. But It sounds perfect for what I need. Thank you :) On Monday, February 22, 2016 at 11:13:06 PM UTC+11, Akka Team wrote: > > Hi Chelios, > > Isn't the LevelDB plugin enough for your use case then? No fuss, no > connections, no distribution, and it is q

[akka-user] What makes an Actor crash ?

2016-02-23 Thread Chelios
Hi Guys, What makes an Actor crash ? Is it in the developer's code where the developer may have forgotten to handle an Exception ? I am trying to understand Akka supervision and previously I always used the Try catch blocks for the following situations - Critical IO failure situations - Excepti

Re: [akka-user] Why does this simple Akka Streams program never terminate?

2016-02-23 Thread Endre Varga
Also, the stream itself runs in a separate thread than main(), so runForeach returns before the stream has been processed. -Endre On Tue, Feb 23, 2016 at 6:18 PM, Matthew Adams wrote: > That was it. Good to know. Thanks. > > -matthew > > On Tuesday, February 23, 2016 at 11:13:37 AM UTC-6, Kon

Re: [akka-user] Split bytestring source into several sources

2016-02-23 Thread Kyrylo Stokoz
Hi Endre, Thank you for an answer, i found working for me solution. Which looks like this: I tweak jawn async json parse to be able to handle such json structure in streaming way, so i can convert Source[ByteString] into Source[(String, JValue)], where string is a name of json array. Now i can

Re: [akka-user] Why does this simple Akka Streams program never terminate?

2016-02-23 Thread Matthew Adams
That was it. Good to know. Thanks. -matthew On Tuesday, February 23, 2016 at 11:13:37 AM UTC-6, Konrad Malawski wrote: > > Because Akka uses non-daemonic threads, so it'll keep the app running > until you shut-down the ActorSystem. > > You can do so via: > > import system.dispatcher > s.runFor

Re: [akka-user] Why does this simple Akka Streams program never terminate?

2016-02-23 Thread Konrad Malawski
Because Akka uses non-daemonic threads, so it'll keep the app running until you shut-down the ActorSystem. You can do so via: import system.dispatcher s.runForeach(println).onComplete { _ =>  system.terminate() } --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 23 February 2016 at 18:11

[akka-user] Why does this simple Akka Streams program never terminate?

2016-02-23 Thread Matthew Adams
*NB: posted at http://stackoverflow.com/questions/35583739/why-does-this-simple-akka-streams-program-never-terminate before I thought to post here.* Should be a simple question. I'm using Akka 2.4.2 (contains Akka Streams & HTTP). I expected this Source to complete & the program to terminate

[akka-user] Akka: distributed pubsub. How to stop an unneeded publisher?

2016-02-23 Thread Guy Dawson
Hi, I posted the following on SO, but it hasn't got much love. I'm reposting it here in the hopes someone will be able to answer the question: Using DistributedPubSub, say an actor can subscribe to a publisher which publishes tweets with a certain hashtag. Obviously publishers would have to be

[akka-user] Akka HTTP Websockets Java with Actor

2016-02-23 Thread Guido Medina
Hi, Has anyone been able to write an Akka HTTP websockets server that delegates/relays the established connection to an existing or newly created actor? where messages sent from that connection comes to an actor and messages to another actor? (I'm not sure how is this done behind the scenes if

Re: [akka-user] Re: Can I Pause some Flow In the the akka-stream?

2016-02-23 Thread Akka Team
On Mon, Feb 22, 2016 at 9:48 PM, Jim Hazen wrote: > Isn't a valve just a specialization of a throttle? > You can see it that way. I imagined valve as the generalization of the current throttle, by adding an extra control, but it I think we are talking about the same thing. > > Throttle at infi

Re: [akka-user] Akka remote communication roadmap?

2016-02-23 Thread Guido Medina
Yeah, it seems the way remote was originally designed and coded makes really difficult to migrate which lead my suggestion before to an intermediary solution in order to make it faster and remove a well known JVM garbage emitter (Netty 3) There are at least a couple of successful attempts in mi