[akka-user] [akka-http] Incorrect rejection is sent to the client

2015-08-05 Thread Jack Daniels
I have unauthenticated routes and authenticated routes in my Akka/Spray DSL. Below is simplified version of the code val nakedRoutes = pathPrefix("user") { post { entity(as[UserNew]) { user => (validate(EmailValidator.getInstance().isValid(user.email), s"Invalid email address ${us

Re: [akka-user] Requester 2.0 library released

2015-08-05 Thread Patrik Nordwall
Thanks for sharing, Justin! I have not tried it but what you describe here looks great to me. Looking forward to adding this to http://akka.io/community/ Cheers, Patrik On Thu, Jul 30, 2015 at 6:24 PM, Justin du coeur wrote: > Compositional construction of your functions, mainly. pipeTo gets t

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

2015-08-05 Thread Patrik Nordwall
Have you changed the default configuration of the default-dispatcher, or do you do any blocking (long running) tasks on the default-dispatcher? /Patrik On Mon, Aug 3, 2015 at 10:42 AM, Marek Żebrowski wrote: > That failure leads to another failure: actor name not unique > > 08:11:39.893 [sgActor

[akka-user] Event sourcing with akka persistence in practice

2015-08-05 Thread Sudheendra Murthy
For a highly scalable distributed service that I'm building, I'm considering using event sourcing pattern. I'm planning to use Akka clustering with persistent actors for this application. I have a few questions related to event sourcing. - Are there scalability concerns with event sourcing,

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

2015-08-05 Thread leonidb
Hi Morten, We'd like to implement a solution similar to yours, can you elaborate on some details of your solution? On Wednesday, August 5, 2015 at 2:58:19 PM UTC+3, Morten Kjetland wrote: > > Hi, > > We have solved these issues like this: > > We have a ClusterListener on each node that "pings" t

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

2015-08-05 Thread Arne Claassen
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 had when my services talked over HTTP w/JSON. I.e. as long

[akka-user] Re: Akka java newbie : Managing different routess within an actor

2015-08-05 Thread apo
I separated them as per your suggestion. Thank you. On Tuesday, August 4, 2015 at 4:38:43 AM UTC-4, Johan Andrén wrote: > > I would separate the parenting into two actors, one UdpProcessor and one > ObjectProcessor, and then introduce a single Processor parent to those > two. This would basic

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

2015-08-05 Thread Jim Hazen
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.4 Java APIs, however the assumption is that they may have much better support for lambdas than the current 2.3 Java APIs. -- >> Read the docs: http

[akka-user] Correlation accross graph

2015-08-05 Thread Ryan Bair
I'm attempting to implement a flow graph like so: unzip.out0 ~> someLogic ~> router.in router.out1[C] ~> zipA.in0 router.out2[D] ~> zipB.in0 unzip.out1 ~> balance balance ~> ~> zipA.in1 balance ~>

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

2015-08-05 Thread ryan walsh
Hi all, I have been browsing this forum and The Google and can't seem to find any example of whether or not it is possible to register an MBean to an actor? Basically I want the ability to toggle behavior on and off in production for a given actor from a support standpoint. Not knowing which n

Re: [akka-user] Re: Dealing with exceptions with pipeTo

2015-08-05 Thread Richard Rodseth
I sometimes call recover on the returned Future to generate a message of my own, before doing the pipeTo. On Wed, Aug 5, 2015 at 6:30 AM, Johan Andrén wrote: > pipeTo will wrap failures in an akka.actor.Status.Failure and send that > to the actor that you direct the result to (self in this case)

[akka-user] Performance question

2015-08-05 Thread Adam
The general answer similar questions usually get here is that you'll have to measure, but here are a few comments: 1. I'd check what's causing these spikes. The usual suspect is GC. 2. You didn't mention what handling such a request means. Optimally with 2 cores you have 2000ms per second worth

[akka-user] Performance question

2015-08-05 Thread Sreepathi Prasanna Karnam
Hello, I was comparing the performance of linkedblockingqueue vs using router actor. I'm using play framework 2.3.x. So, plan is to queue each incoming request and process it later. Similar to producer-consumer problem. Dispatcher threads queue the requests into the queue and executorservice thr

[akka-user] Akka Streams and OAuth 2.0

2015-08-05 Thread David Pinn
I have an application that pulls data from an external system using HTTP GET requests, the headers of which include an OAuth 2.0 access token. I'm trying to work out what to do when access tokens expire, as they do from time to time. I suppose I could let the stream complete with failure, and t

[akka-user] Re: Dealing with exceptions with pipeTo

2015-08-05 Thread Johan Andrén
pipeTo will wrap failures in an akka.actor.Status.Failure and send that to the actor that you direct the result to (self in this case). *Important note*: There is an error in your code where you access sender() outside of the actor execution flow. For-comprehensions desugar to nested calls of f

Re: [akka-user] http actor & json client questions

2015-08-05 Thread Martynas Mickevičius
Sorry for a late response, You can use pipe pattern to send response to your actor as a message when future completes. On Sat, Jul 11, 2015 at 4:04 AM, Gary Struthers wrote: > I have a simple scaladsl server and it works w

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

2015-08-05 Thread Manuel Bernhardt
Hi, I have a quick question related to manipulating streams. I am splitting a stream by topic, which gives me the following Source: val groupedByFirstTopic: Source[(String, Source[JsObject, Unit]), Unit] = ... I then proceed to simplifying this Source by mapping over it, grouping some element

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

2015-08-05 Thread André
This should get you started. The "High-level Server-Side API " section covers the RESTy stuff. Cheers André On Wednesday,

[akka-user] REST service with Akka and Java

2015-08-05 Thread akkanex
How can I create a REST service with Akka and Java? I use Akka version 2.3.19 I found a huge amount of articles about this topic, some say to use Play-mini, Play, Spray, Camel or Akka-HTTP to build REST services but some of them are outdated, some are working only with Scala, ... I'm pretty co

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

2015-08-05 Thread Morten Kjetland
Hi, We have solved these issues like this: We have a ClusterListener on each node that "pings" the database - As long as it is "online" and a happy member of the cluster it updates a timestamp in the database. To detect split-brain scenarios, we do this: The ClusterListener on each node keeps tr

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

2015-08-05 Thread Patrik Nordwall
Hi Tom, On Fri, Jul 24, 2015 at 4:24 AM, Tom Pantelis wrote: > During a network partition, the partitioned node is removed from the > cluster after auto-down occurs and quarantined such that it must restarted > in order to rejoin the cluster once the partition heals. A manual restart > due to a

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

2015-08-05 Thread Patrik Nordwall
On Sun, Aug 2, 2015 at 1:42 PM, paweł kamiński wrote: > hi, > I have simple actor producer based on > http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/java/stream-integrations.html#ActorPublisher > > public class MessageProducer extends AbstractActorPublisher > { > private final

Re: [akka-user] How to create 3 or more distributed systems in akka

2015-08-05 Thread Patrik Nordwall
I looks like you have a typo in the names of the actor systems, see Kms vs kms in the error message: dropping message [class akka.actor.ActorSelectionMessage] for non-local recipient [Actor[akka.tcp://KmsActorSystem@127.0.0.1:2553/]] arriving at [akka.tcp://KmsActorSystem@127.0.0.1:2553] inbound a

Re: [akka-user] Testing Terminated

2015-08-05 Thread Patrik Nordwall
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 messages. That > would probably be a nice addition. > > I guess you have already explored and rejected the option to actuall