[akka-user] akka http actor per request

2015-11-17 Thread Rafał Kowalski
Hi hakkers, I'm struggling with the same issue trying to port the spray code in https://github.com/NET-A-PORTER/spray-actor-per-request to akka http. It seems that the perRequest method in the PerRequest trait should return a Future[RouteResult] which will be completed in the newly created actor.

[akka-user] Re: Cluster aware consistent hashing pool - works only on leader

2015-11-17 Thread Johan Andrén
Hi Danny, context.actorOf(Props[StatsWorker],"statsWorker") creates a local child actor, to make it a pool from configuration you need to use either context .actorOf(FromConfig.props(Props[StatsWorker]),"statsWorker") or programmatically configure the pool. See the docs for more details:

[akka-user] Re: Cluster aware consistent hashing pool - works only on leader

2015-11-17 Thread Danny Lesnik
Thank you for the response. it looks much better, but now I see that all my three "statsWorker" actors created on the node initiation. Is there any option to start "statsWorker" actors dynamically, for example if I'm sending messages with id range between [1..10] i will have 10 distributed

Re: [akka-user] Akka/Kafka

2015-11-17 Thread Roland Kuhn
Hi Richard, Kafka so far makes a conscious choice to base its operations on consistency, favoring it over availability where that tradeoff is necessary. Due to this design decision Akka Cluster or Distributed Data would not be a good fit—the result would be a different model than what Kafka

[akka-user] Re: Cluster aware consistent hashing pool - works only on leader

2015-11-17 Thread Johan Andrén
You could read up on sharding and see if that is what you're after, I think it could be since you are basically describing that you would have one worker per id rather than distributing messages for M ids over N actors: http://doc.akka.io/docs/akka/2.4.0/scala/cluster-sharding.html On Tuesday,

[akka-user] Re: Cluster aware consistent hashing pool - works only on leader

2015-11-17 Thread Danny Lesnik
Hi, Thank you for your response, as far as I know cluster sharding works only with a persistent actors and now we don't want to persistent actors because our actors are stateless. Can it work with Actor instead of Persistent Actor? Danny. On Tuesday, November 17, 2015 at 11:28:08 AM UTC+2,

[akka-user] Re: Cluster aware consistent hashing pool - works only on leader

2015-11-17 Thread Johan Andrén
Yes, that is just one very nice use case, you can shard regular actors. On Tuesday, November 17, 2015 at 4:19:58 PM UTC+1, Danny Lesnik wrote: > > Hi, > > Thank you for your response, as far as I know cluster sharding works only > with a persistent actors and now we don't want to persistent

Re: [akka-user] Re: [akka-http] java completeWith mapping future

2015-11-17 Thread Patrik Nordwall
The Scala Future API is rather clunky for Java when you get used to Java8 lambas. You can try the scala-java8-compat library and work with CompletionStage instead. Cheers, Patrik On Thu, Nov 12, 2015 at 12:00 PM, Benoit Guillon

Re: [akka-user] Akka Stream and Http 2.0-M1 Released!

2015-11-17 Thread Roland Kuhn
We’re working on the client’s richness as well as the server’s performance, important groundwork was laid in 2.0-M1 in order to get things done within the upcoming weeks. Stay tuned and check out the next milestones :-) Regards, Roland > 16 nov 2015 kl. 22:54 skrev Jim Hazen

[akka-user] Re: Distributed version of Akka streams

2015-11-17 Thread Soumya Simanta
On Tuesday, November 17, 2015 at 5:02:18 PM UTC+5:30, mathe...@sagaranatech.com wrote: > > Today you can use akka streams + kafka to create a distributed system. > This is not a perfect solution but works well. > > Is the basic idea to create akka-streams Flows and deploy them on different

[akka-user] run time change in dispatchers

2015-11-17 Thread Fahimeh Rahemi
Hello every body! Is there any way to change the dispatcher associated to an actor at run time? For example, I have created an actor as follows: getContext().actorOf ( Props.create ( MyClass.class, parameter) .withDispatcher("my-task-pool-dispatcher") , "class1"); During run time, I want to be

Re: [akka-user] Akka/Kafka

2015-11-17 Thread Richard Rodseth
Thanks for the reply, Roland. I have a lot to learn. Exciting times. On Tue, Nov 17, 2015 at 7:43 AM, Roland Kuhn wrote: > Hi Richard, > > Kafka so far makes a conscious choice to base its operations on > consistency, favoring it over availability where that tradeoff is >

[akka-user] Re: CPU-usage and a lot of actors with cluster-systems

2015-11-17 Thread Jim Hazen
Also, the default akka-remoting utilizing Java serialization is dog slow. There are other threads that discuss swapping out the serializer with much faster ones. So if you're doing a lot of cluster sharding, your throughput may be bottlenecked on the remote inter-node IO. -- >>

Re: [akka-user] akka http actor per request

2015-11-17 Thread Richard Rodseth
I ended up breaking down and doing an ask (to a request handler actor) in the route definition. The request handler creates a per-request actor with the requestor as a constructor parameter, and from then on I use no more asks, but pass replyTo in tell messages. So there is not a chain of asks,

Re: [akka-user] Akka-streams TLS-PSK support

2015-11-17 Thread Jim Hazen
Hmm. I'm not an expert here (just use BC for CloudFront). Have you tried keeping your Java 8 SSLContext while combining that with the BC cipher support? Something more like your original, but with the BC ciphers. Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider())

[akka-user] Using a Host Connection Pool in a graph and re-ordering the results

2015-11-17 Thread David Knapp
I'm trying to use an Http pool inside a graph, and the fact that the results of the pool can come out of order is really throwing me off. Is there a way of forcing the pool to return ordered? Or is there some other way of being able to do a graph without deadlocking myself? This is a small

[akka-user] Distributed version of Akka streams

2015-11-17 Thread Soumya Simanta
Is a distributed version of Akka streams planned anytime in the near future? Thanks -Soumya -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >> Search the archives:

[akka-user] Cluster aware consistent hashing pool - works only on leader

2015-11-17 Thread Danny Lesnik
I'm playing with "stats" example to make some kind of POC: and have the following configuration: application.conf: akka.actor.deployment { /singleton/statsService/statsWorker { router = consistent-hashing-pool nr-of-instances = 100 cluster { enabled = on

Re: [akka-user] Play application with http / streams at 2.0-M1 fails to "run".

2015-11-17 Thread Konrad Malawski
Play is not compatible with Akka Streams "2.0-M##" yet - it's a development milestone, not a release you can expect all libs to be ready for already. Please wait until Akka Streams "2.0" is released at which point Play will be updated to work with it. --  Cheers, Konrad 'ktoso’ Malawski Akka @ 

[akka-user] CPU-usage and a lot of actors with cluster-systems

2015-11-17 Thread Flo B.
Hallo everyone, I have a question about CPU-usage and a large number of actors. I'm currently playing with a server-system with 15 machines and each machine has 2x Intel(R) Xeon(R) CPU E5-2450 v2 @ 2.50GH (8 Cores, 16 Threads for each CPU) I also have a measurement client which is one of the