[akka-user] Re: new project - akka streams/http - is using the current spray release with akka streams and migrating later too painful?
Hi ric thanks for your answer. I guess my problem is not really with akka http (spray is fine) but with akka streams. I don't want to start my project with rx and then migrate to akka streams. Let's leave akka-http out of the question and reformulate: should I start using akka-streams right away or stay with rx, maybe with the reactive streams adapters (https://github.com/ReactiveX/RxJavaReactiveStreams) ? On Wednesday, 4 February 2015 00:04:13 UTC, ric...@jesims.com.au wrote: Hey Giovanni, I just asked a very similar question a couple days ago, some of the info you need was already answered there: https://groups.google.com/forum/#!searchin/akka-user/New$20projects$20should$20use$20Spray.io$20or$20Akka-HTTP/akka-user/JHktsLhEvAM/_0b01aqTuPYJ Cheers On Tuesday, 3 February 2015 09:34:41 UTC+10, Giovanni Alberto Caporaletti wrote: Hi, I need to start a new project in a couple of months (and hopefully have a first working prototype in 2-3 months more). I am a rxscala/java user, and am following the reactive streams/akka streams projects with huge interest. For the api layer, akka-http is too immature to be used right now (I need websockets and ssl for example), although I'd really like to use the new akka streams api for the reactive logic. Do you think it makes sense/is possible to use the latest release of spray and integrate it with the current milestone of akka-streams only to migrate everything to akka-http later on? If not, what do you suggest? *When do you think akka streams/http 1.0 final will be released?* Alternatively, do you think it would be a good choice to start with rxscala (maybe using the reactive streams adapters, but I've never used them) and then migrate to akka streams? Thanks G TL;DR: I've been using rxscala for another project, I really want to use akka streams for a new one but need ssl, websocket and implementation maturity of spray. What do I do? -- 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] Graceful shutdown after persists completes
I am sending heavy rate of messages to the actor that updates it's state for (i -0 to 10){ persistentActor ! Cmd(foo+i) } and using the persistAsync like this val receiveCommand: Receive = { case Cmd(data) = persistAsync(Evt(s${data}-${numEvents}))(updateState) case snap = saveSnapshot(state) case print = println(state) } how can I verify that the persistence process is completed in order to gracefully shutdown the system ? Thanks Avi -- 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] AtLeastOnceDelivery - mapping my own messageId to deliveryId possible?
According to http://doc.akka.io/docs/akka/snapshot/scala/persistence.html#Relationship_between_deliver_and_confirmDelivery : A function can be created to map your own messageId to deliveryId, which may come from your own domain model. This function must keep track of which messageId have been acknowledged. Alternatively, the Persistence module provides a default sequence number implementation which can also be used as the deliveryId for messages. The default sequence increases monotonically, without gaps. I would like to be able to use my own deliveryId. It is not possible with current implementation (see code below). trait AtLeastOnceDelivery { private def nextDeliverySequenceNr(): Long = {...} def deliver(): Unit = { ... val deliveryId = nextDeliverySequenceNr() ... } } Pawel -- 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 cluster unreachable
I have upgraded to 2.3.9 it have now been running for 5 days, without any problems. On 28 January 2015 at 11:50, Idar Borlaug idar.borl...@gmail.com wrote: I know, we have a few problems with upgradeing to 2.3.9. (we might wait until eventstore has a cluster connector for java) The only thing i can see is that the nodes have been almost idle for a good while. But there are a few requests coming in. It dosen work fine for 2-3 days. Will the state actor die if say a firewall cuts the tcp connection because its been alive too long? I will see if operations can monitor more data, and consider upgrading to 2.3.9 again. On 27 January 2015 at 14:27, Björn Antonsson bjorn.antons...@typesafe.com wrote: Hi Idar, A lot of things have been fixed in akka since 2.2.4. Would it be possible to upgrade to 2.3.9? From the log that you pasted it seems like the akka protocol state actor for the connection to node 2 has died on node 1, before your log starts. Is there something unusual going on on the machines, like GC or something else that would consume resources at the time of the failure? Are you monitoring other health metrics like disk space and swap usage? B/ On 26 January 2015 at 12:31:19, Idar Borlaug (idar.borl...@gmail.com) wrote: Hi I have a 2 node akka cluster, which looses connection once every two days. Often when the server i almost idle. We are still on akka 2.2.4, using oracle java 1.8_25. Its a virtual servers running on vmware esx. The application have been running fine for 3 years, but started with this a few weeks ago. Anyone have any ideas on were to start troubleshooting this? My clusterconfig: remote { log-sent-messages = on log-received-messages = on log-remote-lifecycle-events = off netty.tcp { port = 45000 } watch-failure-detector.threshold = 15 } cluster { log-info = on auto-down = on auto-join = on failure-detector { threshold = 15 min-std-deviation = 500 ms acceptable-heartbeat-pause = 20 s } heartbeat-request { grace-period = 20 s expected-response-after = 10 s time-to-live = 60 s } use-dispatcher = cluster-dispatcher } } cluster-dispatcher { type = Dispatcher executor = fork-join-executor fork-join-executor { parallelism-min = 2 parallelism-max = 4 } } logoutput: node1: 2015-01-24 03:30:02,242 [svarut-akka.actor.default-dispatcher-25] WARN n.k.e.DeadLetterLogger - Dead letter: DeadLetter(Timer(heartbeat-timer,HeartbeatTimer,true,0),Actor[akka://svarut/dea dLetters],Actor[akka://svarut/system/transports/akkaprotocolmanager.tcp0/akkaProtocol-tcp%3A%2F%2Fsvarut%40193.161.171.182%3A53119-2#-1998086621]) 2015-01-24 03:30:02,242 [svarut-akka.actor.default-dispatcher-25] WARN n.k.e.DeadLetterLogger - Dead letter: DeadLetter(Disassociated(Unknown),Actor[akka://svarut/deadLetters],Actor[akka:/ /svarut/system/transports/akkaprotocolmanager.tcp0/akkaProtocol-tcp%3A%2F%2Fsvarut%40193.161.171.182%3A53119-2#-1998086621]) 2015-01-24 03:30:02,312 [svarut-akka.actor.default-dispatcher-24] WARN n.k.e.DeadLetterLogger - Dead letter: DeadLetter(DisassociateUnderlying(Unknown),Actor[akka://svarut/deadLetters],Act or[akka://svarut/system/transports/akkaprotocolmanager.tcp0/akkaProtocol-tcp%3A%2F%2Fsvarut%40193.161.171.182%3A53119-2#-1998086621]) 2015-01-24 03:30:02,312 [svarut-akka.actor.default-dispatcher-24] WARN n.k.e.DeadLetterLogger - Dead letter: DeadLetter(Timer(AckIdleTimer,AckIdleCheckTimer,true,0),Actor[akka://svarut/dea dLetters],Actor[akka://svarut/system/endpointManager/endpointWriter-akka.tcp%3A%2F%2Fsvarut%40193.161.171.182%3A45000-1#1403595424]) 2015-01-24 03:30:02,312 [svarut-akka.actor.default-dispatcher-24] WARN n.k.e.DeadLetterLogger - Dead letter: DeadLetter(Timer(AckIdleTimer,AckIdleCheckTimer,true,0),Actor[akka://svarut/dea dLetters],Actor[akka://svarut/system/endpointManager/endpointWriter-akka.tcp%3A%2F%2Fsvarut%40193.161.171.182%3A45000-1#1403595424]) 2015-01-24 03:30:02,312 [svarut-akka.actor.default-dispatcher-24] WARN n.k.e.DeadLetterLogger - Dead letter: DeadLetter(Timer(AckIdleTimer,AckIdleCheckTimer,true,0),Actor[akka://svarut/dea dLetters],Actor[akka://svarut/system/endpointManager/endpointWriter-akka.tcp%3A%2F%2Fsvarut%40193.161.171.182%3A45000-1#1403595424]) 2015-01-24 03:30:02,312 [svarut-akka.actor.default-dispatcher-24] WARN n.k.e.DeadLetterLogger - Dead letter: DeadLetter(TakeOver(akka.remote.transport.AkkaProtocolHandle@40711a86 ),Actor[ak ka://svarut/system/endpointManager#1220933312],Actor[akka://svarut/system/endpointManager/endpointWriter-akka.tcp%3A%2F%2Fsvarut%40193.161.171.182%3A45000-1#1403595424]) 2015-01-24 03:30:27,666 [svarut-akka.actor.default-dispatcher-31] ERROR
Re: [akka-user] Re: Send message from netty code to actor system
Generally there are 2 ways to design for this problem: Once you have an actor reference, you can send things to it. So you can simply do this: targetActorRef ! myThing When the actor is done with the processing, it will call: myThing.myMethod This design is OK when the target actor is very reliable and it lies in the same node with myThing. Another way, is to use an actor to wrap around myThing. This wrapper actor will communicate with targetActorRef. It may watch targetActorRef to handle the case when targetActorRef dies, targetActorRef doesn't respond after some timeout etc. On Wednesday, February 4, 2015 at 10:09:19 PM UTC+9, Jabbar Azam wrote: I found some nice example showing integration of netty with akka on github. This is what I'm looking at https://github.com/gibffe/fuse specifically https://github.com/gibffe/fuse/blob/master/src/main/java/com/sulaco/fuse/netty/FuseChannelHandler.java Its embarrassingly simple :) On Tuesday, 3 February 2015 13:48:47 UTC, Jabbar Azam wrote: Oops I meant channel handler. On Tuesday, 3 February 2015 13:32:21 UTC, Jabbar Azam wrote: Hello, Sorry for the late reply. For some reason the forum messages didn't get forwarded to my email. I was thinking of using typedactors because I am trying to integrate non actor code(cloudhopper SMPP which uses netty) into an actor system. Netty does use callbacks so I can use asynchronous behaviour. Do you think I could encapsulate a netty channel inside an actor? A netty channel can call callbacks whenever something changes in the channel. On Friday, 30 January 2015 12:38:14 UTC, Björn Antonsson wrote: Hi, Are you sure that you need to block the sending code while the actor does its work? Is there an asynchronous API in netty that you can use where the actor would invoke a callback when it has finished processing the packet? B/ On 27 January 2015 at 11:03:26, Jabbar Azam (aja...@gmail.com) wrote: I think I need to look at typedactors. On Tuesday, 27 January 2015 09:29:43 UTC, Jabbar Azam wrote: Hello, How do I send a message from java non actor based code into an actor system? The code will be running on the same node and will be part of the same source code. So netty will be running, receiving packets, which will send any received packets into an actor system. The actor system will process the packets and then send the response payload back to the netty code. -- 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. -- Björn Antonsson Typesafe http://typesafe.com/ – Reactive Apps on the JVM twitter: @bantonsson http://twitter.com/#!/bantonsson -- 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.4.0 release date?
this is now past due: https://github.com/akka/akka/milestones/2.4.0 can someone in the know please update us on the akka 2.4.0 release date? -- 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] Which is the preferred way to get the current set of cluster nodes?
Our clustered app has a cluster singleton actor that constructs a Cluster instance, and also subscribes to cluster events. If you ask it, What are the current nodes? it uses cluster.state.members. I.e., simplified, something like: val cluster = Cluster(context.system) override def preStart(): Unit = cluster.subscribe(self, classOf[MemberEvent]) def receive = { case state: GetNodes = sender ! cluster.state.members ... } Currently, we just info-log events like MemberUp, MemberDown, etc. But I see an Akka activator example for listening to cluster state that does something like this instead: val cluster = Cluster(context.system) var nodes = Set.empty[Member] override def preStart(): Unit = cluster.subscribe(self, classOf[MemberEvent]) def receive = { case MemberUp(member) = nodes += member case MemberRemoved(member, _) = nodes -= member case state: GetNodes = sender ! nodes ... } Is there a reason not to use the Cluster object's mutable state? It seems to work doing it that way, so I'm wondering whether the activator example is doing it this way just to illustrate how to handle some MemberEvents, or whether what our app is doing is incorrect or less reliable in some circumstances? -- 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: Send message from netty code to actor system
After alot of head scratching I came to same conclusions as you. It's good to see somebody else having the same ideas. On Wednesday, 4 February 2015 21:06:11 UTC, Ngoc Dao wrote: Generally there are 2 ways to design for this problem: Once you have an actor reference, you can send things to it. So you can simply do this: targetActorRef ! myThing When the actor is done with the processing, it will call: myThing.myMethod This design is OK when the target actor is very reliable and it lies in the same node with myThing. Another way, is to use an actor to wrap around myThing. This wrapper actor will communicate with targetActorRef. It may watch targetActorRef to handle the case when targetActorRef dies, targetActorRef doesn't respond after some timeout etc. On Wednesday, February 4, 2015 at 10:09:19 PM UTC+9, Jabbar Azam wrote: I found some nice example showing integration of netty with akka on github. This is what I'm looking at https://github.com/gibffe/fuse specifically https://github.com/gibffe/fuse/blob/master/src/main/java/com/sulaco/fuse/netty/FuseChannelHandler.java Its embarrassingly simple :) On Tuesday, 3 February 2015 13:48:47 UTC, Jabbar Azam wrote: Oops I meant channel handler. On Tuesday, 3 February 2015 13:32:21 UTC, Jabbar Azam wrote: Hello, Sorry for the late reply. For some reason the forum messages didn't get forwarded to my email. I was thinking of using typedactors because I am trying to integrate non actor code(cloudhopper SMPP which uses netty) into an actor system. Netty does use callbacks so I can use asynchronous behaviour. Do you think I could encapsulate a netty channel inside an actor? A netty channel can call callbacks whenever something changes in the channel. On Friday, 30 January 2015 12:38:14 UTC, Björn Antonsson wrote: Hi, Are you sure that you need to block the sending code while the actor does its work? Is there an asynchronous API in netty that you can use where the actor would invoke a callback when it has finished processing the packet? B/ On 27 January 2015 at 11:03:26, Jabbar Azam (aja...@gmail.com) wrote: I think I need to look at typedactors. On Tuesday, 27 January 2015 09:29:43 UTC, Jabbar Azam wrote: Hello, How do I send a message from java non actor based code into an actor system? The code will be running on the same node and will be part of the same source code. So netty will be running, receiving packets, which will send any received packets into an actor system. The actor system will process the packets and then send the response payload back to the netty code. -- 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. -- Björn Antonsson Typesafe http://typesafe.com/ – Reactive Apps on the JVM twitter: @bantonsson http://twitter.com/#!/bantonsson -- 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: Send message from netty code to actor system
I found some nice example showing integration of netty with akka on github. This is what I'm looking at https://github.com/gibffe/fuse specifically https://github.com/gibffe/fuse/blob/master/src/main/java/com/sulaco/fuse/netty/FuseChannelHandler.java Its embarrassingly simple :) On Tuesday, 3 February 2015 13:48:47 UTC, Jabbar Azam wrote: Oops I meant channel handler. On Tuesday, 3 February 2015 13:32:21 UTC, Jabbar Azam wrote: Hello, Sorry for the late reply. For some reason the forum messages didn't get forwarded to my email. I was thinking of using typedactors because I am trying to integrate non actor code(cloudhopper SMPP which uses netty) into an actor system. Netty does use callbacks so I can use asynchronous behaviour. Do you think I could encapsulate a netty channel inside an actor? A netty channel can call callbacks whenever something changes in the channel. On Friday, 30 January 2015 12:38:14 UTC, Björn Antonsson wrote: Hi, Are you sure that you need to block the sending code while the actor does its work? Is there an asynchronous API in netty that you can use where the actor would invoke a callback when it has finished processing the packet? B/ On 27 January 2015 at 11:03:26, Jabbar Azam (aja...@gmail.com) wrote: I think I need to look at typedactors. On Tuesday, 27 January 2015 09:29:43 UTC, Jabbar Azam wrote: Hello, How do I send a message from java non actor based code into an actor system? The code will be running on the same node and will be part of the same source code. So netty will be running, receiving packets, which will send any received packets into an actor system. The actor system will process the packets and then send the response payload back to the netty code. -- 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. -- Björn Antonsson Typesafe http://typesafe.com/ – Reactive Apps on the JVM twitter: @bantonsson http://twitter.com/#!/bantonsson -- 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] How to execute the defer-callback before processing the next command?
Dear users I find the semantics of defer confusing. I thought defer was the same as persist, except the given message was not persisted. Now today, when a bug got me to read the doc again, it states that defer has the same semantics as persistAsync. My first thought was that defer should be renamed deferAsync, to communicate the relation to persistAsync. Both are async, but the point is that persist is executed before the next command is processed, while persistAsync is not. Names aside, is there a function similar to defer, that is guaranteed to be executed before the next command is processed? Best regrads, Anders Båtstrand -- 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.