[akka-user] Re: Event in PeristentActor

2015-06-26 Thread wonderful world
I have attached the file that explains the example: On Friday, June 26, 2015 at 8:01:50 AM UTC-5, wonderful world wrote: > I was going through this PersistentActor example >

[akka-user] Abrupt termination after a PUT completed

2015-06-26 Thread IR
Hi all, Been trying to resolve an issue with AbruptTerminationException in Akka-Http 1.0RC4. I am PUTing a file after downloading it. The below code runs in an actor and when the uploadResponse is received, I PoisonPill the actor. Whether I PoisonPill immediately or with a delay, I receive an

[akka-user] ANNOUNCE: Akka 2.4-M2 Released!

2015-06-26 Thread Konrad Malawski
Dear hakkers, we—the Akka committers—proudly present the second development milestone for Akka 2.4. Since the release of Akka 2.4-M1 (one month ago) much has happened, in particular around Akka Persistence and Akka Cluster tools. Besides a plethora of small improvements the main changes relative

Re: [akka-user] Re: akka-http respond with result of an actor call (java-api)

2015-06-26 Thread Konrad Malawski
Have you looked into the examples inside the Spec Martynas linked to? It's as easy as using the FutureDirectives as seen here: https://github.com/akka/akka/blob/4b603ad018b1b909bb331b26ab7ec5464d86cd50/akka-http-tests/src/test/scala/akka/http/server/directives/FutureDirectivesSpec.scala#L26 On Fri

Re: [akka-user] Is Akka HTTP production ready in 3 months?

2015-06-26 Thread Konrad Malawski
Http has not been performance tuned yet, but we plan to do so after 1.0 (which is around 2 weeks away or so). I'd suggest starting out with Spray currently, and then doing the move to Akka Http should not be painful at all, since the routing DSLs are very similar and most of the directives are dir

RE: [akka-user] Best Strategy to Aggregate Multiple Actors Response

2015-06-26 Thread Matheus Lima
Yes. And it is a simple form do avoid problems with message stream. -Mensagem Original- De: "Konrad Malawski" Enviada em: ‎26/‎06/‎2015 09:32 Para: "Akka User List" Assunto: Re: [akka-user] Best Strategy to Aggregate Multiple Actors Response If I remember it correctly the Aggregator pat

Re: [akka-user] Akka-HTTP /scala newbie question: Parsing a JSON payload in the Http Request

2015-06-26 Thread Martynas Mickevičius
Hi Andad, take a look at the example here . It demonstrates how to unmarshal request body to a custom case class. That example uses spray-json. You can also use play-js

Re: [akka-user] Akka cluster sharding: recovering on journal corruption

2015-06-26 Thread Konrad Malawski
Hi Diego, the discussion went on in the other thread: https://groups.google.com/forum/#!topic/akka-user/j6wQfhJAQb4 Let's try to avoid double posting, thanks! On Wed, Jun 24, 2015 at 4:10 PM, Diego Martinoia wrote: > Hi Konrad, > > Sorry for the split posting (quite appropriate given we are tal

Re: [akka-user] Strategies for recovering on persistence sharding journal corruption

2015-06-26 Thread Konrad Malawski
We have ideas that might help to improve from the current recovery style, but nothing directly planned. It's related to this ticket: https://github.com/akka/akka/issues/17837 but still quite researchy. Currently you'll need to clean the persistent data before restarting sharding. On Thu, Jun 25,

Re: [akka-user] Best Strategy to Aggregate Multiple Actors Response

2015-06-26 Thread Konrad Malawski
If I remember it correctly the Aggregator pattern "has done it's job" once it has aggregated the values, thus it stops itself. You could use these in the actor-per-request model, but it's of course possible to have more aggregators inside as well. On Wed, Jun 24, 2015 at 2:21 PM, Matheus Lima wro

[akka-user] Re: How to send JSON object to actor using akka-http? (Java API)

2015-06-26 Thread Anand
Hi!, Looking at the same problem - how did you solve it? And how did you get the ByteStream out of the incoming request? On Monday, June 22, 2015 at 4:01:28 PM UTC+5:30, tub...@gmail.com wrote: > > Hi, > > Can you please point me to an example where akka-http is used to process > an incoming JS

Re: [akka-user] Handling request timeouts with client side http

2015-06-26 Thread Konrad Malawski
Hi Chris, I think the feature you're after is described in the ticket: https://github.com/akka/akka/issues/17732 https://github.com/akka/akka/issues/17346 Also see here for an in depth response about this issue: https://github.com/akka/akka/issues/17816 On Thu, Jun 4, 2015 at 2:47 PM, Chris Baxte

[akka-user] Akka-HTTP /scala newbie question: Parsing a JSON payload in the Http Request

2015-06-26 Thread Anand
Folks, I am quite a newbie to Scala and Akka-HTTP. I am using 1.0-RC3, and have managed to read some examples to get a few things working. I tried searching on the forums, but not exactly sure how to do this. So apologies, if this is a repeat question - in which case I would really appreciate

[akka-user] Mapping an akka cluster?

2015-06-26 Thread Brice Figureau
Hi, I'm currently adding a management system to my Akka Cluster which adds a REST API, allowing to introspect some specific parts of the system (basically some important actor states). This cluster is using several ClusterSharding and ClusterSingletons. One thing I'd like to provide is to be able

[akka-user] Re: [akka-persistence] Calling receiveRecover method inside persist block to be DRY

2015-06-26 Thread Anders Båtstrand
I would not call receiveRecover, since you are not receiving during recovery (it would look very strange to me, and might surprise the next developer). I instead make both use the same code. I have all my mutable state in a companion object to the actor, and that state object implements Procedu

[akka-user] Re: [akka-persistence] Calling receiveRecover method inside persist block to be DRY

2015-06-26 Thread ahjohannessen
I might have misunderstood your point, please elaborate what you mean. Is it to DRY out things like "event => removeCity(event.cityId)"? On Friday, June 26, 2015 at 9:31:45 AM UTC+1, ahjohannessen wrote: > > Validation in the cmd handler is one thing - receiveRecover and cmd > handlers might use

[akka-user] Re: [akka-persistence] Calling receiveRecover method inside persist block to be DRY

2015-06-26 Thread ahjohannessen
Validation in the cmd handler is one thing - receiveRecover and cmd handlers might use the same "apply state", but what it seems you suggest is that there is no difference between applying events and creating events. Big difference wrt. validation and replying in persist callback. On Friday, Ju

Re: [akka-user] Re: Akka IO and ISO 8583

2015-06-26 Thread Endre Varga
On Fri, Jun 26, 2015 at 1:44 AM, Bernard Leach wrote: > Some time back I put together a simulator for a network service using the > akka IO pipelines (TcpPipelineHandler & friends[1]) which takes care of the > framing aspects and just leaves you to deal with the messaging parsing > which from the

Re: [akka-user] Documentation about how Akka-Streams uses Akka internally

2015-06-26 Thread Endre Varga
Hi Héctor, Since we aggressively changed internals until this very final release candidate, there is no documentation available for the internals. Hopefully I can write up something during the summer, now that the APIs stabilized. The internals are not simple though. -Endre On Thu, Jun 25, 2015

[akka-user] Re: PersistenceId in the PersistenceActor - what is it?

2015-06-26 Thread Christian Kitzmueller
If you have different actors using the same persistence id you will get in trouble as soon as you (concurrently) persist messages; each persistent actor is keeping track of the current sequence number of the persisted message - so you will have duplicates Am Freitag, 26. Juni 2015 09:34:03 UTC

[akka-user] Re: PersistenceId in the PersistenceActor - what is it?

2015-06-26 Thread ahjohannessen
"Should the PersistentId be different for all the different actors? Like "order-number-1", "order-number-2" etc... to "order-number-1000"" Yes, if you choose to use several actors. One does not, in general, have multiple persistent actors with the same persistence identifier. On Friday, June 26

[akka-user] Cluster sharding with Persistence: Failing require statement,

2015-06-26 Thread joseph
I have a 2 node akka cluster. I am trying to run a persistent actor with cluster sharding. When the ShardCoordinator starts up, it is throwing an IllegalArgumentException. After digging through the source code, I found it to be a require statement in ClusterSharding.scala case ShardHomeAllocat

[akka-user] [akka-persistence] Calling receiveRecover method inside persist block to be DRY

2015-06-26 Thread Amir Karimi
Hi, Consider the following receives methods of a PersistentActor: override def receiveRecover: Receive = { case CityAdded(v) => addCity(v) case CityRemoved(v) => removeCity(v) } override def receiveCommand: Receive = { case AddCity(c) => persist(CityAdded(c))(eve

Re: [akka-user] DistributedPubSubExtension, subscriber doesn't receive published message

2015-06-26 Thread Patrik Nordwall
On Fri, Jun 26, 2015 at 7:42 AM, 'Konstantinos Kougios' via Akka User List < akka-user@googlegroups.com> wrote: > Thanks, gossip-interval works, but also tried 2.4-M1. I get a > compilation error that DistributedPubSubExtension is not found and can't > find DistributedPubSubExtension class in tho