[akka-user] Re: How to send a message in a reactive stream from the Sink to the Source in a web socket connection

2016-05-09 Thread Federico Jakimowicz
Hi Flavio, Sorry I don't have a response to your question but i wonder if you could share how those WebSocketCommandSubscriber-actor WebSocketDataPublisherActor-actor are implemented. thanks you El lunes, 9 de mayo de 2016, 17:00:17 (UTC-3), Flavio escribió: > My application has an Akka-Websoc

[akka-user] How to send a message in a reactive stream from the Sink to the Source in a web socket connection

2016-05-09 Thread Flavio
My application has an Akka-Websocket interface. The web socket consists of an actor-subscriber and an actor publisher. The subscriber handles commands, by sending them to a corresponding actor in the actor system. The publisher listens on the event stream and publishes update information back

Re: [akka-user] akka-persistence deliver doesn't work with SupervisorStrategy

2016-05-09 Thread Yan Pei
To be more accurate: In the second example of UserUmdbActor. Parent will catch this exception. try{ throw new Exception("testing..."); }catch(Exception e){ throw new RuntimeException("testing"); } But not this with sleep try{ try { Thread.sleep(1000l); } ca

[akka-user] akka and websockets integration in Java, how to push from server?

2016-05-09 Thread Federico Jakimowicz
Hi, I wonder if there is some example in the Java documentation on how to push to the browser from the server using akka websockets integration In the documentation there not seems to be much about it http://doc.akka.io/docs/akka/2.4.4/java/http/server-side/websocket-support.html Looking at simp

Re: [akka-user] akka-persistence deliver doesn't work with SupervisorStrategy

2016-05-09 Thread Yan Pei
public class UserPersistentActor extends AbstractPersistentActorWithAtLeastOnceDelivery { LoggingAdapter log = Logging.getLogger(getContext().system(), this); private ActorPath userUmdbActor; private static SupervisorStrategy strategy = new OneForOneStrategy(5, Duration.create("100 second"), new

Re: [akka-user] akka-persistence deliver doesn't work with SupervisorStrategy

2016-05-09 Thread Yan Pei
Thank you Patrik! Below is my simplified code structure... I manually throw exception from the child actor UserUmdbActor. public class UserPersistentActor extends AbstractPersistentActorWithAtLeastOnceDelivery { LoggingAdapter log = Logging.getLogger(getContext().system(), this); private Actor

Re: [akka-user] Forwarding an Ask while intercepting the result

2016-05-09 Thread Justin du coeur
Frankly, your code looks about right -- if this is a one-off situation, it's likely a good enough approach. You could also use pipeTo, but you'd have to inject the originalSender into the communication, so I suspect it would come out about equally complicated. I wouldn't normally talk up the Requ

Re: [akka-user] akka-persistence deliver doesn't work with SupervisorStrategy

2016-05-09 Thread Patrik Nordwall
That should be possible. Can you post a full gist of a minimized example that shows what you are doing? On Mon, May 9, 2016 at 6:37 PM, Yan Pei wrote: > Patrik, > In my case, it's not Persistent Actor throwing exception, it's the child > Actor of the Persistent Actor throwing exception. My exp

Re: [akka-user] Inspectable Inboxes? Resolving a large state processing problem.

2016-05-09 Thread Michael Frank
It would help if your problem statement was more concrete. however, in my vague understanding of the problem, it seems like event sourcing would be an appropriate way to model your business logic: http://martinfowler.com/eaaDev/EventSourcing.html if that is the case, then i think using akka p

Re: [akka-user] Inspectable Inboxes? Resolving a large state processing problem.

2016-05-09 Thread kraythe
Thats the thing, if there were humans with inboxes I could have a staff call them on the phone and check. :) Reprocessing the messages is a pretty simple solution IF the messages were small in number. When you get to the point where there are literally millions of events the problem gets a bit

Re: [akka-user] akka-persistence deliver doesn't work with SupervisorStrategy

2016-05-09 Thread Yan Pei
Patrik, In my case, it's not Persistent Actor throwing exception, it's the child Actor of the Persistent Actor throwing exception. My expectation is the Persistent Actor's SupervisorStrategy catching it then doing some thing with the child actor. Is that possible? Thanks, Yan On Monday, May

Re: [akka-user] Source.queue vs Source.actorRef vs custom GraphStage

2016-05-09 Thread Tim Harper
Well, to counter this argument, I think this is a question that should be asked of Source.queue and Source.actorRef, also. Source.actorRef will buffer forever with its mailbox, and the overflow protection is applied as that mailbox is drained, when the Actor is gets an opportunity to run. Also,

Re: [akka-user] akka-persistence deliver doesn't work with SupervisorStrategy

2016-05-09 Thread Yan Pei
Patrik, It's not during recovery. It's in the middle of normal sending message . Thanks, Yan On Monday, May 9, 2016 at 7:32:32 AM UTC-5, Patrik Nordwall wrote: > > Where does it throw the exception? If it's during recovery the persistent > actor will be stopped. > http://doc.akka.io/docs/akka

Re: [akka-user] Akka Persistence - Use only Snapshots

2016-05-09 Thread Filippo De Luca
Hi Peter, Assuming the actor has a status represented by a case class MyActorStatus. You need a way to write this status out and be able to reload. The akka-persistence uses the akka-serialization mechanism. It is an extension of Akka that you can use like this: private[this] var myStatus: MyActo

[akka-user] Fundamental question of actorSystem, Dependency Injection and creating actors.

2016-05-09 Thread 'Simon Jacobs' via Akka User List
Hey guys, I'm using the play framework in version 2.5 with integrated Akka and Guice and try to implement an actor system. I have already searched inside the user group, the play, guice and akka documentation but I'm very confused about the common patterns. I have a very common use-case: I wan

[akka-user] Forwarding an Ask while intercepting the result

2016-05-09 Thread Ian Clegg
Hi everyone, I'm looking for some advice. I have an actor whose state needs to be updated via a HTTP request. I'm using Akka HTTP with the Route DSL and an Ask pattern (this seems to be 'normal') onComplete(*broker ?* *UpdateCommand*(id, "something")) { case *Success*(u) => *complete*("upda

Re: [akka-user] Native LevelDB crashes Akka tests

2016-05-09 Thread Patrik Nordwall
It looks like we have not changed anything in akka-persistence (and it's leveldb journal) between those versions: https://github.com/akka/akka/compare/v2.3.9...v2.3.15 and the leveldb version was not changed (I don't know how that matches up with your native installation): https://github.com/akka/

Re: [akka-user] akka-persistence deliver doesn't work with SupervisorStrategy

2016-05-09 Thread Patrik Nordwall
Where does it throw the exception? If it's during recovery the persistent actor will be stopped. http://doc.akka.io/docs/akka/2.4.4/java/persistence.html#Failures Regards, Patrik On Sat, May 7, 2016 at 12:39 AM, Yan Pei wrote: > Hello, > > I am having a problem to apply SupervisorStrategy to

Re: [akka-user] Akka Persistence - Use only Snapshots

2016-05-09 Thread Filippo De Luca
In my opinion you don't need akka-persistence at all. You just want to save the current actor state. It could be done very easily without akka-persistence using the Serialisation to serialize the status. On 9 May 2016 at 10:31, 'Peter Schrott' via Akka User List < akka-user@googlegroups.com> wrote

Re: [akka-user] Akka Persistence - Use only Snapshots

2016-05-09 Thread Patrik Nordwall
Then you should not use Akka Persistence. Pick another solution that is designed for that usage. Akka Persistence is designed for event sourcing and snapshots are only an optimization to reduce replay times. Using only snapshots will probably result in bad performance. Regards, Patrik On Mon, May

[akka-user] Akka Persistence - Use only Snapshots

2016-05-09 Thread 'Peter Schrott' via Akka User List
Dear Pros, >From my Akka application it makes more sense to only use the snapshots. I don't want to use the journal at all. Do you see any problems with doing that which I might not have considered? My second problem with that is, that I wanted to delete old snapshots. I.e. keep only the curre

[akka-user] Akka-http : Load html page with dynamic values (location search property)

2016-05-09 Thread Mayank Bairagi
Hi there , I have a use case. Here is an akka-http route. get { pathPrefix("someRoute") { pathEndOrSingleSlash { getFromResource("index.html") } } } my index.html is as follows alert('QUERY PARMS : '+window.location.search) When I call index

Re: [akka-user] Active/passive deployment

2016-05-09 Thread Patrik Nordwall
This is the type of design/operational question that Lightbend's core Akka team will not be able to elaborate much on in the open-source mailing list. We provide commercial support where we are able to spend more time on such questions. That said,

Re: [akka-user] Source.queue vs Source.actorRef vs custom GraphStage

2016-05-09 Thread Viktor Klang
What happens if the queue is flooded before overflow protection kicks in? On Mon, May 9, 2016 at 10:19 AM, Tim Harper wrote: > You're right. However, we could leverage the fact that the queue size only > grows outside of the stage process. So, I think we could use a counter. > > On May 9, 2016,

Re: [akka-user] Source.queue vs Source.actorRef vs custom GraphStage

2016-05-09 Thread Tim Harper
You're right. However, we could leverage the fact that the queue size only grows outside of the stage process. So, I think we could use a counter. > On May 9, 2016, at 01:29, Viktor Klang wrote: > > Isn't CLQ.size O(N)? > > -- > Cheers, > √ > > On May 9, 2016 7:38 AM, "Tim Harper"

Re: [akka-user] Inspectable Inboxes? Resolving a large state processing problem.

2016-05-09 Thread Viktor Klang
I'm quite sure that inspecting the mbox will be costlier than reprocessing at those sizes. Come up with two different solutions that you could perform between humans having mailboxes. Pick the best of those. -- Cheers, √ On May 8, 2016 5:15 PM, "kraythe" wrote: > I have a process that has to m

Re: [akka-user] Source.queue vs Source.actorRef vs custom GraphStage

2016-05-09 Thread Viktor Klang
Isn't CLQ.size O(N)? -- Cheers, √ On May 9, 2016 7:38 AM, "Tim Harper" wrote: > I did some benchmarking to see how well `Source.actorRef` and > `Source.queue` performed. Also, I wanted to see how much better I could do > if I didn't need my Source to buffer (this stream is using conflate). It >