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

2016-05-10 Thread atomly
Not strictly akka, but the design seems relatively straightforward. Use some form of event sourcing or message queue-- Kafka seems popular for this type of thing-- to submit/coordinate processing. Give every ten minute iteration a unique id. When you process an item in that iteration, note that

Re: [akka-user] Re: DI and Testing Streams

2016-05-10 Thread Richard Rodseth
Not really, but thanks. My biggest challenge is that I have a composite Source derived from multiple Slick 3 Sources. eg. val compositeSource = channelSource.flapMapConcat(ch => intervalSource(ch) ) For the moment I have a mockable trait with methods to construct those sources. On Tue, May 10,

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

2016-05-10 Thread kraythe
Ok, I am sorry, I can't be precise. NDAs and so on. Let me try to bullet point it. 1) Up to 10 million objects are in system. 2) At any time some of those 10 million can be ready to change state due to events in real life outside my control. 3) We check for eligible objects ever 10 minutes

Re: [akka-user] Please help: is it Akka SupervisorStrategy bug or configuration issue?

2016-05-10 Thread Patrik Nordwall
Isn't that because you have not thrown the exception until after the sleep? In general, don't block actor execution since it will not be able to react on any messages while it's blocked. Supervision is also based on messages. /Patrik On Tue, May 10, 2016 at 9:20 PM, Yan Pei

Re: [akka-user] Please help: is it Akka SupervisorStrategy bug or configuration issue?

2016-05-10 Thread Yan Pei
Thank you Patrik, The reason I put Thread.sleep() here is to simulate the real use case in which our KidActor needs to call a third party API and throw an Exception if something goes wrong(like unauthorized token). The API calling might take long time before the exception happen. Could

[akka-user] Please help: is it Akka SupervisorStrategy bug or configuration issue?

2016-05-10 Thread Yan Pei
Below is a simple AKKA SupervisorStrategy example: The SupervisorStrategy catchs the exception thrown from ChildActor with short time sleep in ChildActor.java, but it will not catch it if the Thread.sleep() is too long like below. The message will not be delivered to ChildActor for the long

[akka-user] Manually rebalance cluster shards

2016-05-10 Thread Zack Angelo
Is there a programmatic way to rebalance when using cluster sharding? Occasionally the cluster will reach a state where all the shards are running on a single node, and we'd like a way to manually trigger a rebalance using an API. -- >> Read the docs: http://akka.io/docs/

[akka-user] Re: How to assemble a Streams sink from multiple FileIO sinks?

2016-05-10 Thread Tom Peck
That's awesome thanks! Here's the final service: val rawFileSink = FileIO.toFile(file) val thumbnailFileSink = FileIO.toFile(getFile(path, Thumbnail)) val watermarkedFileSink = FileIO.toFile(getFile(path, Watermarked)) val graph = Sink.fromGraph(GraphDSL.create(rawFileSink,

[akka-user] Error when scheduling akka system with quartz scheduler

2016-05-10 Thread Amruta
I have scheduled a task that the actors carry out at a scheduled time(every 5 minutes). When I deploy my app the first time it runs fine but on the second and consequent runs it gives the folllowing error 09:22:00.006 [schedulerFactoryBean_Worker-2] ERROR (:) - Job

[akka-user] Akka Remoting Ports

2016-05-10 Thread enovo . soft
Hi, I have two remote actor systems deployed on two different cloud platforms, one deployed on Google (port 80) and the other one on AWS (port 2552). I am managing AWS machine only, Google machine is being managed by client. I am instantiating connection from AWS actor to Google actor, sending

Re: [akka-user] How to assemble a Streams sink from multiple FileIO sinks?

2016-05-10 Thread Akka Team
Hi Tom, If I understood, your layout looks like, this (slightly simplified) bytes --> broadcast --> map(x => Success(Done)) --> Sink.head | +> image | +> watermarked | +> thumbnail The first issue

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

2016-05-10 Thread Akka Team
I agree with Michael, I don't really understand what is actually needed here, it is too big wall of text :) But from what I understand, I second Michael's assesment is that you probably are after eventsourcing and akka-persistence. -Endre On Mon, May 9, 2016 at 7:28 PM, Michael Frank

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

2016-05-10 Thread Akka Team
Hi Tim, Feel free to experiment with these, I think these can be a good improvement for Source.queue. Source.actorRef is somewhat different though, it does not use a real ActorRef, it is a very special construct that makes a GraphStage look like an actor from the outside, but in fact all messages

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

2016-05-10 Thread Akka Team
Hi Mayank, You likely need a templating engine and you should pass parsed and validated parameters to it. One option is swirl, which is the template engine of Play (https://github.com/playframework/twirl), or there is scalatags (https://github.com/lihaoyi/scalatags) which uses a DSL to generate

Re: [akka-user] Re: Injecting messages on inactive stream

2016-05-10 Thread Akka Team
We have a "keepAlive" combinator for injecting idle messages. -Endre On Fri, May 6, 2016 at 7:21 PM, Konrad Malawski < konrad.malaw...@lightbend.com> wrote: > LOL, me too – totally forgot we have that one...! Of course we do. > Happy hakking / Have a nice weekend :-) > > -- > Konrad `ktoso`

[akka-user] Is UnboundedPriorityMailbox non blocking?

2016-05-10 Thread Edmondo Porcu
Hello, The Akka documentation says that the UnboundedPriorityMailbox is non-blocking (http://doc.akka.io/docs/akka/snapshot/scala/mailboxes.html) and it uses a PriorityBlockingQueue, whose add method is blocking. Is that a bug in the documentation or is that mailbox really not blocking? If it

Re: [akka-user] Re: [Akka-stream|http] - How to close a flow with killswitch from outside?

2016-05-10 Thread Akka Team
Hi, I am not sure I fully understand what you try to achieve. Throttle only stores one message, so there will be only one message outstanding when its upstream is closed, It might take some time to emit that, that's true, but this is what it supposed to do. If you don't want a proper

Re: [akka-user] `No elements passed in the last 1 minute` error in Http().superPool

2016-05-10 Thread Akka Team
Hi Durga, Yes, the pool should fill up its connections even if some of them were closed after a timeout. Which version of Akka are you using? Can you also explain in more detail what is that you observe (i.e. the symptom)? -Endre On Fri, May 6, 2016 at 9:29 AM, Durga Prasana

Re: [akka-user] Handling timeouts when consuming http services via pooled connections

2016-05-10 Thread Akka Team
Hi Chris, I have a bit of hard time visualizing the exact setup you refer to, can you create a small snippet that is roughly similar to your stream layout? It might be something fixable but I need to see something more concrete. -Endre On Thu, May 5, 2016 at 9:26 PM, Chris Baxter

[akka-user] How to assemble a Streams sink from multiple FileIO sinks?

2016-05-10 Thread Tom Peck
I'm trying to integrate an akka streams based flow in to my Play 2.5 app. The idea is that you can stream in a photo, then have it written to disk as the raw file, a thumbnailed version and a watermarked version. I managed to get this working using a graph something like this: val

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

2016-05-10 Thread Ian Clegg
Hi Justin, First off, many thanks for taking a look and the feedback. Requester looks very promising, i'm looking over the sources now. In some respects i'm lucky my problem is quite straightforward . Its clear that in the general case addressed by Requester, this is a not a trivial problem -

[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-10 Thread Flavio
Hello Frederico I have seen your question/topic and will post the code there (today). have fun! Flavio -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >>

[akka-user] akka persistence AtLeastOnceDelivery SupervisorStratege, RedeliveryTick and ReceiveTimeout

2016-05-10 Thread Yan Pei
Still have the problem with Parent Actor's supervisorStratege couldn't catch the exception thrown by kid actor when the exception happend after long time processing in kid actor. >From the Log, I can see [INFO] [05/10/2016 02:03:52.301] [arachne-actor-system-akka.actor.default- dispatcher-25]