Re: [akka-user] Akka http load balancer

2015-05-27 Thread zergood
Mistake in docs http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/http/client-side/request-level.html

[akka-user] Instrumenting Akka

2015-05-27 Thread Adam
You can take 2 heap dumps a day or more apart and then use Eclipse MAT to compare them (there's a compare basket feature that is very useful in such cases). Actually there's a good chance that even a single heap dump will suffice if the JVM has been running for long enough. Try to use the leak

Re: [akka-user] Configuring Akka to run as a job server using Play framework

2015-05-27 Thread Mark Joslin
Sure, it's probably not explained well. The cluster will consist of API server (s) and the seed nodes. It's this simple: The API server joins the cluster actor system a

[akka-user] [2.3.11] Is akka.persistence production ready?

2015-05-27 Thread Amir Karimi
Hi, I'm going to use akka.persistence in production. Is it ready? What are more stable alternatives? Thanks Amir -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >> Search the

Re: [akka-user] [akka streams] question on some time related use cases

2015-05-27 Thread Jakub Liska
Hi, btw can Stage by stateful? Is R/W from/to this in a PushPullStage thread safe? var state : Map[A,Cancellable] = Map.empty Thanks, Jakub On Friday, January 23, 2015 at 2:42:11 AM UTC+1, Frank Sauer wrote: > > Thanks for the pointers Endre, I’ll explore those ideas. > > Frank > > On Jan 2

Re: [akka-user] Announcement: Opinionated RabbitMQ library using Akka / Reactive Streams

2015-05-27 Thread Tim Harper
> On May 27, 2015, at 07:47, Tal Pressman wrote: > > Hi Tim, > > This looks great - I was just thinking of implementing something like this > myself, so the timing couldn't have been better. ^_^ Glad to hear it! > I do have a couple of questions, though. > > From what I see in AsyncAckingC

[akka-user] Cluster sharded actors never receive messages

2015-05-27 Thread Clay McCoy
I have a single Akka node running local to my machine. It seems to join itself fine. Messages never make it to the sharded actors and I can't tell if they are created. Code and logs below, thanks in advance. application.conf: akka { actor { provider = "akka.cluster.ClusterActorRefProvider

[akka-user] is it a good way to initialize Actor?

2015-05-27 Thread Harit Himanshu
I need to run a static method on a Java class (provided as a jar dependency). I also wanted to be able to write test on that. I created a wrapper class in Scala that will call this method. It looks like object CurrentLogProcessor { } class CurrentLogProcessor { def run: Unit = LogReaderDi

Re: [akka-user] Akka Streams Remote Materialization

2015-05-27 Thread Akka Team
Hi Oliver, we do not (currently) support distributed materialization of streams. The reason is that it will require implementing redelivery for stream messages and a number of related issues which need to be fixed, which has not happened yet. Currently we are focusing on getting the 1.0 out the do

[akka-user] Caching akka futures - is it ok?

2015-05-27 Thread Moiz Raja
I have a piece of code where I make a request to an actor using ask and cache the resulting future if that ask was successful. I am seeing problems in this area where when I try to access that "completed" future later on I find (a) that it does not contain a successful future and (b) the resulti

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

2015-05-27 Thread Giovanni Alberto Caporaletti
I'm already using http/streams in a minor component, but since you're talking about this: do you have a rough idea of when the performance improvement work will start? Of course I'm not talking about the exact day but it would be very useful to know if we can expect something by the end of the

[akka-user] Re: Akka cluster with 1 seed node

2015-05-27 Thread Guido Medina
I'm going to say like the Martiens in Sesame street, ohhh, ConductR, yep yep yep. Many many thanks, I'll dig into it. Guido. -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >>

[akka-user] Strange behavior with akka-http RC3

2015-05-27 Thread dpratt
I've been trying to come up with a high-level HTTP pipeline abstraction for dispatch of requests. I know that there is the singleRequest method on the HTTP extension, but I wanted to avoid it's (arguably minimal) overhead for each call by piping requests using the following: object PublisherDi

Re: [akka-user] Convert Source[ByteStream] to Java InputStream

2015-05-27 Thread Michael Hamrah
;) Thanks for pointing me in the right direction. I'll give it a shot. On Wed, May 27, 2015 at 3:43 PM Viktor Klang wrote: > In other words: a perfect opportunity for a contribution! > > On Wed, May 27, 2015 at 9:32 PM, Roland Kuhn wrote: > >> Yes, you’re missing InputStreamSink >>

Re: [akka-user] Convert Source[ByteStream] to Java InputStream

2015-05-27 Thread Viktor Klang
In other words: a perfect opportunity for a contribution! On Wed, May 27, 2015 at 9:32 PM, Roland Kuhn wrote: > Yes, you’re missing InputStreamSink > . It is not terribly > complicated to write, I think, but we have not yet gotten around to it. > > Rega

Re: [akka-user] Convert Source[ByteStream] to Java InputStream

2015-05-27 Thread Roland Kuhn
Yes, you’re missing InputStreamSink . It is not terribly complicated to write, I think, but we have not yet gotten around to it. Regards, Roland > 27 maj 2015 kl. 21:20 skrev Michael Hamrah : > > I'm working with an akka-http application that takes i

Re: [akka-user] Re: Akka cluster with 1 seed node

2015-05-27 Thread Patrik Nordwall
One way is that in your seed node subscribe to cluster membership changes and write the current set of nodes to a file. When you restart the seed node you construct the list of seed nodes from the file, and include your own address as the first element in the seed-nodes list. Then it will first try

[akka-user] Convert Source[ByteStream] to Java InputStream

2015-05-27 Thread Michael Hamrah
I'm working with an akka-http application that takes in a POST request and needs to convert the body to a java.io.InputStream. Specifically, I need to go from a Source[akka.util.ByteString, Any] (which is what request.entity.dataBytes returns) to a java.io.InputStream. I can't seem to find the

[akka-user] Re: Akka cluster with 1 seed node

2015-05-27 Thread Guido Medina
I probably confused the readers with my long explanation so I'll ask the question straight forward: If I have a cluster with one seed node, how do I make the cluster reconnect to that seed node if I restart it? Is there any resilient configuration I'm not aware of that can make the other nodes t

Re: [akka-user] Akka http load balancer

2015-05-27 Thread Илья Ненахов
I added Http().superPool() to my implementation, but performance is still low. Performance does not increase after adding third server. It seems strange to me. Adam, yeah we have a reason not to use nginx or something similar, because there will be an additional business logic, not only load balanc

[akka-user] How to increase Tcp Chunk size in Akka IO using Tcp

2015-05-27 Thread Laxman Vemula
Hi, I am using Akka-Cluster and sending large objects over network using Akka IO through Tcp. The data is being cut down into very small chunks. The size of the data ByteString received through 'Received' message is very small (around 7KB). Is there any configuration setting using which I can s

Re: [akka-user] Long-running HTTP requests not marking the TCP slot as busy

2015-05-27 Thread Samuel Tardieu
I will file an issue. The problem would exist and even be amplified by long-polling GET requests, as they would be seen as idempotent. Moreover, in Akka it looks like disabling pipelining (setting it to 1) might not be enough if the connection is seen as idle, at least it didn't work for me. Maybe

Re: [akka-user] Long-running HTTP requests not marking the TCP slot as busy

2015-05-27 Thread Roland Kuhn
Hi Samuel, what you describe sounds like a bug, and I think I know how it arises as well. Would you please file an issue with this log and explanation? Thanks! Independently, it seems that you are pointing out an overall problematic relation between pipelining and long-running HTTP/1.1 requests

Re: [akka-user] Configuring Akka to run as a job server using Play framework

2015-05-27 Thread Michael Frank
On 05/23/15 11:40, Mark Joslin wrote: Hi Michael, thanks for the tips. I believe that would be a bit overkill for this project though it would seem fun. I've decided to take a pretty minimalistic approach: * Start two seed nodes on AWS * Have all the API servers connect to the cluster via

[akka-user] Long-running HTTP requests not marking the TCP slot as busy

2015-05-27 Thread Samuel Tardieu
Hi. Using Akka HTTP & Streams 1.0-RC3 in Scala, I have the impression that a connection can be used to pipeline another request even if a non-idempotent request is being executed (vs. a non-idempotent request being completed). I had the same problem in 1.0-RC2 but took no time to investigate. The

Re: [akka-user] question on getting mailbox confirmation

2015-05-27 Thread Viktor Klang
Hi Shawn, On Mon, May 25, 2015 at 4:29 PM, Shawn Garner wrote: > The arbiter sounds like what we would need. > Are there any activator templates or example of someone using an arbiter > in Akka you can point me to? > This way I could demo it to my coworker without having to write something > fro

Re: [akka-user] Akka http load balancer

2015-05-27 Thread Adam Shannon
Is there a specific reason to not use another piece of software for this? I'm thinking of something like nginx or haproxy. Both of which are much more hardened and performant in regards to serving as proxies for HTTP traffic. On Wed, May 27, 2015 at 7:34 AM, Viktor Klang wrote: > > > On Wed, May

Re: [akka-user] Migrating from wandoulabs websockets to stock akka-io

2015-05-27 Thread Sam Halliday
On Wednesday, 27 May 2015 14:01:46 UTC+1, rkuhn wrote: > > Maybe I misunderstand you still, but ConnectionManager is not something > that we have in Akka HTTP > I am referring to the `manager` field in an implementation of `akka.io.IO.Extension`. The limitation that I'm referring to lies with s

[akka-user] Re: Announcement: Opinionated RabbitMQ library using Akka / Reactive Streams

2015-05-27 Thread Tal Pressman
Hi Tim, This looks great - I was just thinking of implementing something like this myself, so the timing couldn't have been better. ^_^ I do have a couple of questions, though. >From what I see in AsyncAckingConsumer, the default error handling strategy is to acknowledge the message once the r

[akka-user] Instrumenting Akka

2015-05-27 Thread Ognen Duzlevski
Hello, I have an Actor system that implements a polling functionality (every x minutes an Actor is woken up and it creates a bunch of other actors that do something and then get "killed"). However, over a few days of running I get GC Out of Memory errors. What tools are out there to instrument

Re: [akka-user] Migrating from wandoulabs websockets to stock akka-io

2015-05-27 Thread Roland Kuhn
Hi Sam, > 27 maj 2015 kl. 12:01 skrev Sam Halliday : > > Hi Roland, > > On Wednesday, 27 May 2015 08:18:09 UTC+1, rkuhn wrote: > > For this venture you need no HTTP documentation > > Actually I'd like to go futher than akka-http and see documentation that > allows me to use WebSockets with akka

Re: [akka-user] Akka http load balancer

2015-05-27 Thread Viktor Klang
On Wed, May 27, 2015 at 2:33 PM, Viktor Klang wrote: > > > On Wed, May 27, 2015 at 2:01 PM, Endre Varga > wrote: > >> Hi, >> >> Instead of Http.request, you should use the Flow returned by >> Http.superPool() (see >> http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/http/cl

Re: [akka-user] Akka http load balancer

2015-05-27 Thread Viktor Klang
On Wed, May 27, 2015 at 2:01 PM, Endre Varga wrote: > Hi, > > Instead of Http.request, you should use the Flow returned by > Http.superPool() (see > http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/http/client-side/request-level.html). > That flattens out the Futures and yo

Re: [akka-user] Akka http load balancer

2015-05-27 Thread Endre Varga
Hi, Instead of Http.request, you should use the Flow returned by Http.superPool() (see http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/http/client-side/request-level.html). That flattens out the Futures and you get responses instead. That also makes Balance actually aware o

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

2015-05-27 Thread zergood
Ok. I understand. Thank you for your work, good luck. среда, 27 мая 2015 г., 14:49:10 UTC+3 пользователь drewhk написал: > > Hi, > > At the current point the aim of streams 1.0 was to reach a desired > functionality level. Basically there is zero performance work done at this > point. We will im

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

2015-05-27 Thread Endre Varga
Hi, At the current point the aim of streams 1.0 was to reach a desired functionality level. Basically there is zero performance work done at this point. We will improve performance in later versions though. We basically refactored streams API in roughly every second release, so we are currently h

[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/zergood

[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 of performanc

Re: [akka-user] Migrating from wandoulabs websockets to stock akka-io

2015-05-27 Thread Sam Halliday
Hi Roland, On Wednesday, 27 May 2015 08:18:09 UTC+1, rkuhn wrote: > For this venture you need no HTTP documentation Actually I'd like to go futher than akka-http and see documentation that allows me to use WebSockets with akka-io directly, bypassing the Streaming API. The historic limitation has

[akka-user] Re: [akka-http] how does the formFields directive work?

2015-05-27 Thread Ian Phillips
Yes, that works, Thanks! I think that this should probably be mentioned in the docs somewhere. On Wednesday, 27 May 2015 08:21:37 UTC+1, Giovanni Alberto Caporaletti wrote: > > You need both an implicit FlowMaterializer and an implicit > ExecutionContext in scope. I haven't followed the chain

[akka-user] adding AtLeastOnceDelivery trait broke my test

2015-05-27 Thread Giampaolo
Hi to all, I have something strange that I cannot understand. I have this test that worked very well "give online status NeverLogged for never logged user" in new WithUsersData() { val auth = createAndAuthenticateUser val user1 = auth._1 val sid1 = auth._2 val tp1 = Test

[akka-user] Re: [akka-http] how does the formFields directive work?

2015-05-27 Thread Giovanni Alberto Caporaletti
Got it! Sorry for the spam: implicit def defaultUrlEncodedFormDataUnmarshaller(implicit fm: FlowMaterializer): FromEntityUnmarshaller[FormData] FYI: To find this I had to create fake methods with the implicit parameters required from the code (e.g. def x()(implicit a: FromEntityUnmarshaller [S

[akka-user] Re: [akka-http] how does the formFields directive work?

2015-05-27 Thread Giovanni Alberto Caporaletti
Well, since I'm here, let me ask: all the marshalling code requires an execution context (I can see that), but why a materializer? I can't find where the implicit mat is needed anywhere Thanks G On Wednesday, 27 May 2015 09:21:37 UTC+2, Giovanni Alberto Caporaletti wrote: > > You need both an

[akka-user] Re: [akka-http] how does the formFields directive work?

2015-05-27 Thread Giovanni Alberto Caporaletti
You need both an implicit FlowMaterializer and an implicit ExecutionContext in scope. I haven't followed the chain to check why those are needed but basically I keep adding them (one or the other or both) wherever I have compilation errors and it works. It should be something related to marsha

Re: [akka-user] Migrating from wandoulabs websockets to stock akka-io

2015-05-27 Thread Roland Kuhn
> 27 maj 2015 kl. 08:51 skrev Sam Halliday : > > Hi Roland, > > I've read the documentation, several times, I've even given you feedback on > the documentation in an earlier milestone phase. Also, the documentation for > WebSockets in Akka is TODO and TODO. The documentation on the routing >

Re: [akka-user] state of backpressure in websockets?

2015-05-27 Thread Roland Kuhn
Simple question: you have a faucet and a drain and you want to get the water from one to the other without spilling any, how do you do that? Of course you connect the two with a hose, and you do so while making sure that everything is tight. That way the pressure in the faucet will be relieved o