Re: [akka-user] [akka-http] Customizing exception messages for async tasks in routes

2016-04-19 Thread Konrad Malawski
That's what ExceptionHandler is for in Akka HTTP: more docs here:  http://doc.akka.io/docs/akka/2.4.4/scala/http/routing-dsl/directives/execution-directives/handleExceptions.html#description Happy hakking! --  Konrad `ktoso` Malawski Akka @ Lightbend On 20 April 2016 at 00:49:49, Edmondo Porcu

[akka-user] [akka-http] Customizing exception messages for async tasks in routes

2016-04-19 Thread Edmondo Porcu
Hello, I have a route like the following post{ complete { (actor ? msg).mapTo[AResult] } } When my future fails, a generic exception is returned to the client and I would like to have more control on that. Recovering the future with a error message doesn't seem a good idea because it

[akka-user] Re: [akka-stream] Stream item error propogation and akka-http

2016-04-19 Thread Arron Norwell
One pretty easy answer to this seems to be to use Http().singleRequest(...) to construct my own flow (using mapAsyncUnordered) with the behaviour I desire. I was concerned that singleRequest might have worse performance than the flow-based interface, but after a look at the source code, they

[akka-user] How to remotely start a Akka actor: akka-in-action\chapter-remoting

2016-04-19 Thread Scalaian
By following Akka documents, I can start two actors(front-end and back-end) on the same machine, and they can talk to each other. However, when I tried to deploy back-end actor to another machine(Linux), I hit error of start remoting: Multiple main classes detected, select one

Re: [akka-user] Re: ActorSystem.terminate() couldn't fully terminate the system

2016-04-19 Thread Yan Pei
Endre, This is good to know. Could you please let me know how to configure it as daemonic? Thanks, Yan On Tuesday, April 19, 2016 at 8:01:45 AM UTC-5, drewhk wrote: > > Threads from the pool are released after a timeout. You can make them > daemonic if you want via configuration. > > -Endre >

Re: [akka-user] Re: What config affects the number of threads for an ActorSystem?

2016-04-19 Thread Steve Rehrauer
Ahhh, I see. Thanks for your patience, that helps. On Tue, Apr 19, 2016 at 10:26 AM, Johan Andrén wrote: > It was more this specific section of the docs I was hoping you'd notice: > > >1. # Configuration for the fork join pool >2. fork-join-executor { >

[akka-user] Connect two TCP sockets

2016-04-19 Thread Mike Limansky
Hi all, I'm very new to Akka Streams, trying to get the ideas behind the streams and how to use them. I'd like to make a very simple thing: to connect two TCP server sockets, but I get stuck with that. If I have server and client connections, it more or less clear for me: val conn =

[akka-user] [akka-stream] Stream item error propogation and akka-http

2016-04-19 Thread Arron Norwell
Hi, I am trying to use akka-http's host-level client-side Http().cachedHostConnectionPool flow as part of a larger stream for which items in the stream may have previously failed, and so it wouldn't make sense to send an HTTP request. In other words, I really want a flow with type something

Re: [akka-user] Re: What config affects the number of threads for an ActorSystem?

2016-04-19 Thread Johan Andrén
It was more this specific section of the docs I was hoping you'd notice: 1. # Configuration for the fork join pool 2. fork-join-executor { 3. # Min number of threads to cap factor-based parallelism number to 4. parallelism-min = 2 5. # Parallelism (threads) ... ceil(available

Re: [akka-user] Re: What config affects the number of threads for an ActorSystem?

2016-04-19 Thread Steve Rehrauer
Thanks, Johan. I did see that page, but if I understand the dispatcher config, the actor name you can define can't be a pattern? We define many actors without simple names like "myActor". In order to define a dispatcher for these actors, I presume I'd need to make a code change to use that

[akka-user] Question: Regarding reactive streams and threads / dispatcher

2016-04-19 Thread Thomas Zimmer
Hey guys, I have an application where I expect many clients to connect to via TCP. So my design is the following. I have these two actor-types: * Server-Actor - Accepts incoming TCP connections (Uses Reactive TCP - Stream). Per incoming request i spawn a new "ClientSession" - actor instance.

Re: [akka-user] Re: ActorSystem.terminate() couldn't fully terminate the system

2016-04-19 Thread Endre Varga
Threads from the pool are released after a timeout. You can make them daemonic if you want via configuration. -Endre On Mon, Apr 18, 2016 at 10:02 PM, Yan Pei wrote: > John, > > After I upgrade AKKA to 2.4.4 and AKKA persistence cassandra to 0.12, > the system.terminate()

Re: [akka-user] Re: Akka HTTP performance for short lived connections

2016-04-19 Thread Patrik Nordwall
Great, thanks for the update. We have other ideas for how to improve this and will get to it, eventually. There was a quick attempt previously, but it had to be abandoned because of more urgent things. If someone would like to take a stab at it this might be a good starting point:

Re: [akka-user] Re: Akka HTTP performance for short lived connections

2016-04-19 Thread Adam
Small update - disabling auto fuse, or pre-fusing (with & without auto fusing) has an effect (BTW I could not find a way to do this with the java). Performance is improved by up to 50%. However, it's still not in the same order of magnitude as other libraries. It's still at least 1 second for