[akka-user] Akka persistence - errors on the read side

2016-02-24 Thread Richard Rodseth
In Vaughn Vernon's Red Book (Implementing DDD) he talks about storing domain events in the same transaction as the one which updates an aggregate, and then out of band you read this domain event store (not in the event sourcing sense) in order to put messages on a message queue, for example, to no

[akka-user] [akka-stream-2.0.3] how to force terminate a stream?

2016-02-24 Thread Ramin Alidousti
Hi, I'm new to akka-stream. I have a bidiflow that has been materialized. Now in certain cases I need to terminate the stream on demand and maybe recreate it later. The way I'm doing that now is to call terminate() on the implicit system. But I was wondering if there was a more appropriate way

Re: [akka-user] Googling docs

2016-02-24 Thread Konrad Malawski
Hi there, I'm very glad you found it useful! yeah, it's something on our radar to improve – specifically 2.0.3 should redirect people to 2.4.2+. It's somewhat of a special case as URL needs more change than just changing the version in it, so we didn't yet squeeze in the time to fix that... If

[akka-user] Googling docs

2016-02-24 Thread Richard Rodseth
It was *extremely* useful when the team added the footer on documentation pages that lets you jump to the current version. Unfortunately, with Streams moving into Akka proper, this is less useful when it asks me if I want to update the page I'm viewing to 2.0.3. Perhaps an easy enhancement? Keep u

[akka-user] Separate my command handling

2016-02-24 Thread Jan-Terje Sørensen
Hi, As I understand the persistence examples they all end up with all the command handling in one persistence actor. Is it possible to separate this in different command handlers, and still have the

[akka-user] How to stop akka stream that is being processed

2016-02-24 Thread Jerry Tworek
Hi Guys, Let's say I have an akka stream that is being run to materialize to some value. I'd like to have ability to cancel it at a certain point e.g. after a timeout or by an action from a user. Ideally this process should go as follows: after a "stop" action is triggered, no new entries shou

Re: [akka-user] Can quarantine happen without remote actor creation or watching?

2016-02-24 Thread Akka Team
Hi Daniel, On Wed, Feb 24, 2016 at 6:03 PM, Daniel Armak wrote: > Hi Konrad, > > Your answer doesn't match the one Endre gave. Can quarantine happen if the > cluster, remote actor creation, and remote death watch are *not* used? > No, it does not contradict it. Cluster does have a more fine-gra

Re: [akka-user] Can quarantine happen without remote actor creation or watching?

2016-02-24 Thread kt...@lightbend.com
I didn't notice the title of your email :-) It does match Endre's reply – system message loss causes quarantine => no watch => no heartbeating (sys messages) => no quarantine :-) --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 24 February 2016 at 18:03:20, Daniel Armak (danar...@gmail.co

Re: [akka-user] Can quarantine happen without remote actor creation or watching?

2016-02-24 Thread Daniel Armak
Hi Konrad, Your answer doesn't match the one Endre gave. Can quarantine happen if the cluster, remote actor creation, and remote death watch are *not* used? I'm asking because I'm considering using akka-remoting as a point-to-point RPC layer, in a codebase that doesn't use actors, where the Clust

Re: [akka-user] Can quarantine happen without remote actor creation or watching?

2016-02-24 Thread Konrad Malawski
Yeah, for example if irrecoverable loss of system messages happens. In general death watch on Actors using remoting can in failure scenarios (see above) lead to a Quarantine. Note that Quarantine is irrecoverable, unlike "Unreachable" which is used in the Cluster. Short answer: Use the Cluster –

Re: [akka-user] Can quarantine happen without remote actor creation or watching?

2016-02-24 Thread Akka Team
Hi Daniel, No, it shouldn't. DeathWatch and system message redelivery timeouts are the triggers for Quarantine (or Cluster Down-ing) -Endre On Wed, Feb 24, 2016 at 5:53 PM, Daniel Armak wrote: > Hi, > > If I use akka-remoting (not cluster), and I don't send any PossiblyHarmful > messages (so n

[akka-user] Can quarantine happen without remote actor creation or watching?

2016-02-24 Thread Daniel Armak
Hi, If I use akka-remoting (not cluster), and I don't send any PossiblyHarmful messages (so no remote actor creation or watching), can the association ever be quarantined? Thanks, -- Daniel Armak -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >>>

Re: [akka-user] Intended use for akka.Done and akka.NotUsed

2016-02-24 Thread Roland Kuhn
There is one other use that these types can be put to: Scala’s habit of conjuring a Unit out of thin air where needed can make it non-obvious where all the exit points of a method are. Declaring a different return type means that all such points need to be marked out explicitly. But outside the

[akka-user] Does the Receive Pipeline Pattern play well with non-blocking asynchronous compositions?

2016-02-24 Thread Javier Igua
Hi, Playing around with the receive pipeline pattern I put together the following example to do some sort of user credentials validation composition with an actor. Problem is that only with the synchronous blocking semantics I

Re: [akka-user] Java-friendly "ask"

2016-02-24 Thread Konrad Malawski
Happy hakking! --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 24 February 2016 at 16:53:43, Tal Pressman (kir...@gmail.com) wrote: Hmm, not sure why I didn't find it myself. Sorry for the dumb question... Thanks for the quick reply, though! ^_^ -- >> Read the docs: http:/

Re: [akka-user] Java-friendly "ask"

2016-02-24 Thread Tal Pressman
Hmm, not sure why I didn't find it myself. Sorry for the dumb question... Thanks for the quick reply, though! ^_^ -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >> Search the a

Re: [akka-user] Java-friendly "ask"

2016-02-24 Thread Konrad Malawski
Hi Tal, thanks for pointing out it's not linked to in the docs around `ask`. We have one and it's available in `akka.pattern.PatternsCS`, so you can import statically from that object and it'll read nice (`ask(who, what): COmpletionStage`) :-) I'll add a note to the docs as well: https://github.

[akka-user] Java-friendly "ask"

2016-02-24 Thread Tal Pressman
Hi, As far as I can tell, "ask" currently only returns a Scala Future. Is there also a more Java-friendly version that returns a CompletionStage? Thanks, Tal -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/a

Re: [akka-user] Intended use for akka.Done and akka.NotUsed

2016-02-24 Thread Konrad Malawski
Yeah, agree with Patrik here. It's mostly for `Future[Done]` and situations like that, void/Unit is still fine in normal return values. --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 24 February 2016 at 13:35:02, Patrik Nordwall (patrik.nordw...@gmail.com) wrote: On Wed, Feb 24, 201

[akka-user] Re: Akka HTTP Websockets Java with Actor

2016-02-24 Thread Guido Medina
While Akka HTTP is accessible to Java 8 users I decided to go for an alternative which I was trying to avoid but at least I know is of high performance and it fits right my needs. When a connection is upgraded to websocket it is passed to an actor, also every message sent is forwarded to an Acto

Re: [akka-user] Intended use for akka.Done and akka.NotUsed

2016-02-24 Thread Patrik Nordwall
On Wed, Feb 24, 2016 at 1:23 PM, rklaehn wrote: > Hi Konrad, > > So, if it wasn't for backward compatibility, the return type of tell would > be akka.NotUsed, to signal that successful return does not tell you > anything about successful processing of the message (akka.Done would > certainly be w

Re: [akka-user] Intended use for akka.Done and akka.NotUsed

2016-02-24 Thread rklaehn
Hi Konrad, So, if it wasn't for backward compatibility, the return type of tell would be akka.NotUsed, to signal that successful return does not tell you anything about successful processing of the message (akka.Done would certainly be wrong)? Cheers, Rüdiger On Wednesday, February 24, 2016

Re: [akka-user] Re: what gets serialized and when

2016-02-24 Thread Akka Team
Hi Tim, For actors, that cannot and will not be deployed remotely, you can call props.withDeploy(Deploy.local) and then they will not be checked for serialization. For messages that never meant to be through the wire and has no serialization (because maybe it refers to a local resource) you can us

Re: [akka-user] Intended use for akka.Done and akka.NotUsed

2016-02-24 Thread Konrad Malawski
Hey Rüdiger, yeah those can definitely be used in all kinds of APIs. The reason we have them mostly in Streams for now is because we could not break compatibility in akka-actor for example. The types are intended to be simply more informative than plain `Unit`, so wherever that's needed feel fre

[akka-user] Intended use for akka.Done and akka.NotUsed

2016-02-24 Thread rklaehn
Hi all, given the prominent position of akka.Done and akka.NotUsed: are these only meant to be used within akka streams, or also elsewhere? I am currently trying to introduce futures into a codebase with a lot of blocking, and it sure would be helpful to distinguish between methods returning U

Re: [akka-user] Custom GraphStage with Java Future

2016-02-24 Thread Konrad Malawski
Hi Gary, it's as simple as setting a dispatcher for a Flow. val flow = Flow[String].via(myBlockingStage).withAttributes(ActorAttributes.dispatcher(“my-configured-blocking-dispatcher”)) (setting a dispatcher also implies an asynchronous boundary). Of course try to avoid these blocking APIs, yo