[akka-user] Akka 2.2.3 - 2.3.2
Hello fellow hAkkers, I have a series of modules that communicate via Akka -- was version 2.2.3 and all was fine. Upgraded to 2.3.2 and three of the four modules (which share their initialization code - just different configs) are fine but the third always gives: [ERROR] [05/20/2014 18:00:27.997] [jnlp-akka.remote.default-remote-dispatcher-7] [ActorSystem(jnlp)] Uncaught error from thread [jnlp-akka.remote.default-remote-dispatcher-7] shutting down JVM since ' akka.jvm-exit-on-fatal-error' is enabled java.lang.NoClassDefFoundError: akka/remote/WireFormats$AkkaControlMessage at akka.remote.transport.AkkaPduProtobufCodec$.constructControlMessagePdu(AkkaPduCodec.scala :231) at akka.remote.transport.AkkaPduProtobufCodec$.init(AkkaPduCodec.scala:153) at akka.remote.transport.AkkaPduProtobufCodec$.clinit(AkkaPduCodec.scala) at akka.remote.EndpointManager$$anonfun$9.apply(Remoting.scala:705) at akka.remote.EndpointManager$$anonfun$9.apply(Remoting.scala:675) at scala.collection.TraversableLike$WithFilter$$anonfun$map$2.apply(TraversableLike.scala:72 2) at scala.collection.Iterator$class.foreach(Iterator.scala:727) at scala.collection.AbstractIterator.foreach(Iterator.scala:1157) at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) at scala.collection.AbstractIterable.foreach(Iterable.scala:54) at scala.collection.TraversableLike$WithFilter.map(TraversableLike.scala:721) at akka.remote.EndpointManager.akka$remote$EndpointManager$$listens(Remoting.scala:675) at akka.remote.EndpointManager$$anonfun$receive$2.applyOrElse(Remoting.scala:484) at akka.actor.Actor$class.aroundReceive(Actor.scala:465) at akka.remote.EndpointManager.aroundReceive(Remoting.scala:387) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) at akka.actor.ActorCell.invoke(ActorCell.scala:487) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) at akka.dispatch.Mailbox.run(Mailbox.scala:220) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala :393) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) Caused by: java.lang.ClassNotFoundException: akka.remote.WireFormats$AkkaControlMessage at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.codehaus.groovy.grails.cli.support.GrailsRootLoader.loadClass(GrailsRootLoader.java:5 4) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 24 more | Error jnlp | Error ] | Error java.lang.NoClassDefFoundError: akka/remote/WireFormats$AkkaControlMessage | Error at akka.remote.transport.AkkaPduProtobufCodec$.constructControlMessagePdu(AkkaPduCod ec.scala:231) | Error at akka.remote.transport.AkkaPduProtobufCodec$.init(AkkaPduCodec.scala:153) | Error at akka.remote.transport.AkkaPduProtobufCodec$.clinit(AkkaPduCodec.scala) | Error at akka.remote.EndpointManager$$anonfun$9.apply(Remoting.scala:705) | Error at akka.remote.EndpointManager$$anonfun$9.apply(Remoting.scala:675) | Error at scala.collection.TraversableLike$WithFilter$$anonfun$map$2.apply(TraversableLike. scala:722) | Error at scala.collection.Iterator$class.foreach(Iterator.scala:727) | Error at scala.collection.AbstractIterator.foreach(Iterator.scala:1157) | Error at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) | Error at scala.collection.AbstractIterable.foreach(Iterable.scala:54) | Error at scala.collection.TraversableLike$WithFilter.map(TraversableLike.scala:721) | Error at akka.remote.EndpointManager.akka$remote$EndpointManager$$listens(Remoting.scala:6 75) | Error at akka.remote.EndpointManager$$anonfun$receive$2.applyOrElse(Remoting.scala:484) | Error at akka.actor.Actor$class.aroundReceive(Actor.scala:465) | Error at akka.remote.EndpointManager.aroundReceive(Remoting.scala:387) | Error at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) | Error at akka.actor.ActorCell.invoke(ActorCell.scala:487) | Error at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) |
[akka-user] Dispatcher performance with Futures is much worse than ExecutionContext.global
I have many libraries written using Futures. When I use these libraries from actors, the implicit ExecutionContext used is usually the actor system's dispatcher. I just ran a throughput test that relies on a creating a large amount of futures (no actors), and the throughput using ExecutionContext.global is more than twice as high as that using an ActorSystem's default dispatcher with no actors. Before I start profiling, is there a known cause for this, something I should tune? I assumed I should not use Execution.global together with an ActorSystem, since the two thread pools would just compete for CPU, but maybe I was wrong? Alternatively, would it make sense to use ExecutionContext.global as the ActorSystem dispatcher's underlying executor? I'm using akka 2.2.3 with scala 2.10.4. Thanks, Daniel Armak -- 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 promise inside an actor is wrong?
On Wed, May 21, 2014 at 11:16 AM, 何品 hepin1...@gmail.com wrote: Hi could it be right to using Promise Inside an actor. Actor received an message,and handle it to some other service ,which return an promiseT, and we chain an callback on the promiseT,which may call persist() or relay the original sender. write code like that is not an issue,an issue seems that not right way. cause akka should make things happen via message not via callback. so I am asking here,should I send an message back to the Actor when the work done to trigger this happen or register a callback on the promise? It seems like registering some callback on the promise and wish the code run is a wrong approach. cause sometimes the callback could change the actor's internal state,but the executionContext may be others.maybe some other thread change the actor's current state right? thanks. Yes, those are exactly the problems. If you interact with the mutable state within an actor from a callback, you break the guarantee that everything within an actor exists within a single threaded non-concurrent context. If you send a message back to the actor when the future completes, you avoid those problems. --Martijn -- 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.
[akka-user] Akka 2.3.3 is on the maven central
Dear hAkkers, We—the Akka committers—are pleased to be able to announce the availability of Akka 2.3.3. This is the third maintenance release of the 2.3 branch. It contains fixes for several issue*s and performance optimizations*https://github.com/akka/akka/issues?milestone=2state=closed . This version of Akka is released for both Scala 2.10.4 and 2.11.1. We are coordinating this release with Scala 2.11.1 public announcement. For now Akka 2.3.3 is being announced only on Akka mailing lists for your immediate use. Please try it out and report your experience. Akka website will be updated as Scala 2.11.1 is publicly announced. Special actions should be taken if you were using Akka for Scala 2.11.0. Here is the excerpt from the Scala mailing list: Serialization was broken in Scala 2.11.0. The fix in 2.11.1 necessarily breaks serialization compatibility between 2.11.0 and 2.11.1 (this is separate from binary compatibility, which is maintained). Users of distributed systems that rely on serialization to exchange objects (such as akka) should upgrade to Scala 2.11.1 (and akka 2.3.3) immediately. We also strongly recommend that libraries that themselves declare classes with @SerialVersionUID annotations release a new version and ask their Scala 2.11 users to upgrade. We apologize for the breakage. We have included a new suite of tests that will ensure stability of serialization for the remainder of the 2.11.x series. -- Martynas Mickevičius Typesafe http://typesafe.com/ – Reactivehttp://www.reactivemanifesto.org/Apps on the JVM -- 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: using promise inside an actor is wrong?
Thanks for you guys,I just encounter this problem,nice and clear. 在 2014年5月21日星期三UTC+8下午5时16分10秒,何品写道: Hi could it be right to using Promise Inside an actor. Actor received an message,and handle it to some other service ,which return an promiseT, and we chain an callback on the promiseT,which may call persist() or relay the original sender. write code like that is not an issue,an issue seems that not right way. cause akka should make things happen via message not via callback. so I am asking here,should I send an message back to the Actor when the work done to trigger this happen or register a callback on the promise? It seems like registering some callback on the promise and wish the code run is a wrong approach. cause sometimes the callback could change the actor's internal state,but the executionContext may be others.maybe some other thread change the actor's current state right? 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] How can the sender know that a message has been delivered (confirmed) by a channel?
Also +1 for PersistentActor Am Dienstag, 20. Mai 2014 22:50:48 UTC+2 schrieb rkuhn: Hi Odd, that is a very good question: I was operating under the premise that EventsourcedProcessor is used quite a bit by now and renaming it might not be met with unlimited enthusiasm. The replacement for PersistentChannel will need to be named differently since the “persistent” in the name is confusing, but the details will have to wait until we have settled on its precise nature. Perhaps we can do a “quick deprecation” for EventsourcedProcessor in 2.4-M1 (since it is marked “experimental” for this very reason), aliasing it until removal. I quite like PersistentActor, Processor is too generic. Opinions? Regards, Roland 20 maj 2014 kl. 22:39 skrev Odd Möller odd.m...@gmail.com javascript:: Hi! Just wanted to say that I love the idea of simplifying the abstractions as suggested in this thread (all our processors are already of the event sourced kind). One thing that occurred to me is if a similar simplification can be done on the naming of the concepts: now that the names Processor and Channel are unused, should the remaining concept still be called EventsourcedProcessor? What about calling it Processor, PersistentActor or EventsourcedActor instead? Ditto regarding the reborn PersistentChannel. Greetings Odd On Tue, May 20, 2014 at 8:47 PM, 何品 hepi...@gmail.com javascript:wrote: I am using the persistent channel as a durable queue,and for it was not recommend ,I switch to redis . 在 2014年5月21日星期三UTC+8上午2时32分38秒,rkuhn写道: Hi Alex, I have filed the ticket for Processor’s removal ( https://github.com/akka/akka/issues/15230), which also talks about Channel since that was only needed to contain the side-effecting replay nature of command sourced processors. Your description below is rather terse, so it is not fully clear to me how you are using Channel in this case and what a replacement should be, can you elaborate? There is also the discussion ticket for reinventing PersistentChannel ( https://github.com/akka/akka/issues/15231) which might be of interest in this context. My motivation here is to not remove needed functionality without improved replacement. Regards, Roland 9 maj 2014 kl. 12:15 skrev ahjohannessen ahjoha...@gmail.com: Hi Roland, We use Channel in conjunction with Eventsourced Processor (EP) in our applications in receiveRecover. It would be sad to see it go away without a reasonable alternative. One scenario in our apps is that we use DDD/ES and have a lot of EPs of same type, e.g. 1 instances, that are loaded on demand by a supervisor. In order to have a single view on all of these, we inject an actor that wraps a single channel / aggregator EP combo into these instances on creation. This makes it possible to react to changes, even in case of JVM crashes, in that family of EPs as well as having a global view of that family. On Friday, May 9, 2014 9:13:17 AM UTC+1, rkuhn wrote: 9 maj 2014 kl. 09:58 skrev Martin Krasser kras...@googlemail.com: On 09.05.14 09:25, Roland Kuhn wrote: 9 maj 2014 kl. 09:08 skrev Martin Krasser kras...@googlemail.com: On 09.05.14 08:41, Roland Kuhn wrote: Hi Martin, 9 maj 2014 kl. 08:05 skrev Martin Krasser kras...@googlemail.com: Hi Roland, thanks for starting a discussion on this. Here are some initial thoughts on your proposal: ... very same throughput optimization by applying the state changes before persisting them ... I think we agree that whatever changes are going to be made in the future, we must keep the throughput optimizations (by batching writes/updates). As you said, with an EP, this can only be achieved by applying events to current state *before* persisting them. Furthermore, to enable batching, an EP must therefore be able to process new commands while (previous) events are about to be persisted. This however has a very important consequence for commands that read current state. If we allow events to be applied to current state *before* persisting them, we allow clients to read state from that EP that may not be re-readable after a crash. For example: - EP receives update command, derives event and applies it immediately to current state - EP (asynchronously) persists event - EP receives a read command (while event persistence is in progress) - EP (successfully) returns read response to requestor - EP JVM crashes before event was successfully persisted - EP state cannot be reconstructed i.e. previous read cannot be repeated. This is only true if the recovery is incomplete: the update command will not have been acknowledged at this point, so if someone cared about it they will send it again during recovery and the EP will eventually end up in a state where the read will return the same value again. If this type of consistency is not good enough, then you can always
Re: [akka-user] Spring Akka integration
and, take a look at the Akka Java Springhttp://typesafe.com/activator/template/akka-java-springActivator template /Patrik On Wed, May 21, 2014 at 10:06 AM, Martynas Mickevičius martynas.mickevic...@typesafe.com wrote: Hi Romi, since version 2.0 akka does not support custom spring namespaces. Herehttps://groups.google.com/forum/#!searchin/akka-user/spring/akka-user/gEj2iRTmdOA/-4y8iXByzq0Jis a great discussion on how to use spring with akka without custom namespaces. On Tue, May 20, 2014 at 5:21 PM, Romi Awasthy romiawas...@gmail.comwrote: I am trying to integrate Spring with Akka, using http://doc.akka.io/docs/akka-modules/1.3.1/modules/spring.html. I would like to know if the above integration is specific to 1.3.1 release or does it work with Akka's latest release. This is my akka version dependency groupIdcom.typesafe.akka/groupId artifactIdakka-actor_2.10/artifactId version2.3.0/version /dependency and this is my Spring configuration beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:akka=http:// akka.io/schema/akka xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://repo.akka.io/schema/akka http://repo.akka.io/akka-1.3.1.xsd; this is giving me Unable to locate Spring NamespaceHandler for element 'akka:untyped-actor' of schema namespace 'http://akka.io/schema/akka' Please help. -- 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. -- Martynas Mickevičius Typesafe http://typesafe.com/ – Reactivehttp://www.reactivemanifesto.org/Apps on the JVM -- 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 http://typesafe.com/go-reactive-activator-contest -- 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.lang.IllegalStateException: cannot create children while terminating or terminated
Hi Patrik, I've seen this as well, but in our case it doesn't look like the result of an actor termination from within the receive method as described in the original post by Runar Bjarnason. Here is the end of the stack trace, relevant to Akka: Caused by: java.lang.IllegalStateException: cannot create children while terminating or terminated at akka.actor.dungeon.Children$class.makeChild(Children.scala:184) ~[na:na] at akka.actor.dungeon.Children$class.attachChild(Children.scala:42) ~[na:na] at akka.actor.ActorCell.attachChild(ActorCell.scala:338) ~[na:na] at akka.actor.ActorSystemImpl.actorOf(ActorSystem.scala:510) ~[na:na] Could this be caused by the same issue even if it does not originate in termination from within receive? Thanks. Gal Goffer Software Engineer ATT Multimedia Telephony RD בתאריך יום רביעי, 23 בינואר 2013 13:03:29 UTC+2, מאת Patrik Nordwall: I can confirm. It has been fixed by a change in ClusterJmx.close. /Patrik On Wed, Jan 23, 2013 at 7:17 AM, Rich Dougherty ri...@rd.gen.nzjavascript: wrote: On Wed, Jan 23, 2013 at 6:24 PM, Runar Bjarnason runar...@gmail.comjavascript: wrote: I cannot reproduce this in master, so I can only assume that it's a bug in 2.1. OK, thanks for checking. Rich -- Read the docs: http://akka.io/docs/ Check the FAQ: http://akka.io/faq/ 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 post to this group, send email to akka...@googlegroups.comjavascript: . To unsubscribe from this group, send email to akka-user+...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/akka-user?hl=en. -- Patrik Nordwall Typesafe http://typesafe.com/ - The software stack for applications that scale 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.
Re: [akka-user] Typesafe activator question for akka-java-spring
Hi, I don't know why the ActorProducer can't look up your bean. I assume that there is some way to debug what beans have been defined in the ApplicationContext. Maybe you're scanning the wrong package names for annotated beans? B/ On 19 May 2014 at 20:32:47, MV (meen...@gmail.com) wrote: Hello Bjorn, Thanks for getting back to me. I am sorry for the late response as I was away for work and did not get a chance to try your solution. I wanted to get back to you on this. For Qn(1): Configuring using XML and annotation. -- I have taken the approach of mixing both and in my ANNOTATION BASED context file (i.e. AppConfig.java), I now use the annotation: @ImportResource(file:./properties/ApplicationProperties.xml). -- Then I have filed in there as follows: @Autowired private Algorithm myCurrentAlg --- This is defined in the XML file and I am able to read the bean. Qn(2) Using the Typesafe Activator Template for AKKA-SPRING-JAVA This is getting increasingly difficult for some reason :-) Problem (1): SpringActorProducer.java - method: actorClass() is constantly throwing NoSuchBeanDefinitionException. Scenario: I have a really simple CounterActor classpretty much empty to test the scenario as follows: @Named(Counter) @Scope(prototype) public class CounterActor extends UntypedActor { public CounterActor() { System.out.println(Inside constructor...); } @Override public void onReceive(Object obj) throws Exception { // TODO Auto-generated method stub } The code for SpringActorProducer is exactly the same as the website tutorial - no changes. I get the exception as follows: akka.ConfigurationException: configuration problem while creating [akka://DCA-Actor-System/user/c] with dispatcher [akka.actor.default-dispatcher] and mailbox [akka.actor.default-mailbox] at akka.actor.LocalActorRefProvider.actorOf(ActorRefProvider.scala:723) at akka.actor.dungeon.Children$class.makeChild(Children.scala:191) at akka.actor.dungeon.Children$class.attachChild(Children.scala:42) at akka.actor.ActorCell.attachChild(ActorCell.scala:338) at akka.actor.ActorSystemImpl.actorOf(ActorSystem.scala:518) at com.bae.dca.MyTestComponent.initializeThreads(MyTestComponent.java:189) at com.bae.dca.MyTestComponent.main(MyTestComponent.java:132) Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'Counter' is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:638) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1159) at org.springframework.beans.factory.support.AbstractBeanFactory.getType(AbstractBeanFactory.java:590) at org.springframework.context.support.AbstractApplicationContext.getType(AbstractApplicationContext.java:1020) at com.bae.dca.SpringActorProducer.actorClass(SpringActorProducer.java:70) at akka.actor.Props.cachedActorClass(Props.scala:203) at akka.actor.Props.actorClass(Props.scala:327) at akka.dispatch.Mailboxes.getMailboxType(Mailboxes.scala:124) at akka.actor.LocalActorRefProvider.actorOf(ActorRefProvider.scala:718) ... 6 more Any idea why this is happening? I have googled everything I can think of but to no avail. If this is resolved then I have one more question regarding the props() method for you :-) Thanks for all your help in advance. Meena Venkat On Friday, May 16, 2014 9:46:16 AM UTC-4, Björn Antonsson wrote: Hi, On 15 May 2014 at 20:26:49, MV (mee...@gmail.com) wrote: Hello, I am trying to use DI with Spring and Akka actors. I found the template example at TypesafeActivator but I had question for a case that is not working for me. The example uses AnnotationBased DI and I would like to use XMl based for the following reason: I have two algorithm implementations for my project which project my results to the end user in different formats. The algorithms are also significantly different and I have a single JAVA interface that these 2 algorithms implement. I don't prefer the annotation based binding because I want the tester during integration testing to change the algorithm we use in an XML file or property file because if the chnage is done in a JAVA file, it warrants a new release of software version at the Integration test site. I want the tester to be able to run the jar with different algorithms based on an external XML/ java properties file. Qn 1) The example on the website to create the actor system and Props uses Java annotation technique. How do I convert that to a regular bean/bean kind of thing? If you don't want to convert everything, then you can mix annotations and XML by adding this to your spring context before you call refresh(). XmlBeanDefinitionReader xmlReader = new XmlBeanDefinitionReader(ctx); xmlReader.loadBeanDefinitions(spring.xml); If you do want to convert everything, then I guess
Re: [akka-user] Empty Snapshot files causes EOFException
Hi James, This sounds really strange. Your stack trace indicates that the snapshot serializer fails while reading the header of the snapshot. Do you have a reproducible test case that you can minimize? B/ On 20 May 2014 at 11:18:13, James Brems (jamesbrem...@gmail.com) wrote: Hi, I have a similar problem. I am using a custom serializer for serializing a snapshot. (extended from akka.serialization.Serializer): akka { actor { serializers { customSerializer = com.handler.util.CustomSerializer } serialization-bindings { com.handler.common.MySnapshot = customSerializer } } } For saving snapshot the processor calls: saveSnapshot(mySnapshot) As response the processor immediately receives a SaveSnapshotSuccess message. 5 seconds later in the same testcase I try to recover the processor and would expect to receive a SnapshotOffer - but that is not the case, instead I get a java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source) at java.io.ObjectInputStream$BlockDataInputStream.readUTFBody(Unknown Source) at java.io.ObjectInputStream$BlockDataInputStream.readUTF(Unknown Source) at java.io.ObjectInputStream.readUTF(Unknown Source) at java.io.ObjectStreamClass.readNonProxy(Unknown Source) at java.io.ObjectInputStream.readClassDescriptor(Unknown Source) at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source) at java.io.ObjectInputStream.readClassDesc(Unknown Source) at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source) at akka.serialization.JavaSerializer$$anonfun$1.apply(Serializer.scala:136) at scala.util.DynamicVariable.withValue(DynamicVariable.scala:57) at akka.serialization.JavaSerializer.fromBinary(Serializer.scala:136) at akka.serialization.Serialization$$anonfun$deserialize$2.apply(Serialization.scala:113) at scala.util.Try$.apply(Try.scala:161) at akka.serialization.Serialization.deserialize(Serialization.scala:113) at akka.persistence.serialization.SnapshotSerializer.snapshotFromBinary(SnapshotSerializer.scala:91) at akka.persistence.serialization.SnapshotSerializer.fromBinary(SnapshotSerializer.scala:55) at akka.serialization.Serialization$$anonfun$deserialize$2.apply(Serialization.scala:113) The snapshot file is not empty. Digging deeper into the problem I found out that the method fromBinary of my custom serializer is never being called. It seems as if the custom serializer is working for writing, but not for reading the snapshot. If I do the same thing with the same custom serializer, but with Persistent(..) messages instead of saveSnapshot, it works. ToBinary fromBinary are being called as expected. Is there probably an issue in the SnapshotSerializer? -- 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. -- Björn Antonsson Typesafe – Reactive Apps on the JVM twitter: @bantonsson SEE YOU IN BERLIN Scala Days June 16th-18th, Berlin -- 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 logging to file
Hi, because of the config file I assume you are trying logback library. Have you added logback dependencies? ch.qos.logback % logback-core % 1.1.2, ch.qos.logback % logback-classic % 1.1.2 On Wed, May 21, 2014 at 2:36 PM, Akka Team akka.offic...@gmail.com wrote: On Sat, May 17, 2014 at 9:12 PM, lee json jsonlee...@gmail.com wrote: I am trying to redirect akka log content to the file, but failed to get it worked. I searched in the group and on the internet, but can't find the solution. The log file (logs/akka.log) is empty and doesn't contain any log info. Below is my setting and code: akka 2.2.3 scala 2.10.2 java 1.6.x package sample import akka.actor._ import akka.event._ import akka.event.slf4j.Slf4jLogger import com.typesafe.config.Config import com.typesafe.config.ConfigFactory case class Start(msg: String) conf data: logtest { akka { loggers = [akka.event.slf4j.Slf4jLogger] loglevel = INFO } } object Test { def main(args : Array[String]) { val sys = ActorSystem(TestLog, ConfigFactory.load.getConfig(logtest)) val a = sys.actorOf(Props(classOf[A])) a ! Start(hi) } } class A extends Actor { val LOG = Logging(context.system, classOf[A]) override def receive = { case Start(msg) = LOG.info(Receive {} from the client., msg) } } logback.xml ?xml version=1.0 encoding=UTF-8? configuration scan=false debug=false appender name=FILE class=ch.qos.logback.core.FileAppender filelogs/akka.log/file encoder pattern[%4p] [%d{ISO8601}] [%t] %c{1}: %m%n/pattern /encoder /appender !--logger name=sample.Test level=INFO // change name to sample doesn't work either. appender-ref ref=FILE / /logger-- root level=INFO appender-ref ref=FILE/ /root /configuration console output: SLF4J: Failed to load class org.slf4j.impl.StaticLoggerBinder. SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. SLF4J: Failed to load class org.slf4j.impl.StaticMDCBinder. SLF4J: Defaulting to no-operation MDCAdapter implementation. SLF4J: See http://www.slf4j.org/codes.html#no_static_mdc_binder for further details. -- 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 - The software stack for applications that scale 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. -- Martynas Mickevičius Typesafe http://typesafe.com/ – Reactivehttp://www.reactivemanifesto.org/Apps on the JVM -- 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] Typed actor per method timeout
Is there a way to modify a timeout for a particular method? My application.conf has: actor.typed { timeout = 5s } which is fine for all the methods except one, where we're expecting a longer delay at times and want to modify it. FYI, we're using typed actors. Thanks. Ilya -- 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 can the sender know that a message has been delivered (confirmed) by a channel?
Hi Roland, You state the following: *...talks about Channel since that was only needed to contain the side-effecting replay nature of command sourced processors.* A channel is also needed when sending events from an eventsourced processor to another actor when one needs at-least-once delivery rather than at-most-once: def receiveRecover: Receive = { case event: String = handleEvent(event) } def handleEvent(event: String) = { // update state // ... // reliably deliver events channel ! Deliver(Persistent(event), destination.path) // alternatively something that encapsulates this pair } We are dependent on this very functionality for reliable coordination in our apps and removing Channel leaves us worried. *...Your description below is rather terse, so it is not fully clear to me how you are using Channel in this case and what a replacement should be, can you elaborate?* As stated earlier, we have many eventsourced processors of same type, e.g. 1 instances of Earnings, that are loaded on demand by a supervisor when a command enters into the domain. When an instance is loaded the command is forwarded to this guy and when the command results in domain events we acknowledge to sender in the persist callback *but* also forward the persistent message to another actor, let's call it stream, that needs to react to this. It ensures that a calculation is initiated by delivering a message to a change reactor via a unique channel. Furthermore stream also ensures that a message is delivered, via another unique channel, to an EarningsAggregator that essentially replicates all of those 1 instances' events, because we need a global view in order to maintain read models. In receiveRecover we *also* forward replayed events to stream in order to ensure that messages get delivered, via channels, to the respective destinations, in the case of a JVM crash. During system start up we start all recently active (say last 24 hours) Earnings instances to ensure that all calculations are triggered and that our EarningsAggregator gets the event, again in the name of crash paranoia. These instances shut themselves down after a reasonable receive timeout in order to keep memory footprint low. This roughly happens by sending a passivate me message to their supervisor which in turn ensures a proper shutdown and all of the instance's messages are processed by using a combination of poison pill, become, stash and listening to terminated. In the above I mention Earnings eventsourced processor, however we have around 10 similar types under same supervisor that are similarly structured and have the same need of what a channel gives us. Other usages of channels that we have are communication among processes. Often here it is perfectly fine for us to use channels because it ensures that something eventually will happen, some eventsourced processor emits an event to reactor (ordinary actor) via a channel (also during receiveRecover) that transforms the event to a command in the language of another eventsourced processor. All of such processes are idempotent and maintaining an queue on both sides is just a lot of useless busywork in most of our use cases. I have no idea of what a replacement of Channel would be because I do not have an issue with it and think it is a good primitive that solves many of our use cases in ways that are satisfying and saves us a lot of work trying to re-implement the same functionality. *...My motivation here is to not remove needed functionality without improved replacement.* That is good to know :) On Tuesday, May 20, 2014 7:32:38 PM UTC+1, rkuhn wrote: Hi Alex, I have filed the ticket for Processor’s removal ( https://github.com/akka/akka/issues/15230), which also talks about Channel since that was only needed to contain the side-effecting replay nature of command sourced processors. Your description below is rather terse, so it is not fully clear to me how you are using Channel in this case and what a replacement should be, can you elaborate? There is also the discussion ticket for reinventing PersistentChannel ( https://github.com/akka/akka/issues/15231) which might be of interest in this context. My motivation here is to not remove needed functionality without improved replacement. Regards, Roland 9 maj 2014 kl. 12:15 skrev ahjohannessen ahjoha...@gmail.comjavascript: : Hi Roland, We use Channel in conjunction with Eventsourced Processor (EP) in our applications in receiveRecover. It would be sad to see it go away without a reasonable alternative. One scenario in our apps is that we use DDD/ES and have a lot of EPs of same type, e.g. 1 instances, that are loaded on demand by a supervisor. In order to have a single view on all of these, we inject an actor that wraps a single channel / aggregator EP combo into these instances on creation. This makes it possible to react to
[akka-user] Is it possible to use EventsourcedProcessor with FSM[S, D]?
What are the guidelines around implementing FSMs with EventsourcedProcessor actors? At first glance I am assuming the two cannot be mixed together, so would I need to create a child actor FSM and offload messages to that? -- 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: Some questions about clustering
Hi Luis, On Tue, May 20, 2014 at 2:58 AM, Luis Medina lu4...@gmail.com wrote: Thank you for the help Martynas. Got a couple of follow-up questions: Cluster singleton is always created on the oldest node in the cluster with a specified role if any. This implies that there could a resource bottleneck on the oldest node. 1. Is there any way to define a different strategy that creates singletons in a random node similar to how you can configure a different strategy for the ShardCoordinator when allocating new shards? This is not currently supported by a ClusterSingletonManager. Sharding solves this particular issue. 2. In distributed PubSub, when I publish a message from actor (a), will subscribers who receive the message know that it came from actor (a)? Or is this information lost? Yes. The sender is still there and can be used as it is in clustering pubsub activator templatehttps://github.com/typesafehub/activator-akka-clustering/blob/master/src/main/scala/chat/ChatClient.scala#L27 . 3. If I subscribe a round-robin cluster-aware pool router to a particular topic using cluster PubSub, will the round-robinness still hold for the messages that are sent to it? I'm thinking this would probably look something like this in code: //configuration akka.actor.deployment { /master/worker { router = round-robin-pool nr-of-instances = 10 cluster { enabled = on } } } //code ActorRef router = getContext().actorOf(FromConfig.getInstance().props(Props.create(Worker.class)), worker); ActorRef mediator = DistributedPubSubExtension.get(getContext().system()).mediator(); mediator.tell(new DistributedPubSubMediator.Subscribe(topic, router), router); Yes. This will work. Router has an ordinary Actor Path which can be used to subscribe to a topics in PubSub. 4. In the distributed PubSub documentation page ( http://doc.akka.io/docs/akka/2.3.2/contrib/distributed-pub-sub.html#distributed-pub-sub) at the bottom, they explain the different configurations for this feature. a. What units of time can be specified for the gossip-interval? In the example they use seconds but can you do milliseconds? Yes. It can be specified in ms. However the smaller the value, the more traffic you are going to get in the cluster, especially in cases when there are lots of new/old subscriptions. b. I'm a little unclear as to what max-delta-elements is used for. It says that it's the max. number of elements to be transfered in one message when the registry is synchronized. Where are these elements being moved to/from? Also, what is the distinction between elements and message? This is a setting for the pub-sub gossip protocol. In this case elements are subscriptions to some particular topic or path that Mediator actors keep track of. This data is exchanged between Mediator actors. 5. In distributed PubSub, if I were to publish a message to a topic that has no subscribers, will the message simply get dropped since it couldn't find anyone to send it to, or does it get queued somewhere until someone subscribes to that topic? Messages would simply be dropped. 6. Is it possible to use a ClusterClient together with distributed PubSub to subscribe to a particular topic from an actor that is outside of the cluster? This is not currently supported. As a side node, it could be used the other way around. In fact ClusterReceptionist that ClusterClient talks to, is itself built on PubSub. They are even more loosely coupled, the messages are sent to the defined path, i.e. using ActorSelection. There is no identification process. That means that the target actors can be started after the router, or stopped and started again, and still participate in the router. Messages will be delivered to deadLetters when the actor of the target path does not exist. Good to know! Thanks Patrik. -- 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. -- Martynas Mickevičius Typesafe http://typesafe.com/ – Reactivehttp://www.reactivemanifesto.org/Apps on the JVM -- 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,
Re: [akka-user] Re: Akka 2.2.x - 2.3.y upgrade problem
Could you try to minimize this to a reproducible example? On Wed, May 21, 2014 at 4:45 PM, Alanlit a...@littleford.net wrote: [ERROR] [05/20/2014 18:00:27.997] [jnlp-akka.remote.default- remote-dispatcher-7] [ActorSystem(jnlp)] Uncaught error from thread [jnlp-akka.remote.default-remote-dispatcher-7] shutting down JVM since ' akka.jvm-exit-on-fatal-error' is enabled java.lang.NoClassDefFoundError: akka/remote/WireFormats$AkkaControlMessage at akka.remote.transport.AkkaPduProtobufCodec$. constructControlMessagePdu(AkkaPduCodec.scala :231) at akka.remote.transport.AkkaPduProtobufCodec$.init( AkkaPduCodec.scala:153) at akka.remote.transport.AkkaPduProtobufCodec$.clinit (AkkaPduCodec.scala) at akka.remote.EndpointManager$$anonfun$9.apply(Remoting. scala:705) at akka.remote.EndpointManager$$anonfun$9.apply(Remoting. scala:675) at scala.collection.TraversableLike$WithFilter$$ anonfun$map$2.apply(TraversableLike.scala:72 2) For what it is worth the problem exists (in the the one module) for Akka 2.3.1, 2.3.2 and 2.3.3. Switching back to the 2.2 branch (.3 or .4) and all works just fine. Sadly other external factors are mandating a shift to 2.3.x ... Again, the above error happens during Akka ActorSystem initialization, so it is a little hard for me to construct a scenario to explain this ... Tnx Alanl -- 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. -- Martynas Mickevičius Typesafe http://typesafe.com/ – Reactivehttp://www.reactivemanifesto.org/Apps on the JVM -- 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] Does akka-persistence demand incorruptible actor state?
Interesting, thanks for the heads-up regarding the deprecation of Processor :) While we're on the topic of event-sourcing: Is it legal to send messages on recovery? These are side-effecting, but will never manifest as a failure in the sender. If the only reason not to 'side-effect' is to avoid failure of the actor during recovery, then I guess the answer is 'yes', we can send messages. However, does the reasoning go further than that such that transmitting messages during recovery is a bad idea? Thanks, Lawrence On Tuesday, May 20, 2014 7:39:53 PM UTC+1, rkuhn wrote: Hi Lawrence, this is a very good point to bring up: systematic errors in the event application logic will indeed just be recreated during replay, so persistence does not lead to resilience in this case. However, it does allow you to fix the implementation of your actor and rerun the log in the correct fashion, fixing the bug retroactively. This works a lot better for event-sourcing due to explicit control over the side-effects, which is why we are going to remove the Processor trait and enhance EventsourcedProcessor’s throughput (the lack of which is currently the reason for having Processor at all), see https://github.com/akka/akka/issues/15230. Regards, Roland 14 maj 2014 kl. 22:21 skrev Lawrence Wagerfield lawr...@dmz.wagerfield.com javascript:: Akka documentation highlights that actor state is reset on failurehttp://doc.akka.io/docs/akka/snapshot/general/supervision.html#supervision-directives in standard actor systems. However, an actor powered by Persistent messages will simply have these messages replayed and hence will rebuild the same state. Does akka-persistence therefore assume we have designed all processors/views to have incorruptible internal state? -- 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.comjavascript: . Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. *Dr. Roland Kuhn* *Akka Tech Lead* Typesafe http://typesafe.com/ – Reactive apps on the JVM. twitter: @rolandkuhn http://twitter.com/#!/rolandkuhn -- 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: Some questions about clustering
Thank you Martynas. 6. Is it possible to use a ClusterClient together with distributed PubSub to subscribe to a particular topic from an actor that is outside of the cluster? This is not currently supported. As a side node, it could be used the other way around. In fact ClusterReceptionist that ClusterClient talks to, is itself built on PubSub. When you say that it could be the other way around, do you mean having the ClusterClient subscribe to the distributed PubSub that is used within the cluster so that if a message is published to it by someone in the cluster then the client on the outside receives that message too? -- 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] Dispatcher performance with Futures is much worse than ExecutionContext.global
Hi Viktor, I'm using the default config for both (or rather, I'm not configuring either one at all). Is there something in particular I should look at? As I said, I haven't done any real profiling or formal benchmarking yet. All I did was run a simple loop that created a lot of mapped futures, let the JIT heat up for a few minutes, and noted the throughput. The difference was so large (3000 vs 7000 nanoseconds on average for each task) that thought it probable either I was doing something very wrong, or there's a significant difference between the ECs. I'll definitely do some real benchmarking, I just haven't had time yet. And I thought to ask meanwhile if there were any known pitfalls, or large differences between the two ECs' default configurations? Thanks, Daniel Armak On Wed, May 21, 2014 at 9:59 PM, √iktor Ҡlang viktor.kl...@gmail.comwrote: Hi Daniel, Make sure you are using the same/equivalent config for the two different ECs. Then use a test harness like JMH to make sure you are benchmarking correctly for the JVM. What does it show after that? On May 21, 2014 11:23 AM, Daniel Armak danar...@gmail.com wrote: I have many libraries written using Futures. When I use these libraries from actors, the implicit ExecutionContext used is usually the actor system's dispatcher. I just ran a throughput test that relies on a creating a large amount of futures (no actors), and the throughput using ExecutionContext.global is more than twice as high as that using an ActorSystem's default dispatcher with no actors. Before I start profiling, is there a known cause for this, something I should tune? I assumed I should not use Execution.global together with an ActorSystem, since the two thread pools would just compete for CPU, but maybe I was wrong? Alternatively, would it make sense to use ExecutionContext.global as the ActorSystem dispatcher's underlying executor? I'm using akka 2.2.3 with scala 2.10.4. Thanks, Daniel Armak -- 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. -- 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] Any interest in akka-scala-guice activator similar to akka-java-spring
Akka-Guice-Scala available here: https://github.com/rocketraman/activator-akka-scala-guice It should show up in the akka activators at some point. Regards, Raman On Tuesday, May 20, 2014 12:29:33 PM UTC-4, rkuhn wrote: Nice, that will probably be useful for more people! Regards, Roland 19 maj 2014 kl. 16:11 skrev Raman Gupta rocke...@gmail.com javascript: : Not yet... I'll see if I can do this over the next week or so. On Saturday, May 17, 2014 2:34:50 PM UTC-4, Jakub Kahovec wrote: Hi Raman, I'd interested to check it out. Is it accessible publicly ? Thanks Jakub On Friday, May 16, 2014 4:57:27 PM UTC+2, Raman Gupta wrote: Would there be any interest in an akka-scala-guice activator that is similar to akka-java-spring, except that it uses Scala and Guice for dependency injection? I got this working for my project and if anyone else is interested I could consider building an activator for it. Regards, Raman -- 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.comjavascript: . Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. *Dr. Roland Kuhn* *Akka Tech Lead* Typesafe http://typesafe.com/ – Reactive apps on the JVM. twitter: @rolandkuhn http://twitter.com/#!/rolandkuhn -- 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: Inconsistent behavior of ClusterClient.Send (akka 2.3.2) ?
Hi all! I did some further research/debugging and realized that something is definitely broken after the node with role *chunk* is started and an actor *TaskChunkActor *is deployed there. If a node with a *TaskChunkActor* is not started, then the call stack for a payload processing looks like on the picture: http://i.imgur.com/PGRIOQT.png but if the node with a *TaskChunkActor* is started, the call stack for the same payload looks like: http://i.imgur.com/0OsSeOO.png So there's no *DistributedPubSubMediator* in the call stack, and I have no idea how is that possible. the configuration is the same, the only difference if the node is started or not. Can you please help me to understand what may cause such strange behavior? 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.