[akka-user] How to transfer files between a local and remote actor

2016-04-24 Thread Raymond Guo
Hi,everyone: sorry that I'm just new to akka. I need to transfer some potentially large file between my remote actors asynchronously. Can I just wrap the file object in my message and tell it to my remote actor? Or should I use the underlying java thread to perform socket stream independently

[akka-user] migrating from an earlier version of akka-streams ..

2016-04-24 Thread debasish
Hi - I am trying to migrate some akka-streams code from an earlier version (akka-stream-experimental 1.0.RC4) .. please have a look at the following .. /** * Create multiple streams out of a single stream. The stream "transactions" is being * demultiplexed into many streams split by account n

Re: [akka-user] Better way to use CompletableFuture in an Actor

2016-04-24 Thread Konrad Malawski
I'm assuming you're using Java, please tell about this explicitly when asking questions :-) CompletionStage<...> futureResponse = http client calls thingy akka.pattern.PatternsCS.pipe(futureResponse, context.dispatcher).to(self()); set a flag that you're waiting or become() into such state, for a

[akka-user] Better way to use CompletableFuture in an Actor

2016-04-24 Thread Guofeng Zhang
Hi, In an actor, I use WSClient (a class from playframework) to access remote server, which returns a CompletionStage. For my case, the actor should not process next message before the response is arrived and processed by the actor. Currently I use CompletableFuture.get() to block the actor's th

Re: [akka-user] Spray-json support and FromResponseUnmarshaller

2016-04-24 Thread Konrad Malawski
Hi there, the Unmarshaller type you wrote is correct, however the infrastructure is async in any case – inside withMaterialized you return a Future. implicit val um: Unmarshaller[Future[String], String] = ??? val eventualString: Future[String] = Unmarshal(Future("")).to[String](um, system.dispat

Re: [akka-user] Is it possible to define a stream for set difference?

2016-04-24 Thread Konrad Malawski
What if the Sources are infinite? It's not trivial to solve in generic setting - as you never know if the millionth element from B wouldn't invalidate the first element from A, so you have to keep information around for the entire streams and only once they complete you can signal the new stream

[akka-user] Is it possible to define a stream for set difference?

2016-04-24 Thread Guofeng Zhang
Hi, I have two sources, suppose source A is [A, B, C, X, Y, Z]. Source B is [A, B, D, W, Y, Z]. Is it possible to define a stream that produce [C, X]? Thanks. Guofeng -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/

[akka-user] Re: Java lambda FSM & TestKit example

2016-04-24 Thread leonidb
Persistent FSM test: https://github.com/akka/akka/blob/v2.4.4/akka-persistence/src/test/java/akka/persistence/fsm/AbstractPersistentFSMTest.java PersistentFSM has some additional features, but some test examples can fit your need (fsmFunctionalTest) or give you an idea how to right your tests. O