Re: [akka-user] Testing Terminated

2015-08-06 Thread Heiko Seeberger
> On 05 Aug 2015, at 10:17, Patrik Nordwall wrote: > > On Wed, Aug 5, 2015 at 8:23 AM, Heiko Seeberger > wrote: >> On 04 Aug 2015, at 22:52, Patrik Nordwall > > wrote: >> >> There is no support in testkit for creating fake Terminated m

[akka-user] Re: system.actorSelection works only from the same system that created the actor

2015-08-06 Thread akkanex
Do not use localhost (127.0.0.0) - use instead the real IP address of the host. See Akka Java Documentation: Why are replies not received from a remote actor? > The most common reason is that the local system’s name (i.e. the > system@host:1234 part in the answer > above) is not reachable from

[akka-user] Re: REST service with Akka and Java

2015-08-06 Thread akkanex
Thank you André, this looks interesting. Only drawback is, that it is in experimental state. Am Mittwoch, 5. August 2015 14:58:19 UTC+2 schrieb André: > > This >

Re: [akka-user] How to recover from network partition quarantine

2015-08-06 Thread Morten Kjetland
… On Wed, Aug 5, 2015 at 9:45 PM wrote: > Hi Morten, > > We'd like to implement a solution similar to yours, can you elaborate on > some details of your solution? > First let me say that our solution is not optimal, but it works. It was improved over time to work with what we experienced in prod

Re: [akka-user] Messages are lost on node failure while shard is moving to another location.

2015-08-06 Thread Martynas Mickevičius
Hi Danny, what you are seeing is normal behavior. Since sending messages is at-most-once-delivery, there is no implicit guarantee that all messages that are being sent are going to be delivered to the destination. Akka's tries hard that messages are not lost, but if someone pulls the plug on the J

[akka-user] Need help for implementing Server Sent Events with Akka HTTP (and Streams)

2015-08-06 Thread Maxymilian Śmiech
Hi, Im porting code from spray to Akka HTTP. Routing DSL is quite easy, but I have problems with chunked encoding needed for SSE. In spray it is simple: I just send MessageChunks to spray's "responder". In Akka there are two problems: 1. How do I combine routing DSL with raw HttpResponse(enti

[akka-user] Re: [akka-streams] groupBy and merge

2015-08-06 Thread Manuel Bernhardt
Hi again, I figured out that what I want is FlattenStrategy.merge which exists conceptually but has not materialized yet (https://github.com/akka/akka/issues/15089). As a workaround I implemented a custom splitter with FlexiRoute given that I am in the lucky position to know beforehand the ent

[akka-user] Re: Need help for implementing Server Sent Events with Akka HTTP (and Streams)

2015-08-06 Thread Johan Andrén
Have you seen Heiko Seebergers akka-sse library? Does what you want, or if you cannot use it, is a good example of how to do it. https://github.com/hseeberger/akka-sse -- Johan Andrén Typesafe - Reactive apps on the JVM Twitter: @apnylle -- >> Read the docs: http://akka.io/docs

Re: [akka-user] Re: REST service with Akka and Java

2015-08-06 Thread Konrad Malawski
For Akka HTTP the experimental means that we reserve the right to change APIs slightly, but it's not going away it that's what worries you. We're planning to focus on its performance these weeks (it's not very fast yet). On Thu, Aug 6, 2015 at 9:05 AM, wrote: > Thank you André, this looks inter

[akka-user] Re: Add JMX Mbean to an Actor for toggle purposes?

2015-08-06 Thread Johan Andrén
I think that JMX Beans are executed on a separate JMX thread pool (not 100% sure), which means you cannot access the internal mutable state in the actor safely by publishing it into JMX. What you should be able to do safely though, is to create a separate JMX Bean that has access to or can get

Re: [akka-user] Re: 2.3.12. Akka cluster init timeouts

2015-08-06 Thread Marek Żebrowski
I did not change the default dispatcher. I hope that I have all heavy task run by other dispatchers - I'll double check it. W dniu środa, 5 sierpnia 2015 22:57:05 UTC+2 użytkownik Patrik Nordwall napisał: > > Have you changed the default configuration of the default-dispatcher, or > do you do a

Re: [akka-user] Re: REST service with Akka and Java

2015-08-06 Thread akkanex
Thank you Konrad. I had to dive a bit deeper into Akka-HTTP and found two more concerns for my use case. My plan is to create a REST server with following requirements: - SSL - Swagger integration (or any other API doc) >From what I understand, above requirements are not available at the

Re: [akka-user] Re: REST service with Akka and Java

2015-08-06 Thread akkanex
Thank you Konrad. I had time to dive a bit deeper into Akka-HTTP and found two more concerns for my use case. My plan is to create a REST server with following requirements: - SSL - Swagger integration (or any other API doc) >From what I understand, above requirements are not available at

[akka-user] Akka HTTP web-socket authentication session ID

2015-08-06 Thread Guido Medina
Hi, I'm trying to implement the following workflow or checking if there is an example (preferably in Java) somewhere: 1. Connect via web-socket, authenticate and receive a session ID identifier. 2. Using that session ID an actor is created which will handle all subsequent requests

Re: [akka-user] akka streams - costs for creating materializers

2015-08-06 Thread Martynas Mickevičius
Hi Leslie, currently materializer is quite lightweight. You do not need to care about performance implications when creating a new one. However in the future this could change where materializer could even become stateful for quicker materialization. On Tue, Jul 14, 2015 at 2:18 PM, wrote: > I

Re: [akka-user] akka streams - costs for creating materializers

2015-08-06 Thread Martynas Mickevičius
That is very much true. So it shutdowns the supervisor actor that manages. But you need to make sure that all of the streams are completed when you shutdown the materializer. On Thu, Aug 6, 2015 at 1:42 PM, Viktor Klang wrote: > It needs to be shut down though? > > On Thu, Aug 6, 2015 at 1:34 PM

Re: [akka-user] Best strategy for zero-downtime cluster upgrades with changed messages

2015-08-06 Thread Brice Figureau
On Wed, 2015-08-05 at 11:04 -0700, Arne Claassen wrote: > I'm trying to figure out what the best strategy for making changes to > the message protocols in my cluster that will let me do upgrades while > the cluster is running. I'm trying to get to a point where I have some > parity in upgrades as I

[akka-user] Re: Akka Streams and OAuth 2.0

2015-08-06 Thread Lance Arlaus
David- What if we pivot the problem slightly? Instead of framing token refresh as a reaction to failure, what if we consider it a normal, adjacent flow? In other words, assume there's a source that provides a continuous stream of Access Tokens. Within the expiration window of a given Access Tok

Re: [akka-user] Re: Ask Pattern vs Micro Actors?

2015-08-06 Thread Patrik Nordwall
You might find the Java 8 compatibility kit for Scala interesting. On Wed, Aug 5, 2015 at 8:32 PM, Jim Hazen wrote: > Yea. I can sympathize. Akka 2.4, supports and requires Java 8. Have you > explored the 2.4 milestones? I haven't looked at the 2

[akka-user] Coordinator in cluster sharding: No oldest node

2015-08-06 Thread Yifei
Hi, I have two seeds nodes up in my cluster. When I tried to start a new shard region, there is always no oldest state actors, and I don't know where the coordinator is located The log looks like this: [INFO] [08/06/2015 11:23:31.684] [OMSAkkaCluster-akka.actor.default-dispatcher-20] [akka.t

[akka-user] Re: Coordinator in cluster sharding: No oldest node

2015-08-06 Thread Yifei
After I set akka.contrib.cluster.sharding.role to the same role in akka.cluster.role, it works. What does akka.contrib.cluster.sharding.role mean? On Thursday, August 6, 2015 at 11:37:28 AM UTC-4, Yifei wrote: > > Hi, > > I have two seeds nodes up in my cluster. When I tried to start a new sha

[akka-user] How does Akka avoid Live Lock?

2015-08-06 Thread kraythe
Currently our use of Akka is limited and I would like to increase it. However, I am getting some good questions from colleagues that I don't have the answer to. One of the questions is about avoidance of Live Lock. Essentially we are using Hazelcast distributed execution via executors and calla

Re: [akka-user] akka streams 1.0 - actor publisher do not receive demand

2015-08-06 Thread paweł kamiński
thanks for your answer, I am more curious if this is my configuration in env where 3 threads compete for resources - and probably this causes the problem I ve described - or this is a general problem with notifying publisher about demand. in other words if I have fast consumer (and adding to li

Re: [akka-user] How does Akka avoid Live Lock?

2015-08-06 Thread Heiko Seeberger
I’m not familiar with Hazelcast executors, but from what you wrote it looks like processes have thread pools which might starve and lead to locks. In Akka actors by default use an event-based dispatcher, i.e. you can use a couple of threads (some 10s) for a lot of actors (1000s or even 100s)

[akka-user] When using mapAsync, incoming messages go to dead letter queue

2015-08-06 Thread sfosborn
Using the following stream setup, if my final, pre-sink step uses mapAsync and calls a method that returns a future (of course), my stream never executes and I see dead-letter messages in the log. If I change the doPublish method to use map(), everything works fine. But ideally, I'd like to

Re: [akka-user] How does Akka avoid Live Lock?

2015-08-06 Thread kraythe
I am curious how it does that in the context of the use case I presented above. Do you know and can you explain it or perhaps point me to documentation explaining it ? On Thursday, August 6, 2015 at 4:02:36 PM UTC-5, Heiko Seeberger wrote: > > I’m not familiar with Hazelcast executors, but from

Re: [akka-user] How does Akka avoid Live Lock?

2015-08-06 Thread Viktor Klang
hi, what you describe is not a live lock, it is a dead lock. the reason why akka avoids them is that akka goes very far in not using locks. -- Cheers, √ On 6 Aug 2015 18:02, "kraythe" wrote: > Currently our use of Akka is limited and I would like to increase it. > However, I am getting some go

[akka-user] Re: When using mapAsync, incoming messages go to dead letter queue

2015-08-06 Thread sfosborn
Update on this. My impression that the stream is based on the fact that I'm not seeing logging from the individual steps in the flow - but possibly these are not output until the stream completes? It seems like I can replicate the issue even using Map if I Await the future and return the awai

[akka-user] Re: When using mapAsync, incoming messages go to dead letter queue

2015-08-06 Thread sfosborn
Alright, withdrawing this question for now as I think I haven't narrowed down the conditions under which my stream becomes a black hole. I think when this Future fails, but will withdraw for now. -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >>

Re: [akka-user] Re: Akka Streams and OAuth 2.0

2015-08-06 Thread David Pinn
Wow, Lance! You have blown my mind. You are so right about treating a token refresh as a part of normal program flow, and not an error condition. I'm spending today getting this right. I have a couple of thoughts on implementation. I'm wondering if Akka Agents can help us out here. They're designe

Re: [akka-user] Re: When using mapAsync, incoming messages go to dead letter queue

2015-08-06 Thread Patrik Nordwall
If the mapAsync Future is completed with failure the stream will be completed with failure by default. Perhaps use future.recoverWith in the mapAsync function? /Patrik On Fri, Aug 7, 2015 at 2:35 AM, wrote: > Alright, withdrawing this question for now as I think I haven't narrowed > down the con

Re: [akka-user] How does Akka avoid Live Lock?

2015-08-06 Thread Patrik Nordwall
You mention that the Hazelcast calls return futures. Is that java's Future and what do you do with them? Do you block threads while waiting for the Future to complete? On Thu, Aug 6, 2015 at 11:52 PM, Viktor Klang wrote: > hi, > > what you describe is not a live lock, it is a dead lock. > the re

Re: [akka-user] akka streams 1.0 - actor publisher do not receive demand

2015-08-06 Thread Patrik Nordwall
You don't have any backpressure when sending the messages to the actor. That is done outside of Akka streams. It will happily send all 100 messages immediately (this is extremely fast) and fill up the buffer. If you would use a iterator based Source to emit the 100 elements instead of sending them

Re: [akka-user] Re: Coordinator in cluster sharding: No oldest node

2015-08-06 Thread Patrik Nordwall
The purpose of the role is to define that the shards are only supposed to run on a subset of the nodes, the ones tagged with the specified role. If you start it on a node that does not have this role it will be started in proxy only mode. By the way, we have changed this in 2.4-M2 to make the usag

Re: [akka-user] Pending Mailbox on Actor Failover in Cluster

2015-08-06 Thread Patrik Nordwall
If a JVM crashes all data in the memory of the JVM will be lost, so also messages. On Wed, Aug 5, 2015 at 2:41 AM, Paul Cleary wrote: > When using Akka Clustering, if a JVM crashes, what happens to the pending > messages in the actors on the failed system? > > -- > >> Read the docs: http

Re: [akka-user] ClusterClient dropping messages

2015-08-06 Thread Patrik Nordwall
Messages can always be lost (akka has at-most-once as message delivery) so you should design accordingly, i.e. add some mechanism to resend messages that have not been acknowledged to achieve at-least-once where needed. Anyway, it can be interesting to understand why the messages are dropped in th