Re: [akka-user] how to use time consuming Future in the akka ask pattern?

2015-08-13 Thread Viktor Klang
you're sending a RequestMessage back instead of a ResponseMessage -- Cheers, √ On 13 Aug 2015 18:12, "Hongwei Liu" wrote: > hi, > > i need to start JVM in the akka actor as below. > > > object TestActor { > > def main(args:Array[String]) = { > > val system = ActorSystem("TestActorSystem")

Re: [akka-user] Re: Acknowledged Streams BidiFlow first stab

2015-08-13 Thread Akka Team
Hi Tim, this is indeed not a simple question—and thereby also a reason for this late response—and my current assessment is that we don’t have enough practical experience to draw a conclusion just yet. Having a working and useful implementation is a good first step, thanks a lot! But we will have t

[akka-user] FSM.Failure semantics

2015-08-13 Thread Jacool
Hello, I am trying to understand why in an FSM the onTermination handler is not called with StopEvent(FSM.Failure,_,_) upon a failure in an event handler. And in general what are the semantics of FSM.Failure? I run a test like this: class AMachine extends FSM[String, String] { startWith("S", "D

[akka-user] how to use time consuming Future in the akka ask pattern?

2015-08-13 Thread Hongwei Liu
hi, i need to start JVM in the akka actor as below. object TestActor { def main(args:Array[String]) = { val system = ActorSystem("TestActorSystem") val requestActor = system.actorOf(Props(classOf[TestActor]), "request-actor") val request = "this is request message" println(

Re: [akka-user] Re: Looking for Code example to create akka.http.javadsl.testkitTestResponse

2015-08-13 Thread 'Johannes Rudolph' via Akka User List
Hi john, glad it works for you. Though, I have to say I don't think I understand your use case completely, but maybe that's because of too much spring in it :) Johannes On Thu, Aug 13, 2015 at 2:30 PM, wrote: > Hi Johannes, > I think I am doing the right thing (at least I hope (-: ) > > Here

Re: [akka-user] Re: Looking for Code example to create akka.http.javadsl.testkitTestResponse

2015-08-13 Thread john . vieten
Hi Johannes, I think I am doing the right thing (at least I hope (-: ) Here is my testing setup: 1) My test class needs to extend "SpringJUnit4ClassRunner" (which mocks a spring-mvn rest server) 2) the called spring controller needs to integrate with a akka-http service And here fore I have

Re: [akka-user] [Akka-Streams] Testing a Partial Flow Graph

2015-08-13 Thread Gabriel Volpe
Hi Viktor, I've been reading the official docs (http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/scala/stream-testkit.html) and researching into the scala docs but it seems there is no way to test neither a FanInShape or a FanOutShape. The examples in the documentation are trivia

Re: [akka-user] [Akka-Streams] Testing a Partial Flow Graph

2015-08-13 Thread Viktor Klang
Hi Gabriel, what did you try and in what way doesn't it do what you expected? On Thu, Aug 13, 2015 at 12:39 PM, Gabriel Volpe wrote: > Hi hakkers! > > I found difficult to test a Partial Flow Graph. I can test the different > single pieces, but not the whole partial flow. I'm separating the flo

[akka-user] [Akka-Streams] Testing a Partial Flow Graph

2015-08-13 Thread Gabriel Volpe
Hi hakkers! I found difficult to test a Partial Flow Graph. I can test the different single pieces, but not the whole partial flow. I'm separating the flows depending on it's functionality and I wish to test every partial flow like a black box. For instance, given the following partial flow:

Re: [akka-user] [Akka 2.1.4] ConsistentHash router and memory issues

2015-08-13 Thread Dima Gutzeit
OMG. I better stop using ConsistentHashing routing then. Bummer. Regards,Dima Gutzeit On Thu, Aug 13, 2015 at 2:38 PM, Akka Team wrote: > Hi Dima, > as far as I can see the implementation is quite wasteful in creating these > ConsistentActorRef wrappers (100K for every message send in your cas

Re: [akka-user] Re: Looking for Code example to create akka.http.javadsl.testkitTestResponse

2015-08-13 Thread Johannes Rudolph
Yes, good point. https://github.com/akka/akka/pull/18201 On the other hand, I wonder why you need to implement TestResponse, john? You should only ever need to implement it if you want to support another kind of testing framework. Is that what you are trying to achieve? To write tests with JUn

Re: [akka-user] Re: akka-http 1.0 RC and SSL and Java

2015-08-13 Thread Johannes Rudolph
Hi Rob, here's some recent testing code that creates and uses certificates that are signed by a custom CA. It doesn't require fiddling with Java's `keytool`. The instructions should work similarly for proper certificates in which case you leave out the CA and "Create server certificate" steps a

Re: [akka-user] Re: akka-http 1.0 RC and SSL and Java

2015-08-13 Thread akkanex
Thanks Will! Am Donnerstag, 13. August 2015 02:28:25 UTC+2 schrieb Will Sargent: > > The SSLContext is responsible for handling the trust store -- you set it > up and pass that into akka-http using HttpsContext.create(sslContext,...). > > How to set up the SSLContext is a bit confusing. There ar

Re: [akka-user] Re: Looking for Code example to create akka.http.javadsl.testkitTestResponse

2015-08-13 Thread Viktor Klang
java.lang.Void? -- Cheers, √ On 13 Aug 2015 09:01, "Akka Team" wrote: > Yes, that is a little unfortunate: the Scala type system allows the > expression of non-termination (the bottom type—Nothing) which Java does not > know about, so this it what happens “under the hood” (i.e. in the sausage >

Re: [akka-user] Actors without side effects (var-decl)

2015-08-13 Thread Akka Team
To answer the last two questions of the OP: using a `var sum: Int` saves one object allocation per processed message, which could be significant depending on the use-case. Due to the duties of `def receive` being to return the initial behavior the Actor you present is structurally what needs to be

Re: [akka-user] Re: Looking for Code example to create akka.http.javadsl.testkitTestResponse

2015-08-13 Thread Akka Team
Yes, that is a little unfortunate: the Scala type system allows the expression of non-termination (the bottom type—Nothing) which Java does not know about, so this it what happens “under the hood” (i.e. in the sausage factory). We might want to change the return type of `fail` from Nothing to Unit