Re: [akka-user] Parallel File Processing with Akka Actors?
Hi Harit, You should try akka streams: http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC2/ It has all you need. There are also activator tutorials: http://www.typesafe.com/activator/template/akka-stream-java8 http://www.typesafe.com/activator/template/akka-stream-scala -Endre On Fri, May 8, 2015 at 2:23 AM, Harit Himanshu harit.subscripti...@gmail.com wrote: Hello This is what my use case looks like *Use Case* - Given many log files in range (2MB - 2GB), I need to parse each of these logs and apply some processing, generate Java POJO. - For this problem, lets assume that we have just 1 log file - Also, the idea is to making best use of System. Multiple cores are available. *Alternative 1* - Open file (synchronous), read each line, generate POJOs FileActor - read each line - ListPOJO *Pros*: simple to understand *Cons*: Serial Process, not taking advantage of multiple cores in the system *Alternative 2* - Open File (synchronous), read N lines (N is configurable), pass on to different actors to process / LogLineProcessActor 1FileActor - LogLineProcessRouter (with 10 Actors) -- LogLineProcessActor 2 \ LogLineProcessActor 10 *Pros* Some parallelization, by using different actors to process part of lines. Actors will make use of available cores in the system (? how, may be?) *Cons* Still Serial, because file read in serial fashion *Questions* - is any of the above choice a good choice? - Are there better alternatives? Please provide valuable thoughts here Thanks a lot -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Akka Team Typesafe - Reactive apps on the JVM Blog: letitcrash.com Twitter: @akkateam -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Akka with org.apache.log4j.MDC
I have struggled a lot with the same challenge. The MDC feature of the logging frameworks need a little more manual intervention when operating in an asynchronous runtime like Akka. MDC is tightly coupled to a thread, but communication with and between Actors happen in different threads. Hence, the MDC is not propagated automatically when sending messages between your actors. Basically, you need to pass the context you wish to log along with the messages in your system. So if you want to trace a requestId in a conversation between your actors, you need to pass the requestId along in the message, and then put it back in the MDC in the receiving actor. Regards, Nils-Helge Garli Hegvik On Thursday, May 7, 2015 at 10:27:59 AM UTC+2, byse...@gmail.com wrote: Hi √, I want to have MDC logging so I can organize my logs, for example according to requestId. I am tried out the example in http://doc.akka.io/docs/akka/2.3.10/scala/logging.html#MDC_values_defined_by_the_application . It works fine for a single actor, but If I'm sending a message to another Actor, the MDC values are not log on the other Actors. class RequestHandler() extends Actor with akka.actor.DiagnosticActorLogging{ override def mdc(currentMessage: Any): MDC = { currentMessage match { case req: TypeA = Map(requestId - req.id) case _ = Map() } } def receive: Receive = { case req: TypeA = log.debug(RECEIVE req typeA) //logged with correct [requestId - someRandom] val actorA = context.ActorOf(ActorA.props) actorA ! req //logs in actorA are do not have value on requestId (how to log them?) } } class ActorA() extends Actor with akka.actor.DiagnosticActorLogging {...} //logs of helperActors called by ActorA are not also logged with correct requestId (how to log them?) Is it possible with AKKA MDC to log all codeLogs (including logs from dependency libs) for a certain requestId with correct MDC map values? I also set akka logger to sl4fj on my application.conf akka { loggers = [akka.event.slf4j.Slf4jLogger] logging-filter = akka.event.slf4j.Slf4jLoggingFilter On Monday, April 27, 2015 at 3:30:47 PM UTC+8, √ wrote: Hi Anindita, It would be great for us to know what is lacking in the MDC sections of the Akka Logging documentation, please don't hesitate to contribute. Thanks! On Mon, Apr 27, 2015 at 8:09 AM, Anindita Ghatak anindi...@gmail.com wrote: Hi, How can I use Akka with org.apache.log4j.MDC ? Thanks Regards, Anindita -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com. To post to this group, send email to akka...@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Cheers, √ -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] How to attach multiple actors as sources to an Akka stream?
Hi, On Wed, May 6, 2015 at 3:49 PM, akka-streams-beginner vadik...@gmail.com wrote: I posted this question to stackoverflow ( http://stackoverflow.com/questions/30077766/how-to-attach-multiple-actors-as-sources-to-an-akka-stream), but then was pointed to this group, so I'll ask here: I am trying to build and run an akka stream flow (in Java DSL) with 2 actors as sources, then a merge junction and then 1 sink: SourceInteger, ActorRef src1 = Source.actorRef(100, OverflowStrategy.backpressure()); SourceInteger, ActorRef src2 = Source.actorRef(100, OverflowStrategy.backpressure()); SinkInteger, BoxedUnit sink = Flow.of(Integer.class).to(Sink.foreach(System.out::println)); RunnableFlowBoxedUnit closed = FlowGraph.factory().closed(sink, (b, out) - { UniformFanInShapeInteger, Integer merge = b.graph(Merge.Integercreate(2)); b.from(src1).via(merge).to(out); b.from(src2).to(merge); }); closed.run(mat); My question is how do I obtain ActorRef references to the source actors in order to send them messages? In case of 1 actor, I wouldn't be using graph builder, and then the .run() or runWith() method would return the ActorRef object. But what to do in case of many source actors? Is it even possible to materialize such a flow? You should pass src1, src2 as parameters to the .closed() method, and also define a function how to combine the materialized value of src1, src2 and sink. I.e. instead of just passing sink, you pass the sources, too. This way you can include all materialized values in a final value. -Endre Thanks -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Akka Team Typesafe - Reactive apps on the JVM Blog: letitcrash.com Twitter: @akkateam -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Re: How to attach multiple actors as sources to an Akka stream?
Hello, You could have a look at the akka-http websocket example by Johannes Rudolph: https://github.com/jrudolph/akka-http-scala-js-websocket-chat He doesn't combine two ActorRef sources, but he combines an ActorRef sink with an ActorRef source. The key is in the matValue function he uses in the chatFlow builder. As far as i can understand, this sends the materialized source ActorRef as a value through the stream: https://github.com/jrudolph/akka-http-scala-js-websocket-chat/blob/master/backend/src/main/scala/example/akkawschat/Chat.scala // Nic On Wednesday, May 6, 2015 at 4:50:37 PM UTC+3, akka-streams-beginner wrote: I posted this question to stackoverflow ( http://stackoverflow.com/questions/30077766/how-to-attach-multiple-actors-as-sources-to-an-akka-stream), but then was pointed to this group, so I'll ask here: I am trying to build and run an akka stream flow (in Java DSL) with 2 actors as sources, then a merge junction and then 1 sink: SourceInteger, ActorRef src1 = Source.actorRef(100, OverflowStrategy.backpressure()); SourceInteger, ActorRef src2 = Source.actorRef(100, OverflowStrategy.backpressure()); SinkInteger, BoxedUnit sink = Flow.of(Integer.class).to(Sink.foreach(System.out::println)); RunnableFlowBoxedUnit closed = FlowGraph.factory().closed(sink, (b, out) - { UniformFanInShapeInteger, Integer merge = b.graph(Merge.Integercreate(2)); b.from(src1).via(merge).to(out); b.from(src2).to(merge); }); closed.run(mat); My question is how do I obtain ActorRef references to the source actors in order to send them messages? In case of 1 actor, I wouldn't be using graph builder, and then the .run() or runWith() method would return the ActorRef object. But what to do in case of many source actors? Is it even possible to materialize such a flow? Thanks -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Play/Akka Web Socket application to serve three different areas of a web page
Hi, I am not sure if this is an Akka related question. You should probably post it on the Play ML instead. -Endre On Fri, May 8, 2015 at 11:46 AM, Nweike Onwuyali nweikeonwuy...@gmail.com wrote: I am building a Play/Akka Actors application . My Play application uses Web Socket to get messages for three different areas in a single View page. - The first is getting mails - The second is getting newsfeed - The third is getting notification. When the view page loads, i am suppose to populate these three areas with data from the server. How do i build a Play/Akka application to serve this page with data for the three on two different scenarios a) On load of the page b) Whenever data is available from the server -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Akka Team Typesafe - Reactive apps on the JVM Blog: letitcrash.com Twitter: @akkateam -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Re: Sudden akka 2.3.9 akka remoting failure
There are also some fixes pending for a 2.3.11 release which is almost out of the door. I recommend waiting for that and updating. -Endre On Thu, May 7, 2015 at 9:57 PM, Moiz Raja moizr...@gmail.com wrote: Looks like a lot of remoting/clustering fixes went into 2.3.10. We were facing an issue where the actor system in a cluster was being incorrectly restarted on startup - this was solved in 2.3.10. See if any of the fixed issues match your problem -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Akka Team Typesafe - Reactive apps on the JVM Blog: letitcrash.com Twitter: @akkateam -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Re: Akka Persistence on the Query Side: The Conclusion
Hi Alejandro, You have a number of options - when you have a single persistence Id, write a view for that - when you want to aggregate events of several persistence ids, you can do so via the event store (approach of Martin (with Kafka) and Greg (event store) ) Or you can aggregate the changes to a message queue and read that Or you can aggregate via another persistent actor that publishes the fact that something has changed for a specific other persistence id and start a view for that id (my approach) And there may be other ways to solve this of course. Kind regards, Olger On Fri, May 8, 2015 at 1:07 PM, Alejandro López ale64...@gmail.com wrote: Right now, what would be the best alternative in order to create projections, allowing views to subscribe to arbitrary events as described by Roland above? (or at least a coarse approximation) -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to a topic in the Google Groups Akka User List group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/MNDc9cVG1To/unsubscribe. To unsubscribe from this group and all its topics, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] What is the right way to wait for an actor to be terminated?
On Thu, May 7, 2015 at 9:26 PM, Moiz Raja moizr...@gmail.com wrote: This is a top level one - but it is not the only top level actor in the actor system. The only safe way to reuse a name is to watch the actor from the *parent* actor, and once received a Terminated message, create an actor with the same name. Note, that you cannot do this with top level actors, since their parent is unaccessible for users. This is simple to solve though, you just need to introduce a new top level actor, and put your other actors under that one. This is also a good practice, in general you should not have more than a couple of top level actors, supervising the other actors in your system. -Endre On Thursday, 7 May 2015 12:21:51 UTC-7, Konrad Malawski wrote: Is this a child actor we’re talking about or a top level one? -- Cheers, Konrad 'ktoso’ Malawski Akka http://akka.io @ Typesafe http://typesafe.com On 7 May 2015 at 21:18:27, Moiz Raja (moiz...@gmail.com) wrote: I have a need to wait for an actor to be terminated because I need to recreate a new actor with the same name on the same actor system. What would be the right way to wait for the old actor to be terminated? Note that I am sending a PoisonPill to the Actor as on now to terminate it. Thanks, -Moiz -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com. To post to this group, send email to akka...@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Akka Team Typesafe - Reactive apps on the JVM Blog: letitcrash.com Twitter: @akkateam -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Re: Play/Akka Web Socket application to serve three different areas of a web page
Hi Endre, I will do so On Friday, May 8, 2015 at 10:46:39 AM UTC+1, Nweike Onwuyali wrote: I am building a Play/Akka Actors application . My Play application uses Web Socket to get messages for three different areas in a single View page. - The first is getting mails - The second is getting newsfeed - The third is getting notification. When the view page loads, i am suppose to populate these three areas with data from the server. How do i build a Play/Akka application to serve this page with data for the three on two different scenarios a) On load of the page b) Whenever data is available from the server -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Re: Akka Persistence on the Query Side: The Conclusion
Right now, what would be the best alternative in order to create projections, allowing views to subscribe to arbitrary events as described by Roland above? (or at least a coarse approximation) -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] [java 2.3.x] Cluster response not working
Hi Endre, I am not seeing the early stop you mention. Are you talking about this line? https://github.com/chanan/java-cqrs-starter/blob/feature/ask-not-working/app/actors/GameActor.java#L45 That is inside the context().become and should only fire after the reply from the query cluster is received. On Friday, May 8, 2015 at 5:39:12 AM UTC-4, Akka Team wrote: It seems like you stop your actor too early, therefore messages destined to it fall into the void (dead letters). -Endre On Wed, May 6, 2015 at 6:03 PM, Chanan Braunstein chanan.b...@pearson.com javascript: wrote: Hi Endre, I got rid of the persistence to make it easier to recreate the problem. The github repo with instructions in the readme.md to recreate the issue are here: https://github.com/chanan/java-cqrs-starter/tree/feature/ask-not-working -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com javascript:. To post to this group, send email to akka...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Akka Team Typesafe - Reactive apps on the JVM Blog: letitcrash.com Twitter: @akkateam -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] [java 2.3.x] Cluster response not working
It seems like you stop your actor too early, therefore messages destined to it fall into the void (dead letters). -Endre On Wed, May 6, 2015 at 6:03 PM, Chanan Braunstein chanan.braunst...@pearson.com wrote: Hi Endre, I got rid of the persistence to make it easier to recreate the problem. The github repo with instructions in the readme.md to recreate the issue are here: https://github.com/chanan/java-cqrs-starter/tree/feature/ask-not-working -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Akka Team Typesafe - Reactive apps on the JVM Blog: letitcrash.com Twitter: @akkateam -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Play/Akka Web Socket application to serve three different areas of a web page
I am building a Play/Akka Actors application . My Play application uses Web Socket to get messages for three different areas in a single View page. - The first is getting mails - The second is getting newsfeed - The third is getting notification. When the view page loads, i am suppose to populate these three areas with data from the server. How do i build a Play/Akka application to serve this page with data for the three on two different scenarios a) On load of the page b) Whenever data is available from the server -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] [java 2.3.x] Cluster response not working
On Fri, May 8, 2015 at 1:07 PM, Chanan Braunstein chan...@gmail.com wrote: Hi Endre, I am not seeing the early stop you mention. Are you talking about this line? https://github.com/chanan/java-cqrs-starter/blob/feature/ask-not-working/app/actors/GameActor.java#L45 That is inside the context().become and should only fire after the reply from the query cluster is received. Ok, but accessing the sender() from the constructor, and then saving it is wrong. Since the actor has not yet received any messages, it will return the ActorRef of dead letters. -Endre On Friday, May 8, 2015 at 5:39:12 AM UTC-4, Akka Team wrote: It seems like you stop your actor too early, therefore messages destined to it fall into the void (dead letters). -Endre On Wed, May 6, 2015 at 6:03 PM, Chanan Braunstein chanan.b...@pearson.com wrote: Hi Endre, I got rid of the persistence to make it easier to recreate the problem. The github repo with instructions in the readme.md to recreate the issue are here: https://github.com/chanan/java-cqrs-starter/tree/feature/ask-not-working -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com. To post to this group, send email to akka...@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Akka Team Typesafe - Reactive apps on the JVM Blog: letitcrash.com Twitter: @akkateam -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Akka Team Typesafe - Reactive apps on the JVM Blog: letitcrash.com Twitter: @akkateam -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Re: akka-http
I used revolver and it still works... On Friday, 8 May 2015 01:07:05 UTC+2, Anton Kulaga wrote: I wonder what should I use to automatically restart my akka-http app as soon as some of its sources have been changed? Sbt-revolver looks more dead than alive. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Remote singleton actor discovering process
Hi, started to play with Akka remoting and I hit a problem with singleton actors. I have a 3 nodes Akka cluster with a singleton actor running somewhere under the /user/root/singleton path. I would like to send a message to this actor from any node in the cluster triggered by someone hitting a Play Controller endpoint. AFAIK, what I need to do is to get the ActorRef using: actorSystem.actorSelection(akka.tcp://mySystem@node1:2551/user/root/singleton) What I don't like is that I need to know *where* the singleton actor is running (e.g. node1:2551). Is there a way to broadcast a query like Are you there? to all nodes having the singleton actor respond with an Identify ?? What I'm trying to achieve is something like: actorSystem.actorSelection(akka.tcp://mySystem/user/root/singleton).mapTo[ActorRef] ! Hello with Akka figuring out where the singleton is. Not sure if is possible but worth asking :) Best, Ugo -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Re: Help desparately needed in motivating containerless deployment in mature enterprise
Hi Jacobus, I like your analogy of putting a Ferrari on the back of a truck. However, you can unload the Ferrari when you have reached the racing track. If you can't convince them that it is easier and better to run Akka outside the JEE container you can use the JEE Container for deployment, only. One way is to use a ServletContextListener that creates the Akka ActorSystem (and Akka Http server endpoint) when loaded and stops it on unload. Regards, Patrik On Fri, May 8, 2015 at 2:48 PM, lutzh lutz.huehn...@gmail.com wrote: Hi Jacobus, If you can look behind the somewhat provocative title, I think Eberhard Wolff gives a pretty comprehensive overview of why you should look beyond app servers in Java Application Servers Are Dead: http://jaxenter.com/java-application-servers-dead-1-111928.html http://jaxenter.com/java-application-servers-dead-112186.html http://www.infoq.com/interviews/eberhard-wolff-java-app-servers A bit too focused on Docker for my taste, but also valid: https://medium.com/@jstrachan/the-decline-of-java-application-servers-when-using-docker-containers-edbe032e1f30 Hope this helps, Lutz Am Mittwoch, 6. Mai 2015 20:51:01 UTC+2 schrieb Jacobus: Hi there, I'm hoping that someone can help me with advice on motivating why containerless services makes sense. I'm trying to motivate writing a new business service on Akka-HTTP, but other architects stands rock solid on the argument that only services that can be deployed inside Websphere Application Server must be allowed. Now, I realise I can probably make Akka-HTTP run inside a JEE container, but that will be like putting a Ferrari on the back of a truck. Their primary concerns are mostly around deployment, configuration, monitoring, etc. They also have a sense that things are just safer in Websphere for some kind or reason. They still think in terms of queues and transactions, etc. If anyone can give me some good business, operational or technical motivators, then I will be very grateful. Also, if you are aware of any stat's, benchmarks, etc. on this, then that will help too. Maybe groups like Gartner have done a bit of a writeup industry moving away from containers? Anything that can help will be greatly appreciated. I need some solid facts and ideas to back my statements. Thanks in advance. Cheers, Jacobus -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Patrik Nordwall Typesafe http://typesafe.com/ - Reactive apps on the JVM Twitter: @patriknw -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Re: Multiple recoveries on PersistentActor
After digging into akka.persistence.Eventsourced: *the implementation allows only one recovery, when the actor is started and before any commands are processed.* There does not seem to be a way to return to an awaiting recovery state without fiddling with the private behaviour of a PersistentActor. Perhaps this feature should be documented? Sylvain On Thursday, May 7, 2015 at 7:03:28 PM UTC+1, Sylvain Frey wrote: Am I right supposing that a PersistentActor supports only a single recovery? For instance, with a PersistentActor that has already persisted a number of events commands, when doing: persistentActor ! Recover(toSequenceNr = 2L) persistentActor ! Recover(toSequenceNr = 1L) only the first recovery ever happens - and only in case it manages to get in *before* the initial automatic recovery for PersistentActors, otherwise it is also discarded. In case this is unclear, I have a minimal test case at hand. The bigger picture: my goal was to implement a time travelling feature where actors would be sent back in time at runtime, to arbitrary past states (rewinding a simulation for instance). Thanks! Sylvain -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Making a source from an ActorPublisher
Hi, In the last milestone release that I was using, I used Source[T](Props[MyTPublisherActor]) to convert a PublisherActor into a source. On upgrading to the latest RC, this code doesn't compile. Is there something I should have imported to implicitly add this apply method back in? The associated tutorial doesn't mention any imports. http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-M2/scala/stream-integrations.html Matthew -- Dr Matthew Pocock Turing ate my hamster LTD mailto: turingatemyhams...@gmail.com Integrative Bioinformatics Group, School of Computing Science, Newcastle University mailto: matthew.poc...@ncl.ac.uk gchat: turingatemyhams...@gmail.com msn: matthew_poc...@yahoo.co.uk irc.freenode.net: drdozer skype: matthew.pocock tel: (0191) 2566550 mob: +447535664143 -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Remote singleton actor discovering process
... and there is s SingletonProxy that you can use from the the Play frontend nodes. /Patrik 8 maj 2015 kl. 17:29 skrev Akka Team akka.offic...@gmail.com: Hi Ugo, Have you looked at the Cluster Singleton module? http://doc.akka.io/docs/akka/2.3.10/contrib/cluster-singleton.html It solves this issue and also migration of the singleton on failures. I think you are better of using that module than trying to roll your own. -Endre On Fri, May 8, 2015 at 4:14 PM, Ugo Matrangolo ugo.matrang...@gmail.com wrote: Hi, started to play with Akka remoting and I hit a problem with singleton actors. I have a 3 nodes Akka cluster with a singleton actor running somewhere under the /user/root/singleton path. I would like to send a message to this actor from any node in the cluster triggered by someone hitting a Play Controller endpoint. AFAIK, what I need to do is to get the ActorRef using: actorSystem.actorSelection(akka.tcp://mySystem@node1:2551/user/root/singleton) What I don't like is that I need to know *where* the singleton actor is running (e.g. node1:2551). Is there a way to broadcast a query like Are you there? to all nodes having the singleton actor respond with an Identify ?? What I'm trying to achieve is something like: actorSystem.actorSelection(akka.tcp://mySystem/user/root/singleton).mapTo[ActorRef] ! Hello with Akka figuring out where the singleton is. Not sure if is possible but worth asking :) Best, Ugo -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Akka Team Typesafe - Reactive apps on the JVM Blog: letitcrash.com Twitter: @akkateam -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Making a source from an ActorPublisher
Hi Matthew, It is in the docs: http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC2/scala/stream-integrations.html The construct is now: val jobManagerSource = Source.actorPublisher[JobManager.Job](JobManager.props) We now has less overloaded apply() methods than before because it got out of control at some point. They still exist, but usually under an explicit method name. -Endre On Fri, May 8, 2015 at 5:46 PM, Matthew Pocock turingatemyhams...@gmail.com wrote: Hi, In the last milestone release that I was using, I used Source[T](Props[MyTPublisherActor]) to convert a PublisherActor into a source. On upgrading to the latest RC, this code doesn't compile. Is there something I should have imported to implicitly add this apply method back in? The associated tutorial doesn't mention any imports. http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-M2/scala/stream-integrations.html Matthew -- Dr Matthew Pocock Turing ate my hamster LTD mailto: turingatemyhams...@gmail.com Integrative Bioinformatics Group, School of Computing Science, Newcastle University mailto: matthew.poc...@ncl.ac.uk gchat: turingatemyhams...@gmail.com msn: matthew_poc...@yahoo.co.uk irc.freenode.net: drdozer skype: matthew.pocock tel: (0191) 2566550 mob: +447535664143 -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Re: Help desparately needed in motivating containerless deployment in mature enterprise
It really depends on the market you're in. Some markets (first I can think of are betting/gambling/banking) are very much against change. If you work in that sector you have two choices: 1) you resign and you go work with your friends in a startup working 24/7 but with the freedom to choose the tools you like (my choice) or 2) you fight to start adopting the technology and process you like in some non-core-business minor project. You have to prove on the field why your choice is better, and you can use the opportunity to learn at the same time. The more experienced you are, the more you know that you only know pros and cons of technologies after having used them in real -albeit small- production environments. I think the same applies to big companies (in general) that have old school operations departments. They cannot fire the websphere certified experts out of the blue. If you work in a more open minded company, you could do a POC yourself. I setup a cluster with ansible, docker, consul, a 3-node elasticsearch cluster, akka/scala standalone apps and redis (all of them containerised) in a couple of days. If you show that you can type vagrant up and seamlessly create and provision N VMs with your clustered app and maybe show how easy it is to upgrade the cluster by simply typing sbt docker:publish and ansible-playbook playbook.yml they could be impressed. It doesn't take more than a couple of hours a day for 1 or 2 weeks (depending on your experience) to build something like that to show off. The management is always more impressed by devops than code stuff, imho. *Build something, show 'em!* Cheers G On Friday, 8 May 2015 16:55:46 UTC+2, Patrik Nordwall wrote: Hi Jacobus, I like your analogy of putting a Ferrari on the back of a truck. However, you can unload the Ferrari when you have reached the racing track. If you can't convince them that it is easier and better to run Akka outside the JEE container you can use the JEE Container for deployment, only. One way is to use a ServletContextListener that creates the Akka ActorSystem (and Akka Http server endpoint) when loaded and stops it on unload. Regards, Patrik On Fri, May 8, 2015 at 2:48 PM, lutzh lutz.h...@gmail.com javascript: wrote: Hi Jacobus, If you can look behind the somewhat provocative title, I think Eberhard Wolff gives a pretty comprehensive overview of why you should look beyond app servers in Java Application Servers Are Dead: http://jaxenter.com/java-application-servers-dead-1-111928.html http://jaxenter.com/java-application-servers-dead-112186.html http://www.infoq.com/interviews/eberhard-wolff-java-app-servers A bit too focused on Docker for my taste, but also valid: https://medium.com/@jstrachan/the-decline-of-java-application-servers-when-using-docker-containers-edbe032e1f30 Hope this helps, Lutz Am Mittwoch, 6. Mai 2015 20:51:01 UTC+2 schrieb Jacobus: Hi there, I'm hoping that someone can help me with advice on motivating why containerless services makes sense. I'm trying to motivate writing a new business service on Akka-HTTP, but other architects stands rock solid on the argument that only services that can be deployed inside Websphere Application Server must be allowed. Now, I realise I can probably make Akka-HTTP run inside a JEE container, but that will be like putting a Ferrari on the back of a truck. Their primary concerns are mostly around deployment, configuration, monitoring, etc. They also have a sense that things are just safer in Websphere for some kind or reason. They still think in terms of queues and transactions, etc. If anyone can give me some good business, operational or technical motivators, then I will be very grateful. Also, if you are aware of any stat's, benchmarks, etc. on this, then that will help too. Maybe groups like Gartner have done a bit of a writeup industry moving away from containers? Anything that can help will be greatly appreciated. I need some solid facts and ideas to back my statements. Thanks in advance. Cheers, Jacobus -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com javascript:. To post to this group, send email to akka...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Patrik Nordwall Typesafe http://typesafe.com/ - Reactive apps on the JVM Twitter: @patriknw -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
Re: [akka-user] Re: Akka Persistence on the Query Side: The Conclusion
Hi Olger Could you please elaborate a bit on your appoach? I'm not sure I follow. Thanks. On Fri, May 8, 2015 at 4:17 AM, Olger Warnier ol...@spectare.nl wrote: Hi Alejandro, You have a number of options - when you have a single persistence Id, write a view for that - when you want to aggregate events of several persistence ids, you can do so via the event store (approach of Martin (with Kafka) and Greg (event store) ) Or you can aggregate the changes to a message queue and read that Or you can aggregate via another persistent actor that publishes the fact that something has changed for a specific other persistence id and start a view for that id (my approach) And there may be other ways to solve this of course. Kind regards, Olger On Fri, May 8, 2015 at 1:07 PM, Alejandro López ale64...@gmail.com wrote: Right now, what would be the best alternative in order to create projections, allowing views to subscribe to arbitrary events as described by Roland above? (or at least a coarse approximation) -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to a topic in the Google Groups Akka User List group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/MNDc9cVG1To/unsubscribe. To unsubscribe from this group and all its topics, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Connecting junctions to a graph with akka-streams 1.0-RC2
Thanks for the swift reply. So creating junctions will actually create Graphs which you explicitly need to connect. This must have been changed then, because I remember in earlier versions you didn't need to make any explicit calls to the builder and you could just wire/connect them using the ~ operator from FlowGraphImplicits. Why can't this make the connection implicitly? On Friday, May 8, 2015 at 2:37:30 PM UTC+2, Akka Team wrote: Hi Jeoren. On Fri, May 8, 2015 at 2:03 PM, Jeroen Rosenberg jeroen.r...@gmail.com javascript: wrote: I'm trying to consume a stream from a streaming API (based on akka-http and akka-streams 1.0-RC2). I'm currently using spray client, since I couldn't figure out how to do it with Akka Http client yet, but this is another topic (some pointers are appreciated, though). Anyway, I'm creating a FlowGraph to process the chunks of my stream. I'm using a few junctions, such as Balance and Merge. Here's a simplified version of the code. val source = Source(ActorPublisher[HttpData.NonEmpty](someProcessor)) FlowGraph.closed() { implicit b = import FlowGraph.Implicits._ alancer = Balance[HttpData.Nonval Embpty](2).shape val merger = Merge[Try[Map[String,Any]]](2).shape source ~ balancer.in balancer.out(0) ~ merger.in(0) balancer.out(1) ~ merger.in(1) merger.out ~ Sink.ignore }.run() When I try to run this I'm getting: java.lang.IllegalArgumentException: requirement failed: The input port [ UniformFanOut.in] is not part of the underlying graph. Because you have not added them to the graph. When I explicitly call .add on the builder to add the junctions to the Graph it works (see code below): val source = Source(ActorPublisher[HttpData.NonEmpty](someProcessor)) FlowGraph.closed() { implicit b = import FlowGraph.Implicits._ val balancer = b.add(Balance[HttpData.NonEmpty](2)) val merger = b.add(Merge[Try[Map[String,Any]]](2)) source ~ balancer.in balancer.out(0) ~ merger.in(0) balancer.out(1) ~ merger.in(1) merger.out ~ Sink.ignore }.run() Is this really necessary? Yes. If so, why? Because otherwise they are not made part of the graph. The builder somehow need to know that you want to add them. For example: balancer = Balance[HttpData.Nonval Empty](2) // creates a standalone graph that is a balancer with two output ports. The builder have no clue about this graph, this is a standalone thing. balancer1 = b.add(balancer) // embeds a copy of balancer into the graph being built balancer2 = b.add(balancer) // embeds another copy of balancer into the graph // balancer1 is not the same instance as balancer2 -Endre -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com javascript:. To post to this group, send email to akka...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Akka Team Typesafe - Reactive apps on the JVM Blog: letitcrash.com Twitter: @akkateam -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Connecting junctions to a graph with akka-streams 1.0-RC2
Hi Jeoren On Fri, May 8, 2015 at 2:55 PM, Jeroen Rosenberg jeroen.rosenb...@gmail.com wrote: Thanks for the swift reply. So creating junctions will actually create Graphs which you explicitly need to connect. This must have been changed then, because I remember in earlier versions you didn't need to make any explicit calls to the builder and you could just wire/connect them using the ~ operator from FlowGraphImplicits. No, that was never true. You always had to assign them to variables first in order to use the ~ operator, since you cannot ever connect up a proper junction (more than 2 ports) in just one line. The difference was only that the apply() methods of Balance/Merge, etc, took an implicit builder all the time, and automatically added the junctions to the graph. You could not use these junctions outside of a builder block ever. Why can't this make the connection implicitly? Because you can now use graphs in much more rich ways than before. For example you can add junctions statically (or any other graph) as parameters to the closed() method and therefore use their materialized values. No builder needed at that point. Also forcing the apply() functions to take an implicit builder would mean that you cannot construct these graphs outside a builder block, which would exclude many valid (and useful) use cases. For example now you can create a function that accepts a certain shaped graph, for example with 1 input and 2 output ports. Now you can pass to that function any graph, including a custom, composite one, or a simple atomic one, like Balance. We *do* implicit additions for Flows and Sources in builder blocks though, but the only reason why that is possible is because they can be wired up in one line: x ~ myFlow ~ y But a junction is never fully connectable on one line, so you need to store it into a variable. So now you can - create and accept free-floating independent graphs - you can embed them into another graph (arbitrarily many times) using b.add - connect the instances as you see fit (each embedding is a new instance) In fact, you can write the flow example like this: f = b.add(flow) x ~ f.inlet f.outlet ~ y // or x ~ f ~ y -Endre On Friday, May 8, 2015 at 2:37:30 PM UTC+2, Akka Team wrote: Hi Jeoren. On Fri, May 8, 2015 at 2:03 PM, Jeroen Rosenberg jeroen.r...@gmail.com wrote: I'm trying to consume a stream from a streaming API (based on akka-http and akka-streams 1.0-RC2). I'm currently using spray client, since I couldn't figure out how to do it with Akka Http client yet, but this is another topic (some pointers are appreciated, though). Anyway, I'm creating a FlowGraph to process the chunks of my stream. I'm using a few junctions, such as Balance and Merge. Here's a simplified version of the code. val source = Source(ActorPublisher[HttpData.NonEmpty](someProcessor)) FlowGraph.closed() { implicit b = import FlowGraph.Implicits._ alancer = Balance[HttpData.Nonval Embpty](2).shape val merger = Merge[Try[Map[String,Any]]](2).shape source ~ balancer.in balancer.out(0) ~ merger.in(0) balancer.out(1) ~ merger.in(1) merger.out ~ Sink.ignore }.run() When I try to run this I'm getting: java.lang.IllegalArgumentException: requirement failed: The input port [ UniformFanOut.in] is not part of the underlying graph. Because you have not added them to the graph. When I explicitly call .add on the builder to add the junctions to the Graph it works (see code below): val source = Source(ActorPublisher[HttpData.NonEmpty](someProcessor)) FlowGraph.closed() { implicit b = import FlowGraph.Implicits._ val balancer = b.add(Balance[HttpData.NonEmpty](2)) val merger = b.add(Merge[Try[Map[String,Any]]](2)) source ~ balancer.in balancer.out(0) ~ merger.in(0) balancer.out(1) ~ merger.in(1) merger.out ~ Sink.ignore }.run() Is this really necessary? Yes. If so, why? Because otherwise they are not made part of the graph. The builder somehow need to know that you want to add them. For example: balancer = Balance[HttpData.Nonval Empty](2) // creates a standalone graph that is a balancer with two output ports. The builder have no clue about this graph, this is a standalone thing. balancer1 = b.add(balancer) // embeds a copy of balancer into the graph being built balancer2 = b.add(balancer) // embeds another copy of balancer into the graph // balancer1 is not the same instance as balancer2 -Endre -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop
Re: [akka-user] Parallel File Processing with Akka Actors?
Hi Idar I just confirmed with some of our team mates that it depends upon our customers. 1. Some customers use local disk and remove logs after processing. There are customers who use NAS based storage. None uses SSD as per my understanding. 2. The logs differ in size a lot. Depends on log rolling rules, this may range from some Megabytes to few Gigabytes. 3. The processing is not much. we decide either to ignore the logLine(based on certain condition), encrypt certain data, and build a format(usually JSON). Do you have better idea or would your recommendation differ based on this information? Thank you + Harit Himanshu On Thursday, May 7, 2015 at 11:44:04 PM UTC-7, Idar Borlaug wrote: What filesystem and disks are you reading the files from? Reading a file in one actor is a good idea, because you can read it sequentially. Reading from 10 different places in the same file can be a lot slower or faster. MPIIO which are used in computational clusters have methods for splitting a file and reading one part each on different nodes. How much processing is there for each line? I would implement both alternatives and do some benchmarking. Maby a third would be to read the files in each LogLineProcessActor and ditch the FileActor. What would also be cool, is to have an async IO for reading the files. I have no experience with that. On Fri, May 8, 2015 at 2:23 AM Harit Himanshu harit.sub...@gmail.com javascript: wrote: Hello This is what my use case looks like *Use Case* - Given many log files in range (2MB - 2GB), I need to parse each of these logs and apply some processing, generate Java POJO. - For this problem, lets assume that we have just 1 log file - Also, the idea is to making best use of System. Multiple cores are available. *Alternative 1* - Open file (synchronous), read each line, generate POJOs FileActor - read each line - ListPOJO *Pros*: simple to understand *Cons*: Serial Process, not taking advantage of multiple cores in the system *Alternative 2* - Open File (synchronous), read N lines (N is configurable), pass on to different actors to process / LogLineProcessActor 1FileActor - LogLineProcessRouter (with 10 Actors) -- LogLineProcessActor 2 \ LogLineProcessActor 10 *Pros* Some parallelization, by using different actors to process part of lines. Actors will make use of available cores in the system (? how, may be?) *Cons* Still Serial, because file read in serial fashion *Questions* - is any of the above choice a good choice? - Are there better alternatives? Please provide valuable thoughts here Thanks a lot -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com javascript:. To post to this group, send email to akka...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] using Akka with Kamon...
This is what I have in the pom dependency groupIdio.kamon/groupId artifactIdkamon-core_2.11/artifactId version0.3.5/version /dependency dependency groupIdio.kamon/groupId artifactIdkamon-log-reporter_2.11/artifactId version0.3.5/version /dependency plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId version2.18.1/version configuration argLine-javaagent:path to aspectjweaver-1.7.4.jar/argLine /configuration /plugin and in my application.conf extensions = [kamon.metric.Metrics] a test like will cause the error to happen. @Test public void testForFoo() { final TestActorRefFooActor ref = TestActorRef.create(system, Props.create(FooActor.class), testFoo); Object obj = ref.underlyingActor().testFoo(ByteString.fromArray( abc.getBytes())); } On Friday, May 8, 2015 at 4:47:36 AM UTC-7, Ivan Topolnjak wrote: Hello TS, I have been trying to find some additional info regarding this issue, but couldn't find anything yet :(... is it possible for you to provide us a little example to reproduce the issue? On Fri, May 8, 2015 at 2:59 AM TS test.te...@gmail.com javascript: wrote: Ivan, Any updates on this. Thanks in advance. On Wednesday, May 6, 2015 at 11:05:54 AM UTC-7, TS wrote: Ivan, Sorry about the cross post. I was not sure where I should post. I am using Kamon 0.3.5 On Wednesday, May 6, 2015 at 5:51:27 AM UTC-7, Ivan Topolnjak wrote: Hello TS! I just replied to you other email, please disregard that thread and post your answer here.. what Kamon version are you using? On Wed, May 6, 2015 at 3:07 AM TS test.te...@gmail.com wrote: I just started using Kamon. I am getting an error while weaving (This happens when my tests run. My surefire plugin has argLine with javaagent pointing to aspectjweaver.jar Any words of wisdom would be appreciated. Thanks in advance, TS java.lang.Exception: Unexpected exception, expectedjava.lang.ClassCastException but wasjava.lang.IncompatibleClassChangeError at akka.instrumentation.ActorCellInstrumentation.afterCreation(ActorCellInstrumentation.scala:42) at akka.actor.ActorCell.init(ActorCell.scala:397) at akka.actor.LocalActorRef.newActorCell(ActorRef.scala:320) at akka.actor.LocalActorRef.init(ActorRef.scala:316) at akka.actor.LocalActorRefProvider$$anon$1.init(ActorRefProvider.scala:574) at akka.actor.LocalActorRefProvider.rootGuardian$lzycompute(ActorRefProvider.scala:574) at akka.actor.LocalActorRefProvider.rootGuardian(ActorRefProvider.scala:573) at akka.actor.LocalActorRefProvider.init(ActorRefProvider.scala:628) at akka.actor.ActorSystemImpl.liftedTree2$1(ActorSystem.scala:663) at akka.actor.ActorSystemImpl._start$lzycompute(ActorSystem.scala:660) at akka.actor.ActorSystemImpl._start(ActorSystem.scala:660) at akka.actor.ActorSystemImpl.start(ActorSystem.scala:676) at akka.actor.ActorSystem$.apply(ActorSystem.scala:143) at akka.actor.ActorSystem$.apply(ActorSystem.scala:110) at akka.actor.ActorSystem$.create(ActorSystem.scala:58) at akka.actor.ActorSystem.create(ActorSystem.scala:1) -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com. To post to this group, send email to akka...@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com javascript:. To post to this group, send email to akka...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at
Re: [akka-user] Parallel File Processing with Akka Actors?
@AkkaTeam, thank you very much, seems like a weekend reading :). I will get back based on my progress/questions. Thank you On Thursday, May 7, 2015 at 11:55:01 PM UTC-7, Akka Team wrote: Hi Harit, You should try akka streams: http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC2/ It has all you need. There are also activator tutorials: http://www.typesafe.com/activator/template/akka-stream-java8 http://www.typesafe.com/activator/template/akka-stream-scala -Endre On Fri, May 8, 2015 at 2:23 AM, Harit Himanshu harit.sub...@gmail.com javascript: wrote: Hello This is what my use case looks like *Use Case* - Given many log files in range (2MB - 2GB), I need to parse each of these logs and apply some processing, generate Java POJO. - For this problem, lets assume that we have just 1 log file - Also, the idea is to making best use of System. Multiple cores are available. *Alternative 1* - Open file (synchronous), read each line, generate POJOs FileActor - read each line - ListPOJO *Pros*: simple to understand *Cons*: Serial Process, not taking advantage of multiple cores in the system *Alternative 2* - Open File (synchronous), read N lines (N is configurable), pass on to different actors to process / LogLineProcessActor 1FileActor - LogLineProcessRouter (with 10 Actors) -- LogLineProcessActor 2 \ LogLineProcessActor 10 *Pros* Some parallelization, by using different actors to process part of lines. Actors will make use of available cores in the system (? how, may be?) *Cons* Still Serial, because file read in serial fashion *Questions* - is any of the above choice a good choice? - Are there better alternatives? Please provide valuable thoughts here Thanks a lot -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com javascript:. To post to this group, send email to akka...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Akka Team Typesafe - Reactive apps on the JVM Blog: letitcrash.com Twitter: @akkateam -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Connecting junctions to a graph with akka-streams 1.0-RC2
Hi Jeoren. On Fri, May 8, 2015 at 2:03 PM, Jeroen Rosenberg jeroen.rosenb...@gmail.com wrote: I'm trying to consume a stream from a streaming API (based on akka-http and akka-streams 1.0-RC2). I'm currently using spray client, since I couldn't figure out how to do it with Akka Http client yet, but this is another topic (some pointers are appreciated, though). Anyway, I'm creating a FlowGraph to process the chunks of my stream. I'm using a few junctions, such as Balance and Merge. Here's a simplified version of the code. val source = Source(ActorPublisher[HttpData.NonEmpty](someProcessor)) FlowGraph.closed() { implicit b = import FlowGraph.Implicits._ alancer = Balance[HttpData.Nonval Embpty](2).shape val merger = Merge[Try[Map[String,Any]]](2).shape source ~ balancer.in balancer.out(0) ~ merger.in(0) balancer.out(1) ~ merger.in(1) merger.out ~ Sink.ignore }.run() When I try to run this I'm getting: java.lang.IllegalArgumentException: requirement failed: The input port [ UniformFanOut.in] is not part of the underlying graph. Because you have not added them to the graph. When I explicitly call .add on the builder to add the junctions to the Graph it works (see code below): val source = Source(ActorPublisher[HttpData.NonEmpty](someProcessor)) FlowGraph.closed() { implicit b = import FlowGraph.Implicits._ val balancer = b.add(Balance[HttpData.NonEmpty](2)) val merger = b.add(Merge[Try[Map[String,Any]]](2)) source ~ balancer.in balancer.out(0) ~ merger.in(0) balancer.out(1) ~ merger.in(1) merger.out ~ Sink.ignore }.run() Is this really necessary? Yes. If so, why? Because otherwise they are not made part of the graph. The builder somehow need to know that you want to add them. For example: balancer = Balance[HttpData.Nonval Empty](2) // creates a standalone graph that is a balancer with two output ports. The builder have no clue about this graph, this is a standalone thing. balancer1 = b.add(balancer) // embeds a copy of balancer into the graph being built balancer2 = b.add(balancer) // embeds another copy of balancer into the graph // balancer1 is not the same instance as balancer2 -Endre -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Akka Team Typesafe - Reactive apps on the JVM Blog: letitcrash.com Twitter: @akkateam -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Connecting junctions to a graph with akka-streams 1.0-RC2
I'm trying to consume a stream from a streaming API (based on akka-http and akka-streams 1.0-RC2). I'm currently using spray client, since I couldn't figure out how to do it with Akka Http client yet, but this is another topic (some pointers are appreciated, though). Anyway, I'm creating a FlowGraph to process the chunks of my stream. I'm using a few junctions, such as Balance and Merge. Here's a simplified version of the code. val source = Source(ActorPublisher[HttpData.NonEmpty](someProcessor)) FlowGraph.closed() { implicit b = import FlowGraph.Implicits._ val balancer = Balance[HttpData.NonEmpty](2).shape val merger = Merge[Try[Map[String,Any]]](2).shape source ~ balancer.in balancer.out(0) ~ merger.in(0) balancer.out(1) ~ merger.in(1) merger.out ~ Sink.ignore }.run() When I try to run this I'm getting: java.lang.IllegalArgumentException: requirement failed: The input port [ UniformFanOut.in] is not part of the underlying graph. When I explicitly call .add on the builder to add the junctions to the Graph it works (see code below): val source = Source(ActorPublisher[HttpData.NonEmpty](someProcessor)) FlowGraph.closed() { implicit b = import FlowGraph.Implicits._ val balancer = b.add(Balance[HttpData.NonEmpty](2)) val merger = b.add(Merge[Try[Map[String,Any]]](2)) source ~ balancer.in balancer.out(0) ~ merger.in(0) balancer.out(1) ~ merger.in(1) merger.out ~ Sink.ignore }.run() Is this really necessary? If so, why? -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Re: Help desparately needed in motivating containerless deployment in mature enterprise
Hi Jacobus, If you can look behind the somewhat provocative title, I think Eberhard Wolff gives a pretty comprehensive overview of why you should look beyond app servers in Java Application Servers Are Dead: http://jaxenter.com/java-application-servers-dead-1-111928.html http://jaxenter.com/java-application-servers-dead-112186.html http://www.infoq.com/interviews/eberhard-wolff-java-app-servers A bit too focused on Docker for my taste, but also valid: https://medium.com/@jstrachan/the-decline-of-java-application-servers-when-using-docker-containers-edbe032e1f30 Hope this helps, Lutz Am Mittwoch, 6. Mai 2015 20:51:01 UTC+2 schrieb Jacobus: Hi there, I'm hoping that someone can help me with advice on motivating why containerless services makes sense. I'm trying to motivate writing a new business service on Akka-HTTP, but other architects stands rock solid on the argument that only services that can be deployed inside Websphere Application Server must be allowed. Now, I realise I can probably make Akka-HTTP run inside a JEE container, but that will be like putting a Ferrari on the back of a truck. Their primary concerns are mostly around deployment, configuration, monitoring, etc. They also have a sense that things are just safer in Websphere for some kind or reason. They still think in terms of queues and transactions, etc. If anyone can give me some good business, operational or technical motivators, then I will be very grateful. Also, if you are aware of any stat's, benchmarks, etc. on this, then that will help too. Maybe groups like Gartner have done a bit of a writeup industry moving away from containers? Anything that can help will be greatly appreciated. I need some solid facts and ideas to back my statements. Thanks in advance. Cheers, Jacobus -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] using Akka with Kamon...
Hello TS, I have been trying to find some additional info regarding this issue, but couldn't find anything yet :(... is it possible for you to provide us a little example to reproduce the issue? On Fri, May 8, 2015 at 2:59 AM TS test.tester1...@gmail.com wrote: Ivan, Any updates on this. Thanks in advance. On Wednesday, May 6, 2015 at 11:05:54 AM UTC-7, TS wrote: Ivan, Sorry about the cross post. I was not sure where I should post. I am using Kamon 0.3.5 On Wednesday, May 6, 2015 at 5:51:27 AM UTC-7, Ivan Topolnjak wrote: Hello TS! I just replied to you other email, please disregard that thread and post your answer here.. what Kamon version are you using? On Wed, May 6, 2015 at 3:07 AM TS test.te...@gmail.com wrote: I just started using Kamon. I am getting an error while weaving (This happens when my tests run. My surefire plugin has argLine with javaagent pointing to aspectjweaver.jar Any words of wisdom would be appreciated. Thanks in advance, TS java.lang.Exception: Unexpected exception, expectedjava.lang.ClassCastException but wasjava.lang.IncompatibleClassChangeError at akka.instrumentation.ActorCellInstrumentation.afterCreation(ActorCellInstrumentation.scala:42) at akka.actor.ActorCell.init(ActorCell.scala:397) at akka.actor.LocalActorRef.newActorCell(ActorRef.scala:320) at akka.actor.LocalActorRef.init(ActorRef.scala:316) at akka.actor.LocalActorRefProvider$$anon$1.init(ActorRefProvider.scala:574) at akka.actor.LocalActorRefProvider.rootGuardian$lzycompute(ActorRefProvider.scala:574) at akka.actor.LocalActorRefProvider.rootGuardian(ActorRefProvider.scala:573) at akka.actor.LocalActorRefProvider.init(ActorRefProvider.scala:628) at akka.actor.ActorSystemImpl.liftedTree2$1(ActorSystem.scala:663) at akka.actor.ActorSystemImpl._start$lzycompute(ActorSystem.scala:660) at akka.actor.ActorSystemImpl._start(ActorSystem.scala:660) at akka.actor.ActorSystemImpl.start(ActorSystem.scala:676) at akka.actor.ActorSystem$.apply(ActorSystem.scala:143) at akka.actor.ActorSystem$.apply(ActorSystem.scala:110) at akka.actor.ActorSystem$.create(ActorSystem.scala:58) at akka.actor.ActorSystem.create(ActorSystem.scala:1) -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com. To post to this group, send email to akka...@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] [java 2.3.x] Cluster response not working
Oops, you are right, I will move it into the receive loop and try again shortly, thanks! -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] [java 2.3.x] Cluster response not working
No that does not fix the issue. The sender is a problem if it ever got that far, but the problem is it does even seem to reach this actor. If it did this line: https://github.com/chanan/java-cqrs-starter/blob/master/app/actors/GameActor.java#L61 would have been output into the log which it is not. On Friday, May 8, 2015 at 7:29:43 AM UTC-4, Chanan Braunstein wrote: Oops, you are right, I will move it into the receive loop and try again shortly, thanks! -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] using Akka with Kamon...
Never mind. I was missing some configuration. I do see kamon.logreporter.LogReporterSubscriber : No user metrics reported I need to get the kamon configuration for actorCount etc. On Friday, May 8, 2015 at 6:16:44 PM UTC-7, TS wrote: OK. Good news: Using 2.3.10, no errors. However, I am using kamon log reporter. I do not see any actor metrics on my logs. Should I enable something on application.conf? On Friday, May 8, 2015 at 4:40:14 PM UTC-7, Ivan Topolnjak wrote: Oh, that can be a problem! We have not tested Kamon with 2.4 yet and probably the issue you are facing is due to Kamon's bytecode being liked to certain Akka internals that changed between 2.3 and 2.4. Is it possible for you to use Akka 2.3? I will let you know when we get ready to support Akka 2.4, regards! On Sat, May 9, 2015 at 1:20 AM TS test.te...@gmail.com wrote: BTW, I am using akka 2.4-SNAPSHOT On Friday, May 8, 2015 at 3:54:41 PM UTC-7, TS wrote: This is what I have in the pom dependency groupIdio.kamon/groupId artifactIdkamon-core_2.11/artifactId version0.3.5/version /dependency dependency groupIdio.kamon/groupId artifactIdkamon-log-reporter_2.11/artifactId version0.3.5/version /dependency plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId version2.18.1/version configuration argLine-javaagent:path to aspectjweaver -1.7.4.jar/argLine /configuration /plugin and in my application.conf extensions = [kamon.metric.Metrics] a test like will cause the error to happen. @Test public void testForFoo() { final TestActorRefFooActor ref = TestActorRef.create(system, Props.create(FooActor.class), testFoo); Object obj = ref .underlyingActor().testFoo(ByteString.fromArray(abc.getBytes())); } On Friday, May 8, 2015 at 4:47:36 AM UTC-7, Ivan Topolnjak wrote: Hello TS, I have been trying to find some additional info regarding this issue, but couldn't find anything yet :(... is it possible for you to provide us a little example to reproduce the issue? On Fri, May 8, 2015 at 2:59 AM TS test.te...@gmail.com wrote: Ivan, Any updates on this. Thanks in advance. On Wednesday, May 6, 2015 at 11:05:54 AM UTC-7, TS wrote: Ivan, Sorry about the cross post. I was not sure where I should post. I am using Kamon 0.3.5 On Wednesday, May 6, 2015 at 5:51:27 AM UTC-7, Ivan Topolnjak wrote: Hello TS! I just replied to you other email, please disregard that thread and post your answer here.. what Kamon version are you using? On Wed, May 6, 2015 at 3:07 AM TS test.te...@gmail.com wrote: I just started using Kamon. I am getting an error while weaving (This happens when my tests run. My surefire plugin has argLine with javaagent pointing to aspectjweaver.jar Any words of wisdom would be appreciated. Thanks in advance, TS java.lang.Exception: Unexpected exception, expectedjava.lang.ClassCastException but wasjava.lang.IncompatibleClassChangeError at akka.instrumentation.ActorCellInstrumentation.afterCreation(ActorCellInstrumentation.scala:42) at akka.actor.ActorCell.init(ActorCell.scala:397) at akka.actor.LocalActorRef.newActorCell(ActorRef.scala:320) at akka.actor.LocalActorRef.init(ActorRef.scala:316) at akka.actor.LocalActorRefProvider$$anon$1.init(ActorRefProvider.scala:574) at akka.actor.LocalActorRefProvider.rootGuardian$lzycompute(ActorRefProvider.scala:574) at akka.actor.LocalActorRefProvider.rootGuardian(ActorRefProvider.scala:573) at akka.actor.LocalActorRefProvider.init(ActorRefProvider.scala:628) at akka.actor.ActorSystemImpl.liftedTree2$1(ActorSystem.scala:663) at akka.actor.ActorSystemImpl._start$lzycompute(ActorSystem.scala:660) at akka.actor.ActorSystemImpl._start(ActorSystem.scala:660) at akka.actor.ActorSystemImpl.start(ActorSystem.scala:676) at akka.actor.ActorSystem$.apply(ActorSystem.scala:143) at akka.actor.ActorSystem$.apply(ActorSystem.scala:110) at akka.actor.ActorSystem$.create(ActorSystem.scala:58) at akka.actor.ActorSystem.create(ActorSystem.scala:1) -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com. To post to this group, send email to akka...@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives:
Re: [akka-user] using Akka with Kamon...
Oh, that can be a problem! We have not tested Kamon with 2.4 yet and probably the issue you are facing is due to Kamon's bytecode being liked to certain Akka internals that changed between 2.3 and 2.4. Is it possible for you to use Akka 2.3? I will let you know when we get ready to support Akka 2.4, regards! On Sat, May 9, 2015 at 1:20 AM TS test.tester1...@gmail.com wrote: BTW, I am using akka 2.4-SNAPSHOT On Friday, May 8, 2015 at 3:54:41 PM UTC-7, TS wrote: This is what I have in the pom dependency groupIdio.kamon/groupId artifactIdkamon-core_2.11/artifactId version0.3.5/version /dependency dependency groupIdio.kamon/groupId artifactIdkamon-log-reporter_2.11/artifactId version0.3.5/version /dependency plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId version2.18.1/version configuration argLine-javaagent:path to aspectjweaver-1.7.4.jar/argLine /configuration /plugin and in my application.conf extensions = [kamon.metric.Metrics] a test like will cause the error to happen. @Test public void testForFoo() { final TestActorRefFooActor ref = TestActorRef.create(system, Props.create(FooActor.class), testFoo); Object obj = ref.underlyingActor().testFoo(ByteString.fromArray( abc.getBytes())); } On Friday, May 8, 2015 at 4:47:36 AM UTC-7, Ivan Topolnjak wrote: Hello TS, I have been trying to find some additional info regarding this issue, but couldn't find anything yet :(... is it possible for you to provide us a little example to reproduce the issue? On Fri, May 8, 2015 at 2:59 AM TS test.te...@gmail.com wrote: Ivan, Any updates on this. Thanks in advance. On Wednesday, May 6, 2015 at 11:05:54 AM UTC-7, TS wrote: Ivan, Sorry about the cross post. I was not sure where I should post. I am using Kamon 0.3.5 On Wednesday, May 6, 2015 at 5:51:27 AM UTC-7, Ivan Topolnjak wrote: Hello TS! I just replied to you other email, please disregard that thread and post your answer here.. what Kamon version are you using? On Wed, May 6, 2015 at 3:07 AM TS test.te...@gmail.com wrote: I just started using Kamon. I am getting an error while weaving (This happens when my tests run. My surefire plugin has argLine with javaagent pointing to aspectjweaver.jar Any words of wisdom would be appreciated. Thanks in advance, TS java.lang.Exception: Unexpected exception, expectedjava.lang.ClassCastException but wasjava.lang.IncompatibleClassChangeError at akka.instrumentation.ActorCellInstrumentation.afterCreation(ActorCellInstrumentation.scala:42) at akka.actor.ActorCell.init(ActorCell.scala:397) at akka.actor.LocalActorRef.newActorCell(ActorRef.scala:320) at akka.actor.LocalActorRef.init(ActorRef.scala:316) at akka.actor.LocalActorRefProvider$$anon$1.init(ActorRefProvider.scala:574) at akka.actor.LocalActorRefProvider.rootGuardian$lzycompute(ActorRefProvider.scala:574) at akka.actor.LocalActorRefProvider.rootGuardian(ActorRefProvider.scala:573) at akka.actor.LocalActorRefProvider.init(ActorRefProvider.scala:628) at akka.actor.ActorSystemImpl.liftedTree2$1(ActorSystem.scala:663) at akka.actor.ActorSystemImpl._start$lzycompute(ActorSystem.scala:660) at akka.actor.ActorSystemImpl._start(ActorSystem.scala:660) at akka.actor.ActorSystemImpl.start(ActorSystem.scala:676) at akka.actor.ActorSystem$.apply(ActorSystem.scala:143) at akka.actor.ActorSystem$.apply(ActorSystem.scala:110) at akka.actor.ActorSystem$.create(ActorSystem.scala:58) at akka.actor.ActorSystem.create(ActorSystem.scala:1) -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com. To post to this group, send email to akka...@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com. To post to this group, send email to akka...@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Read the docs: http://akka.io/docs/ Check the FAQ:
Re: [akka-user] Parallel File Processing with Akka Actors?
what is the result of the log processing of a single file? is it some aggregation or summary, or are you performing some action for each log line? it seems to me the most performant solution would be to not use actors at all, but to create a dedicated dispatcher and process each log file in a Future. in this way you maximize your caching (data/instruction/readahead) and minimize your context switching. you also don't have to worry about the fact that you are using synchronous I/O. if you are summarizing/aggregating the log file, then the result of the Future is your summary, and you can pipe that result to an actor using pipeTo(). this is optimizing for throughput however, not latency. in order to balance throughput vs. latency, you might consider a bimodal approach, where files larger than a certain threshold get processed using a synchronous approach with Futures, and small files are processed in an actor. you could abstract the processing into a trait and share that trait between both approaches. that's just my 2 cents, however, without the benefit of much context. -Michael On 05/08/15 15:06, Harit Himanshu wrote: Hi Idar I just confirmed with some of our team mates that it depends upon our customers. 1. Some customers use local disk and remove logs after processing. There are customers who use NAS based storage. None uses SSD as per my understanding. 2. The logs differ in size a lot. Depends on log rolling rules, this may range from some Megabytes to few Gigabytes. 3. The processing is not much. we decide either to ignore the logLine(based on certain condition), encrypt certain data, and build a format(usually JSON). Do you have better idea or would your recommendation differ based on this information? Thank you + Harit Himanshu On Thursday, May 7, 2015 at 11:44:04 PM UTC-7, Idar Borlaug wrote: What filesystem and disks are you reading the files from? Reading a file in one actor is a good idea, because you can read it sequentially. Reading from 10 different places in the same file can be a lot slower or faster. MPIIO which are used in computational clusters have methods for splitting a file and reading one part each on different nodes. How much processing is there for each line? I would implement both alternatives and do some benchmarking. Maby a third would be to read the files in each LogLineProcessActor and ditch the FileActor. What would also be cool, is to have an async IO for reading the files. I have no experience with that. On Fri, May 8, 2015 at 2:23 AM Harit Himanshu harit.sub...@gmail.com wrote: Hello This is what my use case looks like *Use Case* - Given many log files in range (2MB - 2GB), I need to parse each of these logs and apply some processing, generate Java |POJO|. - For this problem, lets assume that we have just |1| log file - Also, the idea is to making best use of System. Multiple cores are available. *Alternative 1* - Open file (synchronous), read each line, generate |POJO|s |FileActor - read each line- ListPOJO | */Pros/*: simple to understand */Cons/*: Serial Process, not taking advantage of multiple cores in the system *Alternative 2* - Open File (synchronous), read |N| lines (|N| is configurable), pass on to different actors to process | / LogLineProcessActor 1 FileActor - LogLineProcessRouter (with10 Actors) -- LogLineProcessActor 2 \LogLineProcessActor 10| */Pros/* Some parallelization, by using different actors to process part of lines. Actors will make use of available cores in the system (? how, may be?) */Cons/* Still Serial, because file read in serial fashion *Questions* - is any of the above choice a good choice? - Are there better alternatives? Please provide valuable thoughts here Thanks a lot -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com. To post to this group, send email to akka...@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user http://groups.google.com/group/akka-user.
Re: [akka-user] using Akka with Kamon...
OK. Good news: Using 2.3.10, no errors. However, I am using kamon log reporter. I do not see any actor metrics on my logs. Should I enable something on application.conf? On Friday, May 8, 2015 at 4:40:14 PM UTC-7, Ivan Topolnjak wrote: Oh, that can be a problem! We have not tested Kamon with 2.4 yet and probably the issue you are facing is due to Kamon's bytecode being liked to certain Akka internals that changed between 2.3 and 2.4. Is it possible for you to use Akka 2.3? I will let you know when we get ready to support Akka 2.4, regards! On Sat, May 9, 2015 at 1:20 AM TS test.te...@gmail.com javascript: wrote: BTW, I am using akka 2.4-SNAPSHOT On Friday, May 8, 2015 at 3:54:41 PM UTC-7, TS wrote: This is what I have in the pom dependency groupIdio.kamon/groupId artifactIdkamon-core_2.11/artifactId version0.3.5/version /dependency dependency groupIdio.kamon/groupId artifactIdkamon-log-reporter_2.11/artifactId version0.3.5/version /dependency plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId version2.18.1/version configuration argLine-javaagent:path to aspectjweaver -1.7.4.jar/argLine /configuration /plugin and in my application.conf extensions = [kamon.metric.Metrics] a test like will cause the error to happen. @Test public void testForFoo() { final TestActorRefFooActor ref = TestActorRef.create(system, Props.create(FooActor.class), testFoo); Object obj = ref.underlyingActor().testFoo(ByteString.fromArray( abc.getBytes())); } On Friday, May 8, 2015 at 4:47:36 AM UTC-7, Ivan Topolnjak wrote: Hello TS, I have been trying to find some additional info regarding this issue, but couldn't find anything yet :(... is it possible for you to provide us a little example to reproduce the issue? On Fri, May 8, 2015 at 2:59 AM TS test.te...@gmail.com wrote: Ivan, Any updates on this. Thanks in advance. On Wednesday, May 6, 2015 at 11:05:54 AM UTC-7, TS wrote: Ivan, Sorry about the cross post. I was not sure where I should post. I am using Kamon 0.3.5 On Wednesday, May 6, 2015 at 5:51:27 AM UTC-7, Ivan Topolnjak wrote: Hello TS! I just replied to you other email, please disregard that thread and post your answer here.. what Kamon version are you using? On Wed, May 6, 2015 at 3:07 AM TS test.te...@gmail.com wrote: I just started using Kamon. I am getting an error while weaving (This happens when my tests run. My surefire plugin has argLine with javaagent pointing to aspectjweaver.jar Any words of wisdom would be appreciated. Thanks in advance, TS java.lang.Exception: Unexpected exception, expectedjava.lang.ClassCastException but wasjava.lang.IncompatibleClassChangeError at akka.instrumentation.ActorCellInstrumentation.afterCreation(ActorCellInstrumentation.scala:42) at akka.actor.ActorCell.init(ActorCell.scala:397) at akka.actor.LocalActorRef.newActorCell(ActorRef.scala:320) at akka.actor.LocalActorRef.init(ActorRef.scala:316) at akka.actor.LocalActorRefProvider$$anon$1.init(ActorRefProvider.scala:574) at akka.actor.LocalActorRefProvider.rootGuardian$lzycompute(ActorRefProvider.scala:574) at akka.actor.LocalActorRefProvider.rootGuardian(ActorRefProvider.scala:573) at akka.actor.LocalActorRefProvider.init(ActorRefProvider.scala:628) at akka.actor.ActorSystemImpl.liftedTree2$1(ActorSystem.scala:663) at akka.actor.ActorSystemImpl._start$lzycompute(ActorSystem.scala:660) at akka.actor.ActorSystemImpl._start(ActorSystem.scala:660) at akka.actor.ActorSystemImpl.start(ActorSystem.scala:676) at akka.actor.ActorSystem$.apply(ActorSystem.scala:143) at akka.actor.ActorSystem$.apply(ActorSystem.scala:110) at akka.actor.ActorSystem$.create(ActorSystem.scala:58) at akka.actor.ActorSystem.create(ActorSystem.scala:1) -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com. To post to this group, send email to akka...@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to