[akka-user] DistributedPubSub - topic actor liveness race condition

2015-11-20 Thread Andrzej Dębski
I was looking through DistributedPubSub code and I was wondering about possible problem due to how topic/children actors are managed. When new subscriber arrive for given topic the child/topic actor is looked up using context.child(encTopic), if actor exists message is forwarded, if not the

Re: [akka-user] Re: Akka DistributedPubSub ack

2015-11-20 Thread Patrik Nordwall
DistributedPubSub does not support that. Reliable pub-sub delivery is a difficult topic. If the publisher is supposed to resend (at least once delivery) until it gets acks it must know what subscribers to receive acks from, which kind of defeats the decoupling purpose of pub-sub. DistributedPubSub

[akka-user] [akka-streams] Source and unfold

2015-11-20 Thread Barys Ilyushonak
Hi there, I would like to create a Source, which produce the data from init state while it available, and then terminates in the end. Something like play.api.libs.iteratee.Enumerator.unfold, where Option is used to mark that the value is completely unfolded. The use case: load data from

Re: [akka-user] Merge matching elements of multiple streams into Tuples

2015-11-20 Thread Florian Witteler
I found out what the problem is. The UniformFanInShape isn't available in a scala-class in the sourcecode since it is being generated from a template. akka-stream/src/main/boilerplate/akka/stream/FanInShape.scala.template I generated the sourcecode and try to work through the logic now. Thanks

Re: [akka-user] DistributedPubSub - topic actor liveness race condition

2015-11-20 Thread Andrzej Dębski
I think it just postpones the problem - you could have the same sequence of events: Subscribe to mediator in the same time as scheduler puts Prune message in topic actor mailbox, mediator doesn't see topic actor as dead so Subscribe message is forwarded, Prune is processed and

Re: [akka-user] run time change in dispatchers

2015-11-20 Thread Patrik Nordwall
That is not possible. You have to stop the actor and start a new one. /Patrik On Tue, Nov 17, 2015 at 3:41 PM, Fahimeh Rahemi wrote: > Hello every body! > > Is there any way to change the dispatcher associated to an actor at run > time? For example, I have created an

Re: [akka-user] Re: microservices multi actor persistence and sharding question.

2015-11-20 Thread Patrik Nordwall
Thanks for sharing. Yeah, the possibility to use different ClusterShardingSettings (incl role) for different entity types is pretty powerful. /Patrik On Wed, Nov 18, 2015 at 11:04 PM, sd d wrote: > I finally found the solution. There is hardly any documentation or > examples

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

2015-11-20 Thread Patrik Nordwall
On Fri, Nov 20, 2015 at 8:46 AM, Jim Hazen wrote: > > > On Thursday, November 19, 2015 at 12:32:38 PM UTC-8, Patrik Nordwall wrote: >> >> >> >> On Thu, Nov 19, 2015 at 8:06 PM, Jim Hazen wrote: >> >>> Wait, what? So cluster sharding depends on

Re: [akka-user] Merge matching elements of multiple streams into Tuples

2015-11-20 Thread Patrik Nordwall
On Fri, Nov 20, 2015 at 12:03 PM, Florian Witteler < florian.witte...@googlemail.com> wrote: I have an elasticsearch-database with all our articles. Each tenant has its > own index. These indexes are denormalized (the common properties of an > article are duplicated into each index) > We are

Re: [akka-user] [akka-stream] Is there any way I can do "conditional" Balance

2015-11-20 Thread Endre Varga
This can also be done with a custom GraphStage. Those do not have documentation yet, though. -Endre On Fri, Nov 20, 2015 at 1:34 PM, Patrik Nordwall wrote: > > > On Fri, Nov 20, 2015 at 10:08 AM, Leon Ma wrote: > >> Hi, >> >> I'd like to apply

[akka-user] Merge matching elements of multiple streams into Tuples

2015-11-20 Thread Florian Witteler
I have an elasticsearch-database with all our articles. Each tenant has its own index. These indexes are denormalized (the common properties of an article are duplicated into each index) We are about to implement streaming of articles with akka http and use the elasticsearch-drivers' reactive

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

2015-11-20 Thread Patrik Nordwall
You might find Reactive Kafka useful: https://github.com/softwaremill/reactive-kafka /Patrik On Tue, Nov 17, 2015 at 4:31 PM, Soumya Simanta wrote: > > > On Tuesday, November 17, 2015 at 5:02:18 PM UTC+5:30, > mathe...@sagaranatech.com wrote: >> >> Today you can use

Re: [akka-user] [akka-stream] Is there any way I can do "conditional" Balance

2015-11-20 Thread Patrik Nordwall
On Fri, Nov 20, 2015 at 10:08 AM, Leon Ma wrote: > Hi, > > I'd like to apply different sub flows against attributes of input elements. > > For example, for my source of HttpRequest: > > if (contains HttpHeader A) then go thru flowA > if (contains HttpHeader B) then go thru

Re: [akka-user] DistributedPubSub - topic actor liveness race condition

2015-11-20 Thread Patrik Nordwall
The topic actors don’t stop themselves immediately. For efficiency reasons they stay around for a while even when there is no subscribers. See pruneDeadline in the code. Doesn’t that take care of this also? Cheers, Patrik ​ On Fri, Nov 20, 2015 at 12:36 PM, Andrzej Dębski

Re: [akka-user] DistributedPubSub - topic actor liveness race condition

2015-11-20 Thread Patrik Nordwall
Ah, now I see what you mean. You are right. Thanks for reporting. Please create an issue . If you are interested in contributing a pull request would be great. /Patrik On Fri, Nov 20, 2015 at 2:25 PM, Andrzej Dębski wrote: >

Re: [akka-user] [akka-http] problem with multiple client requests using singleRequest

2015-11-20 Thread Rüdiger Klaehn
OK, great. Having done some pretty complex things with the server side API, I was surprised to run into issues on the client side so quickly. I am using akka-http in production (for a small, non mission-critical tool). Should I upgrade to 2.0-M2 or stay with 1.0 and somehow work around the bug?

[akka-user] Re: Akka persistence query examples

2015-11-20 Thread Bruno Filippone
What you want to do is process all the events coming from the PersistenceQuery stream and create a view that can be queried, for example: transform all the events into normalized data and insert them into ElasticSearch. A quick example would look like the following (using

Re: [akka-user] [akka-http] problem with multiple client requests using singleRequest

2015-11-20 Thread Konrad Malawski
Definitely upgrade to 2.0m2 once its out I think. It has major improvements on internals as well as api :) There is a bit of changes since 1.0 but you'll manage, there's a migration guide and we'll add more hints soon. On Nov 20, 2015 18:54, "Rüdiger Klaehn" wrote: > OK,

[akka-user] [akka-http] problem with multiple client requests using singleRequest

2015-11-20 Thread rklaehn
Hi All, I am having some seemingly trivial problems with using the client side of akka-http. Here is a little test program. I would expect it to print 100 responses, but it prints just four and then hangs. This seems to be related to the configuration parameter

Re: [akka-user] [akka-http] problem with multiple client requests using singleRequest

2015-11-20 Thread Konrad Malawski
Hi Rudiger, Yes it's a bug (two separate ones even, another thing you'll notice is actors leaking). And good news - we tracked it down and fixed it today! Will be released in M2 which will be released early next week. Thanks for reporting! On Nov 20, 2015 18:47, "rklaehn"

Re: [akka-user] [akka-http] problem with multiple client requests using singleRequest

2015-11-20 Thread Heiko Seeberger
Rüdiger is a rocket scientist, he will be able to migrate without guides and hints ;-) -- Heiko Seeberger Home: heikoseeberger.de Twitter: @hseeberger Public key: keybase.io/hseeberger > On 20 Nov 2015,

Re: [akka-user] Re: Akka persistence query examples

2015-11-20 Thread Bruno Filippone
Thanks for that, I'm not very familiar with the Akka streams API yet, so any feedback is very welcome. I guess the cluster singleton could work for my use case, it could just communicate to sharded workers that do the data normalization so that it does not become a bottleneck. On Friday,

Re: [akka-user] [akka-http] problem with multiple client requests using singleRequest

2015-11-20 Thread Konrad Malawski
Right; "this isn't rocket science" (-; All feedback is very welcome though Rudiger, please let us know if anything is non obvious or undocumented! --  Cheers, Konrad 'ktoso’ Malawski Akka @ Typesafe On 20 November 2015 at 19:08:44, Konrad Malawski (konrad.malaw...@typesafe.com) wrote:

[akka-user] [akka-stream] Is there any way I can do "conditional" Balance

2015-11-20 Thread Leon Ma
Hi, I'd like to apply different sub flows against attributes of input elements. For example, for my source of HttpRequest: if (contains HttpHeader A) then go thru flowA if (contains HttpHeader B) then go thru flowB else go thru flowC I got some ideas from thread:

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

2015-11-20 Thread Jim Hazen
But! It is important for me that the work of message 1 is done before > message 2 is handled. And isn't one of the benefits for the actor model and > akka itself, that I have the garantee to that message 1 is done before > message 2? > > Yes. And you might be in trouble there. In which

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

2015-11-20 Thread Carsten Saathoff
Hi, I think you (and probably everyone else here) need more data to figure out why your system is behaving as it is. Above, you write the configuration with four machines exposes the behaviour you describe. Does that mean with 12 machines the CPUs are fully utilized? What about a single