Re: [akka-user] Comparing Akka with Quasar.

2015-06-07 Thread Justin du coeur
Sorry, correction: On Sun, Jun 7, 2015 at 12:27 PM, Justin du coeur jduco...@gmail.com wrote: - Cluster Sharding -- built-in mechanisms to deal with spreading heterogeneous Actors around the cluster, and letting clients communicate with them without needing to know where they are

Re: [akka-user] Re: Is there a way to broadcast to all sharded entities of a given type?

2015-06-07 Thread Justin du coeur
Interesting -- I haven't even thought about roles yet (for the moment, Querki's architecture is pretty uniform), but that might also work. Thanks -- at this point, it's clear that there are ways to deal with this problem, and I just have to choose which one works best for my purposes... On Sun,

Re: [akka-user] Re: Streams and CLOSE_WAIT connections

2015-06-07 Thread Andrey Kuznetsov
On Sunday, June 7, 2015 at 6:38:51 PM UTC+3, drewhk wrote: On Sun, Jun 7, 2015 at 5:32 PM, Andrey Kuznetsov fe...@loathing.in javascript: wrote: auth and session makes context.stop(self) inside Cancel handler of their receive's. umm, but they will not get a Cancel from merge if

[akka-user] Re: Is there a way to broadcast to all sharded entities of a given type?

2015-06-07 Thread Guido Medina
Yeah, in Akka Cluster-Sharding you also have regions which I think you can use to broadcast messages to actors living in such region, a region will likely be spread between distinct nodes. I use Akka Cluster roles because I have an admin node that keeps track of each supervisor's actor and a

Re: [akka-user] ScalaGuice @Assisted params on remote deployed actors

2015-06-07 Thread Akka Team
Hi Rowland, In order to be able to remote deploy an actor, its Props must be serializable. If you use constructor parameters, then this means the Actor should be serializable, too. Instead of sending Connection, just can just send a parameters object that allows the remote side to recreate the

Re: [akka-user] Comparing Akka with Quasar.

2015-06-07 Thread Justin du coeur
From a pure Akka-user POV, I find the article not even so much slanted as a bit blinkered -- it is focused on its approach and thinking, so of course Quasar comes out looking like the right approach. (Context: I am just a user, but I've been building a product centered on Akka for several years

Re: [akka-user] Re: Is there a way to broadcast to all sharded entities of a given type?

2015-06-07 Thread Guido Medina
No so automated but I do this with specific supervisor actors that are subscribed to cluster events. So I have broadcast routers that are kept updated, so when some event happens I just use the router. -- Read the docs: http://akka.io/docs/ Check the FAQ:

Re: [akka-user] Re: Is there a way to broadcast to all sharded entities of a given type?

2015-06-07 Thread Guido Medina
Cluster node has roles, and cluster events can keep your broadcast routers updated, so you could broadcast a message to a role. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives:

Re: [akka-user] akka message flow

2015-06-07 Thread Konstantinos Kougios
Hi Endre, Yes I think it will be very useful. Though I currently can easily send messages in my akka cluster, I can't orchestrate a process that requires multiple messages to be send via several actors and the receipts to be collected. Doing so with just a series of messages becomes tedious

Re: [akka-user] Re: [akka-hhtp][akka-streams] Process http request with flow

2015-06-07 Thread Владимир Морозов
Hi, I try but get error message: java.lang.IllegalStateException: onNext is not allowed when the stream has not requested elements, totalDemand was 0 My code is: val jobManagerSource = Source.actorPublisher[UserRegisterSource.RegisterUser](UserRegisterSource.props) val ref =

Re: [akka-user] Re: RoundRobinRountingLogic: A slightly faster version?

2015-06-07 Thread Akka Team
Hi Guido, You cannot import the release-2.3-dev in newest IntelliJ, I filed them a bug last week. Can you still make this a proper PR? You can build Akka using sbt only, or you can still use the old sbt-idea plugin to make a project that IDEA can read (that is what I use now until they fix the

Re: [akka-user] akka message flow

2015-06-07 Thread Akka Team
Hi Kostas, Currently there is no such DSL, but this is actually something we already started experimenting with. I hope that we can come up with something easy to use in the near future. -Endre On Mon, Jun 1, 2015 at 5:09 PM, Kostas kougios kostas.koug...@googlemail.com wrote: Hi, I need to

Re: [akka-user] Re: Too many scan calls when profiling my akka application

2015-06-07 Thread Akka Team
Hi Leon, The scan method of FJP will very likely be your top method unless you have very favorable load patterns for FJP. I wouldn't worry about it, unless you see a performance problem with your application. -Endre On Fri, Jun 5, 2015 at 10:54 PM, Justin Forder justin.for...@gmail.com wrote:

Re: [akka-user] Akka streams with multiple sources?

2015-06-07 Thread Akka Team
Hi Jason, On Mon, Jun 1, 2015 at 8:24 PM, Jason Martens m...@jasonmartens.com wrote: Hello All, I deal with a lot of large files on Amazon S3 and disk, which have been indexed into chunks that can be used individually. What I would like to do is have a Source of offsets and sizes which

Re: [akka-user] Re: [akka-hhtp][akka-streams] Process http request with flow

2015-06-07 Thread Akka Team
Hi, On Fri, Jun 5, 2015 at 7:53 PM, Владимир Морозов greenhos...@gmail.com wrote: Yes, I know about mapAsync, but my problem with Source. A want to use single stream for processing some group of events I am not sure if I understand your question properly, but if you want to run the stream

Re: [akka-user] Re: Streams and CLOSE_WAIT connections

2015-06-07 Thread Endre Varga
Hi Andrey, When do the auth and session sources finish? Do you see the onComplete log message from broadcast? Since the connections you see are in CLOSE_WAIT, that means that your server already received a close from the client, but it has not yet closed its own side (half-closed). I suspect that

Re: [akka-user] Re: Akka Cluster - nodes disagree on cluster size

2015-06-07 Thread Akka Team
Hi Anders, On Tue, Jun 2, 2015 at 3:15 PM, Anders Båtstrand ander...@gmail.com wrote: I now encountered the problem again: The cluster (3 nodes) suddenly has two leaders, and only one of the nodes reported all the other nodes to be part of the cluster. While it might have been triggered by

Re: [akka-user] Re: Akka Http with actors vs Play w/ shared state - Akka performance is very poor

2015-06-07 Thread Akka Team
Hi Dana, While Akka Http has really not yet optimized the numbers you have does not match what we have seen in general. We are not very fast, but not *that* slow. There is something fishy going on there. Unfortunately we have not much time to look into large code, can you just create a very

Re: [akka-user] pull-task template?

2015-06-07 Thread Akka Team
Hi Eugene, On Thu, Jun 4, 2015 at 1:25 AM, Eugene Dzhurinsky jdeve...@gmail.com wrote: Hello! I wonder if there's something like a template to build pull task flow, where - defined some data source actor/actors - data-source may produce either some data token, or EOD event (end of data)

Re: [akka-user] Re: Streams and CLOSE_WAIT connections

2015-06-07 Thread Endre Varga
On Sun, Jun 7, 2015 at 5:32 PM, Andrey Kuznetsov f...@loathing.in wrote: auth and session makes context.stop(self) inside Cancel handler of their receive's. umm, but they will not get a Cancel from merge if merge itself is not cancelled, which it will not be in this case. So mtproto gets the

Re: [akka-user] Akka Java API vs Scala, any performance difference?

2015-06-07 Thread Akka Team
Hi Guido, There is no overhead of calling Scala code from Java, whatever you can access from Java, and looks like a method, then it is an ordinary JVM method. In fact, sometimes calling the Scala API might be slightly faster, since most of the time the Java API just calls the Scala API underneath

Re: [akka-user] From Spray to Akka Http Multi-part form data upload

2015-06-07 Thread Akka Team
Hi Maatari, On Wed, Jun 3, 2015 at 8:29 PM, Maatary Okouya maatarioko...@gmail.com wrote: Hi, is there some more extensive doc and example on how to use akka http client side. Not yet, work on documentation is ongoing. We will have more docs in the next RC release. I'm switching to

Re: [akka-user] Re: Flow.wrap(ActorSubscriber, ActorPublisher) does not Cancel the publisher

2015-06-07 Thread Akka Team
Hi Richard, A Flow is basically a thing with an input and output port. It does not say though how those ports are connected internally: they can be unrelated (like in your example), wired up to each other, or passing through a graph, or piped through a TCP connection. -Endre On Sat, Jun 6, 2015

Re: [akka-user] Re: Triggering an Akka Actor if a REST action is successful

2015-06-07 Thread Akka Team
Hi, On Thu, Jun 4, 2015 at 3:01 PM, Nweike Onwuyali nweikeonwuy...@gmail.com wrote: @Chanan. if myActor.tell(Some Message or Some Class, ActorRef.noSender()) fails due to network unavailability (could be due to other reasons), how do i configure Akka to ensure it keeps trying to recover

Re: [akka-user] Re: Is there a way to broadcast to all sharded entities of a given type?

2015-06-07 Thread Justin du coeur
So each Space actor would subscribe, and the admin monitor could send out the request for updates when it needs it? That's plausible. I'll investigate that approach -- thanks! On Thu, Jun 4, 2015 at 8:54 AM, Anders Båtstrand ander...@gmail.com wrote: Will the extension Distributed Pub Sub do

Re: [akka-user] LoggingAdapter trace level.

2015-06-07 Thread Akka Team
Hi, Akka does not use TRACE level, only DEBUG, INFO, WARN and ERROR. If you use akka logging facilities then there is no API to emit trace level (AFAIK). -Endre On Tue, Jun 2, 2015 at 12:58 AM, TS test.tester1...@gmail.com wrote: I am using logback with slf4j and LoggingAdapter. Why is it

Re: [akka-user] Re: Is there a build-in stashed pipeTo version in Akka? Why not?

2015-06-07 Thread Akka Team
Hi Eax, There is one pattern in contrib that does something similar to what you need: http://doc.akka.io/docs/akka/2.3.11/contrib/aggregator.html I recommend taking a look at that, and see if it what you want, or just take the code and customize it as you want. In the future we plan to add some

Re: [akka-user] Re: Debug message- Cancelling akka.stream.impl.MultiStreamOutputProcessor (after: 5000 ms)

2015-06-07 Thread Akka Team
Hi, This error message means that there were substreams that were not consumed by anyone and therefore have been lingering around until that timeout triggers. Can you pack up a small reproducer for this? Because if this is a bug this can cause some weird behavior, as substreams constructed by

[akka-user] Re: Streams and CLOSE_WAIT connections

2015-06-07 Thread Andrey Kuznetsov
I am handling connections with the following code: val connections = Tcp().bind(interface, port) connections runForeach { conn ⇒ log.info(sClient connected from: ${conn.remoteAddress}) try { val flow = MTProto.flow(nextConnId(), maxBufferSize, sessionRegion) conn.handleWith(flow) }

Re: [akka-user] [akka-http] Write directive ensuring request entity is HttpEntity.Default?

2015-06-07 Thread Akka Team
Hi Michael, This is a good point, I think there should be a Directive that allows matching on this, then user code can do the rest. Can you file a ticket for this feature? Thanks, -Endre On Tue, Jun 2, 2015 at 11:43 PM, Michael Hamrah mham...@gmail.com wrote: I'd like to create a directive

Re: [akka-user] Re: Comparing Akka with Quasar.

2015-06-07 Thread Akka Team
Hi Biniam Honestly, the Akka Team cannot answer these questions in a neutral and unbiased way since we are all Akka developers. I recommend trying out these frameworks and learn about them yourself. Experiences of other people might match or not your own preferences, so it is always better to

Re: [akka-user] adding AtLeastOnceDelivery trait broke my test

2015-06-07 Thread Akka Team
Hi, On Fri, Jun 5, 2015 at 10:20 AM, Giampaolo giampaolo.trapa...@gmail.com wrote: Many thanks Akka Team for the reply. Do you think that this info should be added to TestKit doc to avoid this mistake for Akka newbies like me? Yes, I think so. Can you file a ticket for this? -Endre

Re: [akka-user] [akka-http] Write directive ensuring request entity is HttpEntity.Default?

2015-06-07 Thread Michael Hamrah
https://github.com/akka/akka/issues/17680 Thanks Endre. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you

[akka-user] Re: Streams and CLOSE_WAIT connections

2015-06-07 Thread Andrey Kuznetsov
and mapResponse is a PushStage: def mapResponse(system: ActorSystem) = new PushStage[MTProto, ByteString] { private[this] var packageIndex: Int = -1 override def onPush(elem: MTProto, ctx: Context[ByteString]) = { packageIndex += 1 val pkg = TransportPackage(packageIndex, elem)

[akka-user] Re: [akka-http] Write directive ensuring request entity is HttpEntity.Default?

2015-06-07 Thread Brian Topping
If the entity is not a HttpEntity.Default, Akka can't provide a length without buffering the stream first. Which is why one doesn't see the length of the entity in the HttpRequest. If there was Content-Length header but it was inaccurate, does that leave a careless implementation around it

Re: [akka-user] Java : ReceiveBuilder not behaving as expected.

2015-06-07 Thread Akka Team
Hi Adam, You cannot reuse the Builder instance, you can reuse the result from the .build() call though. The builder has mutable state inside so it is not meant to be reused. -Endre On Mon, Jun 1, 2015 at 11:45 AM, Adam Daines dainesa...@gmail.com wrote: Hi, I have been making use of the

Re: [akka-user] On Reconnecting Client Connections

2015-06-07 Thread Akka Team
Hi Peter, Unfortunately this is one of the swampy areas where we have not good support yet. This pattern is already implementable (Http client connection pooling does something like this and more) but it is very error prone. AsyncStage can work if you know what are you doing :) If you have

Re: [akka-user] Re: Streams and CLOSE_WAIT connections

2015-06-07 Thread Akka Team
Hi Andrey, I am not sure your problem is related to that ticket ( https://github.com/akka/akka/issues/17122). Do you have some code that represents what you are trying to do? The TCP flows implement proper half-close, so if it not used carefully it might end up being half-closed instead of fully

Re: [akka-user] Re: Streams and CLOSE_WAIT connections

2015-06-07 Thread Andrey Kuznetsov
auth and session makes context.stop(self) inside Cancel handler of their receive's. And they see it if client closes connection (at least if it is being closed by Connection reset by peer). I tried to send PoisonPill to auth and session actors from Sink.onComplete and still observed CLOSE_WAIT

[akka-user] ClusterShardingCoordinator can not detected ShardRegion terminated

2015-06-07 Thread Need
Hi Akka Team, I have a cluster sharding with 3 nodes (I, II, III). When the leader node down (node I), after that the second node down (node II). The sharding coordinator restart at another node (node III), it can not received the terminated message of ShardRegion of node II. Can you tell me

[akka-user] how to use an embedded ActiveMQ broker for JMS topics

2015-06-07 Thread Peter Mehlitz
I need to provide JMS topics for external non-Akka clients from inside of my actor system. So far, I'm using the CamelExtension to do something like .. val factory = new ActiveMQConnectionFactory(vm:(broker:(tcp://localhost:61617)?persistent=false) ) camelContext.addComponent(ext-jms,

Re: [akka-user] Re: [akka-hhtp][akka-streams] Process http request with flow

2015-06-07 Thread Владимир Морозов
I solve this problem, but found new one: val ref = Flow[UserRegisterSource.RegisterUser] .mapAsync(1)(callMe) .to(Sink.ignore) .runWith(jobManagerSource) val t = (ref ask UserRegisterSource.RegisterUser(test)).mapTo[UserRegisterSource.RegisterUser] but t never complete, always end with Timeout

[akka-user] Re: Streams and CLOSE_WAIT connections

2015-06-07 Thread Andrey Kuznetsov
By HTTP (websocket) server I mean akka-http. On Sunday, June 7, 2015 at 9:17:36 AM UTC+3, Andrey Kuznetsov wrote: My application also has an HTTP (websocket) server on another port, it's behind Elastic Load Balancer too, and it doesn't suffer from such problem - there is no CLOSE_WAIT

[akka-user] Re: Streams and CLOSE_WAIT connections

2015-06-07 Thread Andrey Kuznetsov
My application also has an HTTP (websocket) server on another port, it's behind Elastic Load Balancer too, and it doesn't suffer from such problem - there is no CLOSE_WAIT connections to it. On Sunday, June 7, 2015 at 7:17:44 AM UTC+3, Andrey Kuznetsov wrote: Just found this issue: