Re: [akka-user] Akka http load balancer

2015-05-28 Thread zergood
=AFQjCNFk7u2ednXynJOI5ubpUSi7sKawQA). That flattens out the Futures and you get responses instead. That also makes Balance actually aware of response times. OTOH I don't think performance wise akka-http is currently up to the task of being a balancer. -Endre On Wed, May 27, 2015 at 1:21 PM, zergood zergoo

[akka-user] Akka http load balancer

2015-05-27 Thread zergood
Hello! I have a task to develop a http balance loader for my 2 servers. Here is my qucik and very dirty implementation https://gist.github.com/zergood/e705cd6ce4cfec47c0a5. The main problem with it is performance, this solution is slower than my single server. What is the reason

[akka-user] Akka http vs Spray performance

2015-05-27 Thread zergood
I've done little benchmarks to compare spray and akka-http performance. I use default jvm and akka settings. So you can see that there is an significant performance difference between it. code: spray https://gist.github.com/zergood/18bae0adc2e774c31233. akka-http https://gist.github.com

Re: [akka-user] Akka http vs Spray performance

2015-05-27 Thread zergood
performance in later versions though. We basically refactored streams API in roughly every second release, so we are currently happy that the current API looks usable and most of the bugs are ironed out. -Endre On Wed, May 27, 2015 at 1:44 PM, zergood zergoo...@gmail.com javascript

Re: [akka-user] StreamTcp exceptions handling

2015-04-07 Thread zergood
:23 PM, zergood zergoo...@gmail.com javascript: wrote: Hello! My server side: def update: Iterator[ByteString] lazy val binding = StreamTcp(system).bind(address, idleTimeout = 20.seconds) def start(): Future[Unit] = { val firstCompleted = Promise[Unit]() val

Re: [akka-user] StreamTcp exceptions handling

2015-04-07 Thread zergood
:47 PM, zergood zergoo...@gmail.com javascript: wrote: Thank you for your answer. But If I use onCompleteSink after connection flow, future will not be completed successfully however data will be downloaded by client. The only reason for that could be that the client does not close

Re: [akka-user] StreamTcp exceptions handling

2015-04-07 Thread zergood
Is there an api for closing client connection? вторник, 7 апреля 2015 г., 16:40:46 UTC+3 пользователь Akka Team написал: On Tue, Apr 7, 2015 at 3:38 PM, zergood zergoo...@gmail.com javascript: wrote: Here is my client code: def downloadUpdate(address: InetSocketAddress

[akka-user] StreamTcp exceptions handling

2015-04-06 Thread zergood
Hello! My server side: def update: Iterator[ByteString] lazy val binding = StreamTcp(system).bind(address, idleTimeout = 20.seconds) def start(): Future[Unit] = { val firstCompleted = Promise[Unit]() val foreachConnection = ForeachSink[IncomingConnection] { connection =

[akka-user] Re: Problem with akka tcp streams

2015-03-23 Thread zergood
I had found the issue. The reason was frame coding. I supposed that every message is send in single tcp packet but it is not. Now I have implemented frame coding/decoding and everything is fine. Thank you for answers! четверг, 19 марта 2015 г., 15:54:46 UTC+3 пользователь zergood написал: Hi

[akka-user] Problem with akka tcp streams

2015-03-19 Thread zergood
Hi! I want to stream file lines through tcp to server. Here is the code: class StreamingTcpActor(remoteAddress:InetSocketAddress, system: ActorSystem){ implicit val actorSystem = system implicit val materializer = ActorFlowMaterializer() val connection =