[akka-user] Akka Http and Akka-Stream-Testkit with Specs2

2015-08-22 Thread Benjamin Lüdicke
Hi, I try to write my first Akka Stream project which periodically fetch data from a remote server via Akka Http and the superpool. Now, if I run my test with the akka stream testkit I get back a java.lang.AssertionError. See below. But if I run the test with built in sources and sinks all works

[akka-user] Akka Streams fanout Question

2015-08-22 Thread Christian Schmitt
Hello, currently I have an actor which gets a Publisher, this publisher has either one or multiple elements. Based on that I want to run through this data and send the values to multiple Subscribers (fan-out) One should process it and get additional data from a database (which returns a future)

Re: [akka-user] Akka Streams fanout Question

2015-08-22 Thread Konrad Malawski
What you're looking for is a Broadcast operation. Here's docs about how to use it:  http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/scala/stream-graphs.html --  Cheers, Konrad Malawski Akka @ Typesafe On 22 August 2015 at 12:16:58, Christian Schmitt (c.schm...@briefdomain.de) wrote

Re: [akka-user] Akka Streams fanout Question

2015-08-22 Thread Christian Schmitt
Hey I looked at it however I thought that Broadcast also needs a merge afterwards, but I don’t need the merge?! Also I didn’t understand the Stream Graphs, currently. Would be great to have a example without any merge > Am 22.08.2015 um 12:56 schrieb Konrad Malawski : > > What you're looking f

Re: [akka-user] Akka Streams fanout Question

2015-08-22 Thread Christian Schmitt
Thanks somehow I always visited the wrong documentation... Am Samstag, 22. August 2015 12:56:27 UTC+2 schrieb Konrad Malawski: > > What you're looking for is a Broadcast operation. > Here's docs about how to use it: > http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/scala/stream-grap

[akka-user] [akka-http-experimental-1.0] More Fine granular logging of accepted connections needed

2015-08-22 Thread Simon Schäfer
I use akka-http to build a webservice. This works great so far, I just don't like the noise of logging. The webservice not only answers to websockets requests but also serves *.js and *.css files. The problem is that every request creates one of these logging messages: backend [DEBUG] [08/22/20

Re: [akka-user] Akka Streams fanout Question

2015-08-22 Thread Konrad Malawski
What do you mean by "the wrong documentation"? We'd like to improve the docs (maybe add links etc), so it would help if you could explain what was confusing for you here. You don't need a Merge, just don't put one in your graph. You can use this example as basis for your code:  http://doc.akka.io

Re: [akka-user] Akka Streams fanout Question

2015-08-22 Thread Christian Schmitt
Somehow Google points to the M2 release which only has FlowGraph {implicit b =>} which of course doesn’t work. The 1.0 documentation is really good (if you find it..) Especially: http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/scala/stream-composition.html

[akka-user] Re: Callable, Function or other Smart Messages?

2015-08-22 Thread kraythe
I don't know what you mean by that. Callable or function implementation doesn't need to be serializable, only the data packaged with the message needs to be. In my example everything is imminently serializable. I'm simply packaging implementation with message data -- >> Read the d

[akka-user] Re: [akka-http-experimental-1.0] More Fine granular logging of accepted connections needed

2015-08-22 Thread Johannes Rudolph
Yes, the solution is not to log at DEBUG level. :) Johannes On Saturday, August 22, 2015 at 1:32:36 PM UTC+2, Simon Schäfer wrote: > > I use akka-http to build a webservice. This works great so far, I just > don't like the noise of logging. The webservice not only answers to > websockets reques

[akka-user] Re: Callable, Function or other Smart Messages?

2015-08-22 Thread Ryan Tanner
case class SmartMessage(data: String, fn: String => Unit) var mutableState: String = "this can change" remoteActor ! SmartMessage("some data", x => println(x + mutableState)) On Saturday, August 22, 2015 at 8:12:02 AM UTC-6, kraythe wrote: > > I don't know what you mean by that. Callable or

Re: [akka-user] Akka Streams fanout Question

2015-08-22 Thread Konrad Malawski
Somehow Google points to the M2 release which only has FlowGraph {implicit b =>} which of course doesn’t work.  The 1.0 documentation is really good (if you find it..) Ah I see, yes that's something we should work on with our SEO optimisation I think... I also thought of putting up a warning a

[akka-user] Re: Callable, Function or other Smart Messages?

2015-08-22 Thread kraythe
Sure this would be one idea. I guess the question revolves around whether it is good practice in reactive programming. On Saturday, August 22, 2015 at 11:28:01 AM UTC-5, Ryan Tanner wrote: > > case class SmartMessage(data: String, fn: String => Unit) > > > var mutableState: String = "this can ch

Re: [akka-user] Event sourcing backend/plugin with scalable pub/sub

2015-08-22 Thread leonidb
> > I'd write to a primary journal and use the (Akka) query side to populate > the other journal. Yes they may be a bit behind, but depending on needs > that could be optimised (query side could be pushed to). > We've discussed this option - write events to Kafka, then pull the events from Kaf

[akka-user] Re: Callable, Function or other Smart Messages?

2015-08-22 Thread Ryan Tanner
My example was meant to illustrate why sending functions to actors is dangerous. On Saturday, August 22, 2015 at 1:04:14 PM UTC-6, kraythe wrote: > > Sure this would be one idea. I guess the question revolves around whether > it is good practice in reactive programming. > > On Saturday, August

[akka-user] Association with remote system ... has failed problem

2015-08-22 Thread tjackson5527
I encounter a problem where the actor seems to stop its execution because of Association failure issue. Below is the error message [WARN] ... [akka.tcp://MySystem@ip:port/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FMySystem%40ip%3Aport-0] Association with remote system [akk

[akka-user] Re: Callable, Function or other Smart Messages?

2015-08-22 Thread kraythe
Bad example since all strings are immutable. If you included mutable state that would be bad. I am not talking about that. Im talking about a function that does not use mutable state and just uses the information in the message. On Saturday, August 22, 2015 at 4:26:23 PM UTC-5, Ryan Tanner wro

Re: [akka-user] Association with remote system ... has failed problem

2015-08-22 Thread Viktor Klang
As a general rule, it is quicker to try the latest release and see if that fixes the problem. On Sat, Aug 22, 2015 at 9:00 AM, wrote: > I encounter a problem where the actor seems to stop its execution because > of Association failure issue. Below is the error message > > [WARN] ... > [akka.tcp

Re: [akka-user] Re: Callable, Function or other Smart Messages?

2015-08-22 Thread Haoyi Li
@kraythe It sounds like you're precisely describing Agents : actors with a single mutable variable, whom you send functions to to execute on, which will all get executed serially. I don't know why they're not popular in Akka, but they're the

Re: [akka-user] Re: Callable, Function or other Smart Messages?

2015-08-22 Thread kraythe
Actually I am not talking about that. It's a simple concept of putting the implementation of the message processor in the message itself. It's just a different way to organize the code. -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.

Re: [akka-user] Association with remote system ... has failed problem

2015-08-22 Thread tjackson5527
The problem is fixed by increasing the heartbeat interval to 1000s and and heartbeat pause to 6000s according to the suggestion in spark community. https://github.com/apache/spark/pull/2784/files akka.remote.transport-failure-detector { heartbeat-interval = 1000s acceptable-heartbeat

Re: [akka-user] [akka-streams] Http source design question?

2015-08-22 Thread john . vieten
Hi Johannes, yep you understood my question correctly. Am Donnerstag, 20. August 2015 14:46:21 UTC+2 schrieb Johannes Rudolph: > > Hi john, > > AFAIU your question was not about existing code in akka-http but how to > put a queue before a superpool, right? And no, putting a blocking queue > insi