[akka-user] Error while using CLuserMetricExtension
Hi, I am establishing a cluster and trying to use cluster sharding, but while establishing I am getting this error [ERROR] [03/17/2015 12:16:53.516] [main] [ActorSystem(DefaultActorSystem)] While trying to load extension [akka.cluster.metrics.ClusterMetricsExtension], skipping... java.lang.ClassNotFoundException: akka.cluster.metrics.ClusterMetricsExtension at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) I manually searched for the class ClusterMetricsExtension in akka.cluster jar but it not there. my application.conf file is akka { loglevel = INFO actor { provider = akka.cluster.ClusterActorRefProvider } remote { log-remote-lifecycle-events = on #transport = akka.remote.netty.NettyRemoteTransport netty.tcp{ hostname = 127.0.0.2 port = 2552 } } cluster.seed-nodes = [ akka.tcp://DefaultActorSystem@127.0.0.1:2551, akka.tcp://DefaultActorSystem@127.0.0.2:2552] auto-down-unreachable-after = 10s } # Disable legacy metrics in akka-cluster. akka.cluster.metrics.enabled=off # Enable metrics extension in akka-cluster-metrics. akka.extensions= [akka.cluster.metrics.ClusterMetricsExtension] # Sigar native library extract location during tests. # Note: use per-jvm-instance folder when running multiple jvm on one host. akka.cluster.metrics.native-library-extract-folder=${user.dir}/target/native is there something wrong with this configuration? Thanks and Regards Krishna Kadam -- 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] Best Practice for Akka in Java MVC (or MVVM, MVP, ...)
I want to use actors in a Java MVC application. One reason is to replace the conventional property-change events by some meaningful messages sent between model actors and view actors. Although there are many solutions and hints about Akka available that focus on smaller details of Akka and the UI, I couldn't find one for the bigger picture. So, to make it short, my question is: *What is your suggestion to design an actor-based MVC application?* Some considerations: The model: Of course, there will be one or several model actors that wrap the business logic/objects and may supervise child actors for sub-tasks. The view: There will be one or several view actors that update UI panes, canvases, etc. The question here will be whether to use Platform.runLater or other solutions to access the UI thread. The controller: Here is my biggest uncertainty. Should the controller just hold the ActorSystem, instantiate everything, and let the actors talk on their own, or should it keep the central role of a MVC application: that all events must pass by him? By the way, I'm not stuck with MVC. If you suggest that another design like MVP, MVVM, ... makes more sense, please tell it. Sorry that I kept the topic that general. But I hope that the answers will also be useful for others, so I don't like to distract them with my specific problem domain. -- 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] Access to current message in actor
Hi there - Somewhat regularly I have a need to access the current message in an actor method outside of the receive. It's usually some case where I want to do something generic with it, like logging. There are two general approaches that I've used. The first approach is pass the message down to where ever it's needed, for example: def receive = { case f @ Foo(a, b) = handleFoo(f, a, b) case b @ Bar(x, y, z) = handleBar(b, x, y, z) many other cases... } Somewhere down the call chain everything calls a generic method that is passed the current message. The other approach is to create a Receive wrapper (a la LoggingReceive) that captures the message in isDefinedAt and makes it available as a variable. For example: class MyActor extends CurrentMessageActor { def receive = CaptureCurrentMessage { case Foo(a, b) = ... def genericMethod() { println(currentMessage) } Neither approach is very satisfactory because of the boilerplate. I'm wondering, if we have access to the sender, why not the current message? Is this something that would be useful for other people? Is there a reason why we wouldn't want to expose this in the regular Akka API? 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-user] Re: How to use Cluster Sharding, Please do reply it's very urgent
On Tuesday, March 17, 2015 at 12:53:15 PM UTC+3, Krishna Kadam wrote: Hi Jim, I am trying to configure cluster to use cluster sharding but while establishing the cluster I am getting some exception on akka Extension I just want to know while configuring sharding in akka's application.conf what should be the value for akka.extensions field? and is it necessary to use akka .extensions? please do reply. No it isn't nessesary to set akka.extensions in application.conf. The only requirements for using cluster sharding are to add akka-contrib dependency and set akka.actor.provider to akka.cluster.ClusterActorRefProvider. -- 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] Access to current message in actor
Same rules apply as for sender(). Capture the value before running a Future. On Tuesday, March 17, 2015, Andrey Kuznetsov f...@loathing.in wrote: Methods called outside of receive may be called asynchronously, what they would expect in `currentMessage` method? On Tuesday, March 17, 2015 at 10:53:23 PM UTC+3, Eric Pederson wrote: Hi there - Somewhat regularly I have a need to access the current message in an actor method outside of the receive. It's usually some case where I want to do something generic with it, like logging. There are two general approaches that I've used. The first approach is pass the message down to where ever it's needed, for example: def receive = { case f @ Foo(a, b) = handleFoo(f, a, b) case b @ Bar(x, y, z) = handleBar(b, x, y, z) many other cases... } Somewhere down the call chain everything calls a generic method that is passed the current message. The other approach is to create a Receive wrapper (a la LoggingReceive) that captures the message in isDefinedAt and makes it available as a variable. For example: class MyActor extends CurrentMessageActor { def receive = CaptureCurrentMessage { case Foo(a, b) = ... def genericMethod() { println(currentMessage) } Neither approach is very satisfactory because of the boilerplate. I'm wondering, if we have access to the sender, why not the current message? Is this something that would be useful for other people? Is there a reason why we wouldn't want to expose this in the regular Akka API? 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 a topic in the Google Groups Akka User List group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/oDg5k5dhR8A/unsubscribe. To unsubscribe from this group and all its topics, send an email to akka-user+unsubscr...@googlegroups.com javascript:_e(%7B%7D,'cvml','akka-user%2bunsubscr...@googlegroups.com'); . To post to this group, send email to akka-user@googlegroups.com javascript:_e(%7B%7D,'cvml','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. -- Sent from Gmail Mobile -- 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 use Cluster Sharding, Please do reply it's very urgent
Hi Jim, I am trying to configure cluster to use cluster sharding but while establishing the cluster I am getting some exception on akka Extension I just want to know while configuring sharding in akka's application.conf what should be the value for akka.extensions field? and is it necessary to use akka .extensions? please do reply. Thanks and Regards Krishna Kadam -- 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: Looking for a good Akka spare time learning project
Hey Haddock, I'm working on a journey management system and plan to use Akka to create a Finite State Machine to execute requests in parallel as they are triggered by mostly external events. Let me know if that sounds like something you wanted to be involved with. Cheers, Richard On Wednesday, 18 March 2015 00:25:38 UTC+10, Haddock wrote: Hello, I would like to develop a little Akka project with Scala in my spare time. I have been exposed to concurrent programming before and therefore think I have a not so bad understanding of acors. Problem is that it is hard to find a good project to work on. What I came up with so far was bird flock simulation, particle simulation or interactive games. Problem with this is that things like that will make people lift an eyebrow in some job interview if I try to explain my Scala skills (especially with a game). So I need something like a stock exchange simulation or some trading simulation. But this is hard to do without knowing the problem domain. So I thought I ask whether anyone has some idea for some little nice Akka project where something is done in a reactive way. Thank you, Haddock -- 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: Looking for a good Akka spare time learning project
You could check out an open source chat application (both front and back end) I am working on in my spare time to get practice with and demo akka, including akka-cluster, persistence, sharding, http, streams, and (eventually) websockets. The code base is still quite small and not all the pieces are in place, even so it is a working app; it would be a great opportunity for learning the application of the various akka technologies. As more people get involved with the project, it will also benefit other developers who are getting up to speed with the akka toolkit. If this is of interest, then hopefully the README is enough to get oriented, but feel free to ask questions. https://github.com/ezoerner/scalable-chat good luck, Eric On Tuesday, March 17, 2015 at 10:25:38 AM UTC-4, Haddock wrote: Hello, I would like to develop a little Akka project with Scala in my spare time. I have been exposed to concurrent programming before and therefore think I have a not so bad understanding of acors. Problem is that it is hard to find a good project to work on. What I came up with so far was bird flock simulation, particle simulation or interactive games. Problem with this is that things like that will make people lift an eyebrow in some job interview if I try to explain my Scala skills (especially with a game). So I need something like a stock exchange simulation or some trading simulation. But this is hard to do without knowing the problem domain. So I thought I ask whether anyone has some idea for some little nice Akka project where something is done in a reactive way. Thank you, Haddock -- 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] Stream Materialization, a larger discussion.
Hi Roland, Thank you for the reply and sorry for the delay. The way I'd like to look at stream materialization is as a facility for runtime information discovery and action execution. This mechanism sits next to the main information flow and at times has the ability to influence that flow. A management sub-channel is probably not technically accurate, but I hope you get my meaning. The flexibility of this discovery/management facility in its current form is what I'm worried about. There are good examples in the documentation for how to expose both discovery and management operations via materialization. val (promise, cancellable, future) = r11.run() promise.success(0) cancellable.cancel() future.map(_ + 3) This does a pretty good job of getting these monitoring and management concerns across the stream boundary. Issue 16168 will hopefully address access to these values from within a stream. I'm tempted to use this facility for JMX-like functionality on a stream. But if you aren't careful you'll run into a problem with shape. Let's say that version 1 of my lib ships out with a throttler stage. That stage, like in the docs, throttles at 1/s and exposes a cancellable management object. That's great, until folks start asking for the ability to change the throttle rate at runtime as well. This functionality could of course be implemented in v2, however the shape of my stage's materialized object then needs to change. So I replace my Cancellable object with an Operations object that has both cancel() and updateRate(newRate) methods. I push this out in v2, but this is a breaking change for everyone in v1 because the materialized shape is part of the interface and used or not is still there. The folks that make vanilla use of my stage are annoyed because they're forced to recompile against a feature they weren't even using. Even if I have the foresight to build stages with an easier to evolve materialization shape (maybe an object that exposes Operations and Informations in a more flexible way) I don't have the ability to benefit from foundational enhancements by the stream library itself. For example, even when I finish rolling my own JMX concept, I can't ask Akka to help me add to this functionality with their own materialization details (where would such information be placed?). Currently (AFAIK) Akka Streams doesn't expose the ability to discover or manipulate per-stage runtime materialization, as in the materialization provided by the materializer. Can't discover the current default internal buffer size, can't modify this size, update thread pool settings, access stats metrics of message flow through the internal actors, or execution time taken. And the lack of this functionality today is fine. Over time more and more base operations and informations could be exposed by the runtime, and developers could add their own operations and informations on top of this base. But this only works if there is a base and this base is of some flexible shape. I guess what I'm asking for is for the Akka team to look at the materialization value system as more of a per-stage command and control system. Something that would benefit from Akka prescribing a management methodology instead of leaving it completely open. IMHO the current form, while open and type safe, ends up being brittle. There isn't a methodology or framework by which Akka can raise all ships in the future (by providing certain standard ops/infos) and developers without management framework development experience will accidentally find themselves painted into a corner wrt to the shape of their materialization values. I think I'll stop here, but next up would be a discussion on the proper way to interact with materialization values. Even if I get everything that I ask for and the shape turns into some standardized object exposing information and actions, this still ends up being shared mutable state bleeding out of the Stream with a now undefined concurrency model. Wouldn't it be better to expose some sort of action sink and information source instead of a single shared object? Thanks for your time, Jim On Sunday, March 8, 2015 at 11:24:58 AM UTC-7, rkuhn wrote: Hi Jim, thanks for starting the discussion! Replies inline. 5 mar 2015 kl. 21:30 skrev Jim Hazen jimhaz...@gmail.com javascript:: I've been following Akka Streams for bit. I've noticed the changes in M4 and of course read the materialization sections of: http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-M4/scala/stream-flows-and-basics.html I have tremendous respect for the Akka team and understand that getting this right is hard. But, are we there yet? Basically yes, but one thing is still missing https://github.com/akka/akka/issues/16168. I hope that we’ll be able to fix the remaining things without further disruptive changes. Originally the concept was Map based, with the
Re: [akka-user] Error while using CLuserMetricExtension
It looks like you use version 2.3.9 but reading snapshot docs. Make sure that you read the docs for the version that you are using. /Patrik 17 mar 2015 kl. 00:00 skrev Krishna Kadam shrikrishna.kad...@gmail.com: Hi, I am establishing a cluster and trying to use cluster sharding, but while establishing I am getting this error [ERROR] [03/17/2015 12:16:53.516] [main] [ActorSystem(DefaultActorSystem)] While trying to load extension [akka.cluster.metrics.ClusterMetricsExtension], skipping... java.lang.ClassNotFoundException: akka.cluster.metrics.ClusterMetricsExtension at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) I manually searched for the class ClusterMetricsExtension in akka.cluster jar but it not there. my application.conf file is akka { loglevel = INFO actor { provider = akka.cluster.ClusterActorRefProvider } remote { log-remote-lifecycle-events = on #transport = akka.remote.netty.NettyRemoteTransport netty.tcp{ hostname = 127.0.0.2 port = 2552 } } cluster.seed-nodes = [ akka.tcp://DefaultActorSystem@127.0.0.1:2551, akka.tcp://DefaultActorSystem@127.0.0.2:2552] auto-down-unreachable-after = 10s } # Disable legacy metrics in akka-cluster. akka.cluster.metrics.enabled=off # Enable metrics extension in akka-cluster-metrics. akka.extensions= [akka.cluster.metrics.ClusterMetricsExtension] # Sigar native library extract location during tests. # Note: use per-jvm-instance folder when running multiple jvm on one host. akka.cluster.metrics.native-library-extract-folder=${user.dir}/target/native is there something wrong with this configuration? Thanks and Regards Krishna Kadam -- 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] Looking for a good Akka spare time learning project
Hello, I would like to develop a little Akka project with Scala in my spare time. I have been exposed to concurrent programming before and therefore think I have a not so bad understanding of acors. Problem is that it is hard to find a good project to work on. What I came up with so far was bird flock simulation, particle simulation or interactive games. Problem with this is that things like that will make people lift an eyebrow in some job interview if I try to explain my Scala skills (especially with a game). So I need something like a stock exchange simulation or some trading simulation. But this is hard to do without knowing the problem domain. So I thought I ask whether anyone has some idea for some little nice Akka project where something is done in a reactive way. Thank you, Haddock -- 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] Websockets in Akka.HTTP?
Hello. Will the release version of Akka.HTTP support websockets? -- Best regards, Eax Melanhovich http://eax.me/ -- 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 use Cluster Sharding, Please do reply it's very urgent
W dniu wtorek, 17 marca 2015 10:53:15 UTC+1 użytkownik Krishna Kadam napisał: Hi Jim, I am trying to configure cluster to use cluster sharding but while establishing the cluster I am getting some exception on akka Extension What is the exception? On a more general note: http://www.catb.org/esr/faqs/smart-questions.html#urgent Cheers, Rafał -- 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: Websockets in Akka.HTTP?
See here: https://github.com/akka/akka/issues/16848 Cheers, Rafał W dniu wtorek, 17 marca 2015 15:35:34 UTC+1 użytkownik Eax Melanhovich napisał: Hello. Will the release version of Akka.HTTP support websockets? -- Best regards, Eax Melanhovich http://eax.me/ -- 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.