Re: [akka-user] Exception when persisting the ShardCoordinator

2014-12-23 Thread Viktor Klang
Just an off the cuff guess: akka-persistence-jdbc does not provide a ConnectionPoolSettings when creating the connection pool, which means that the defaults will be provided, which does not contain a validation query, which means that the only way to test the validity of the connections to Oracle

Re: [akka-user] Cluster unreachable and a lot of cluster connections

2015-01-22 Thread Viktor Klang
Endre, could it be due to pending-to-send system message overflow? On Thu, Jan 22, 2015 at 11:45 AM, Johannes Berg jberg...@gmail.com wrote: Okay, I increased the load further and now I see the same problem again. It seems to just have gotten a bit better in that it doesn't happen as fast,

Re: [akka-user] received Supervise from unregistered child ... this will not end well

2015-01-22 Thread Viktor Klang
Hi Marco, you'll need to update all Akka dependencies to the 2.3.9 version and make sure that your dependencies that depend on akka transitively are built for Akka 2.3.x On Thu, Jan 22, 2015 at 11:57 AM, Marco Luca Sbodio marco.sbo...@gmail.com wrote: Hi Viktor, after upgrading to akka 2.3.9

Re: [akka-user] Does akka support fiber/coroutine? (do not modify source code)

2015-02-06 Thread Viktor Klang
Hi Chansey, What would you look to gain by switching to coroutines? On Fri, Feb 6, 2015 at 7:44 PM, chanse...@gmail.com wrote: Hello, Does akka support fiber/coroutine? I found that all akka's dispatchers rely on JVM threads now. Is there any way to config dispatchers which could run

Re: [akka-user] Does akka support fiber/coroutine? (do not modify source code)

2015-02-06 Thread Viktor Klang
On Fri, Feb 6, 2015 at 8:24 PM, chanse...@gmail.com wrote: Hi Because my application is running on one thread now. (It maybe extend to multi-thread in the future) To be frank, I get benefit from akka by using actor model programming paradigm instead of its concurrency. You can use an

Re: [akka-user] akka.io downloads - no java?

2015-02-08 Thread Viktor Klang
Hi Jeffrey, Akka is built in Scala but offers Java APIs, so the Scala downloads should be just fine. However, if you are getting started I'd recommend the Activator download as you can get started with the Akka Java tutorials. On Sun, Feb 8, 2015 at 9:32 PM, Jeffrey Kelly derthn...@gmail.com

Re: [akka-user] Re: [akka-http 1.0-M2] Trying to add backpressure

2015-02-03 Thread Viktor Klang
The best kids of bugs are the non-bugs :) On Tue, Feb 3, 2015 at 9:06 PM, Luis Ángel Vicente Sánchez langel.gro...@gmail.com wrote: As usual... after asking a question, you find the answer yourself. The tool I'm using, was keeping the same connection alive; therefore all requests from that

Re: [akka-user] Re: [akka-http 1.0-M2] Trying to add backpressure

2015-02-03 Thread Viktor Klang
The best typo as well. s/kids/kinds On Tue, Feb 3, 2015 at 9:16 PM, Viktor Klang viktor.kl...@gmail.com wrote: The best kids of bugs are the non-bugs :) On Tue, Feb 3, 2015 at 9:06 PM, Luis Ángel Vicente Sánchez langel.gro...@gmail.com wrote: As usual... after asking a question, you find

Re: [akka-user] WartRemover error on Akka receive methods

2015-01-15 Thread Viktor Klang
One idea: def receive = { case = ... } : Receive (On my phone so may not work) -- Cheers, √ On 15 Jan 2015 23:06, javierg javierg1...@gmail.com wrote: Hi Konrad, Adding the type signature doesn't seem to have any effect *Error:(31, 26) Inferred type containing Any* * def receive: Receive

Re: [akka-user] received Supervise from unregistered child ... this will not end well

2015-01-20 Thread Viktor Klang
Have you closed over context.actorOf and execute it within a Future or similar? On Tue, Jan 20, 2015 at 6:47 PM, Marco Luca Sbodio marco.sbo...@gmail.com wrote: Hello everyone, while testing my system I'm randomly getting error messages similar to the one in the subject of this topic. Here's

Re: [akka-user] received Supervise from unregistered child ... this will not end well

2015-01-21 Thread Viktor Klang
Hi Marco, Please upgrade to 2.3.9 if you haven't already, there was a couple of remoting-related issues fixed there. On Wed, Jan 21, 2015 at 6:45 PM, Marco Luca Sbodio marco.sbo...@gmail.com wrote: I haven't. I've managed to figure out that sometimes the following code [[

Re: [akka-user] Cluster unreachable and a lot of cluster connections

2015-01-21 Thread Viktor Klang
Hi Johannes, see the news item: http://akka.io/news/2015/01/19/akka-2.3.9-released.html On Wed, Jan 21, 2015 at 4:47 PM, Johannes Berg jberg...@gmail.com wrote: Upgrading to 2.3.9 does indeed seem to solve my problem. At least I haven't experienced them yet. Now I'm curious what the fixes

Re: [akka-user] Re: Dispatcher assignment issue for Http Server

2015-01-20 Thread Viktor Klang
Could you put together a minimized reproducer? On Tue, Jan 20, 2015 at 5:21 PM, Randy Fox randy@connexity.com wrote: Nope. Did I find a bug or am i doing something wrong? On Saturday, January 17, 2015 at 1:21:12 PM UTC-8, √ wrote: Alright. Did you manage to sort it out? -- Cheers,

Re: [akka-user] Re: Dispatcher assignment issue for Http Server

2015-01-17 Thread Viktor Klang
Alright. Did you manage to sort it out? -- Cheers, √ On 16 Jan 2015 16:56, Randy Fox randy@connexity.com wrote: I expected the thread pool to be pegged at 100 threads, but watching in visual vm showed 24 threads (default). Poking around the object structure in the debugger, I found

Re: [akka-user] Dispatcher assignment issue for Http Server

2015-01-16 Thread Viktor Klang
Hi Randy, What makes you say it doesn't respect your core pool size? -- Cheers, √ On 16 Jan 2015 02:34, Randy Fox randy@connexity.com wrote: I am trying to assign a dispatcher to be used for my http server (using the new Akka HTTP Server) and can’t get it to honor my pool size settings.

Re: [akka-user] Handling of Fatal errors

2015-02-11 Thread Viktor Klang
Hi Andrey, if NCDFEs are fine in your app you can always wrap and rethrow to signal that you think it's fine. An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch. Most such errors are abnormal conditions. The ThreadDeath

Re: [akka-user] [Akka-2.3.7][Scala] - akka.remote.EndpointWriter

2015-01-27 Thread Viktor Klang
Hi Yarden, please upgrade to the latest bugfix release for the given major version (2.3.9 for 2.3 for instance). http://akka.io/news/2015/01/19/akka-2.3.9-released.html On Tue, Jan 27, 2015 at 8:50 AM, Yarden Bar ayash.jor...@gmail.com wrote: Hi All, I recently upgraded my application Akka

Re: [akka-user] Simple, local, garbage collected actors

2015-01-27 Thread Viktor Klang
Hi Arek, We used to do it like that about 5 years ago: https://github.com/akka/akka/blob/v0.8.1/akka-core/src/main/scala/actor/Actor.scala#L105 :) On Tue, Jan 27, 2015 at 10:07 AM, Arkadiusz Burdach arek.burd...@gmail.com wrote: Hi all. What do you think about an idea of module providing

Re: [akka-user] Basic Akka Configuration and parallelism

2015-01-28 Thread Viktor Klang
Hi all, if you want a router, then you need to create a router: 1. ActorRef actorRef = 2. actorSystem.actorOf(FromConfig.getInstance().props(Props.create( MyActor.class)), 3. myActor); On Wed, Jan 28, 2015 at 3:24 PM, Björn Antonsson bjorn.antons...@typesafe.com wrote: Hi Cos,

Re: [akka-user] Basic Akka Configuration and parallelism

2015-01-28 Thread Viktor Klang
Yes, we chose it to be non transparent to use routers or not since it fundamentally changes semantics. -- Cheers, √ On 28 Jan 2015 16:09, Cosmin Marginean cosmin...@gmail.com wrote: Right, I got it now. So that needs to be explicit about using a router in the code using the actor. So this is

Re: [akka-user] [akka-stream] Prebuilt Source with simple synchronous API

2015-01-25 Thread Viktor Klang
Hi Alexey, On Sat, Jan 24, 2015 at 11:20 AM, Alexey Romanchuk alexey.romanc...@gmail.com wrote: Hey hakkers, I wonder why there is not such prebuilt Source that provides API to externally emit message by simple method call. I am talking about something like this: //building and starting

Re: [akka-user] Re: How to Properly Manage Akka's Memory Usage with 40 Million Lines Task?

2015-01-10 Thread Viktor Klang
Hi Allen, I'd suspect the reason that it works well with Akka Streams is that they have back-pressure while your actor solution does not (you'll send 40 million messages as fast as you can, but the actor processing them might not be able to keep up) On Fri, Jan 9, 2015 at 10:53 PM, Allen Nie

Re: [akka-user] Sharing message queue between two akka actors?

2015-01-10 Thread Viktor Klang
Hi Krishna! On Sat, Jan 10, 2015 at 5:16 PM, Krishna Kadam shrikrishna.kad...@gmail.com wrote: HI all akka experts, I have following questions for you 1. Is it possible to share message queue between two akka actors? Yes and no, there's a BalancingRouter, but it's only for that one. 2.

Re: [akka-user] Re: UnboundedPriorityMailbox breaks message ordering?

2015-01-09 Thread Viktor Klang
Hi David, yes, I can definitely understand that it can be surprising, but I wouldn't call it a bug -per se-, since it is not a promise that was violated. If you happen to have, or come by, a performant version of a PriorityQueue with the semantics you described, please don't hesitate to share

Re: [akka-user] Re: UnboundedPriorityMailbox breaks message ordering?

2015-01-09 Thread Viktor Klang
On Fri, Jan 9, 2015 at 9:40 PM, David Hotham david.hot...@googlemail.com wrote: Of course it's normal and expected that a PriorityQueue returns equal priority elements in arbitrary order. That's just how heaps work. However that doesn't imply that a mailbox has to do the same thing!

Re: [akka-user] Re: How to Properly Manage Akka's Memory Usage with 40 Million Lines Task?

2015-01-09 Thread Viktor Klang
Hi Allen, What's the bottleneck? Have you tried enabling the experimental optimizations? On Fri, Jan 9, 2015 at 9:52 PM, Allen Nie aiming...@gmail.com wrote: Thank you Soumya, I think Akka-streams is the way to go. However, I would also appreciate some performance boost as well -

Re: [akka-user] calling code that uses jsr166y

2015-01-07 Thread Viktor Klang
Hi Tim, is it using ForkJoinTask/RecursiveTask directly? On Wed, Jan 7, 2015 at 12:23 PM, Tim Pigden tim.pig...@optrak.com wrote: Hi I'm going to be calling some Java multi-threaded code that is currently using JSR166Y (due to backward compatibility requirements with some legacy java 6

Re: [akka-user] Akka Persistence on the Query Side: The Conclusion

2015-01-09 Thread Viktor Klang
On Fri, Jan 9, 2015 at 11:56 AM, Greg Young gregoryyou...@gmail.com wrote: Usually it comes down to the realization that the computer is not the book of record. One of my favourites was being asked to build a fully consistent inventory system. I generally like to approach things with

Re: [akka-user] Re: UnboundedPriorityMailbox breaks message ordering?

2015-01-14 Thread Viktor Klang
On Wed, Jan 14, 2015 at 2:44 PM, Endre Varga endre.va...@typesafe.com wrote: On Fri, Jan 9, 2015 at 10:02 PM, Viktor Klang viktor.kl...@gmail.com wrote: On Fri, Jan 9, 2015 at 9:40 PM, David Hotham david.hot...@googlemail.com wrote: Of course it's normal and expected

Re: [akka-user] Handling of Fatal errors

2015-02-11 Thread Viktor Klang
Hi Andrey, Thanks for your email, I've attempted to elucidate the current semantics but there may definitely be room for improvements. On 10 Feb 2015 17:23, Andrey andrewkor...@hotmail.com wrote: Hello, I have Akka configured not to exit JVM on fatal errors by setting the

Re: [akka-user] calling code that uses jsr166y

2015-01-07 Thread Viktor Klang
Hmmm, I've reread your question a couple of times and I am not sure what you are asking, is there something more specific your wonder? (I don't know what goals you have) On Wed, Jan 7, 2015 at 12:40 PM, Tim Pigden tim.pig...@optrak.com wrote: hi - yes On 7 January 2015 at 11:32, Viktor Klang

Re: [akka-user] calling code that uses jsr166y

2015-01-07 Thread Viktor Klang
Hi Tim, Akka fork-join-executor-based dispatchers uses Scala's embedded jsr166 version of FJ. I don't think it lets you work with FJT though. On Wed, Jan 7, 2015 at 1:16 PM, Tim Pigden tim.pig...@optrak.com wrote: Hi Viktor, Ok sorry - I'm not an expert in these matters - apologies for the

Re: [akka-user] Surviving VirtualMachineError

2015-03-25 Thread Viktor Klang
Hi Alexandre, unfortunately it does not work like that. Recovering from SOE and OOME is not possible in general, and as such it is better to fail fast and fix the bug instead of limping along in a possibly corrupted state. On Wed, Mar 25, 2015 at 3:13 PM, Alexandre Russel alexan...@russel.fr

Re: [akka-user] Akka Stream 1.0M5 : buffersize = 0

2015-03-30 Thread Viktor Klang
Hi Peter, Akka streams is about async stream processing and without a buffer you cannot be async. -- Cheers, √ On 30 Mar 2015 09:22, Peter Schmitz petrischm...@gmail.com wrote: Actually ActorFlowMaterializerSettings is complaining about initialInputBufferSize = 0. What are the reasons you

Re: [akka-user] Akka Stream 1.0M5 : buffersize = 0

2015-03-30 Thread Viktor Klang
On Mon, Mar 30, 2015 at 10:36 AM, Peter Schmitz petrischm...@gmail.com wrote: I know that, but a section of my Flowgraph (SubFlowGraph) should act like a single stream stage, should act like a single stream stage—from what/whose perspective? that means having only one (possibly large)

Re: [akka-user] Akka Stream 1.0M5 : buffersize = 0

2015-03-30 Thread Viktor Klang
Assuming that the flow is local you can always skip entries that are old (I'd advise against using wallclock; and nanoTime is local only) on a per stage basis. On Mon, Mar 30, 2015 at 2:57 PM, Endre Varga endre.va...@typesafe.com wrote: Hi Peter, Why don't you just create a custom stage then

Re: [akka-user] Re: Memory leak somehow related to ask pattern

2015-03-31 Thread Viktor Klang
Wow, what an amazing catch! On Tue, Mar 31, 2015 at 1:01 AM, Konrad Malawski konrad.malaw...@typesafe.com wrote: Hi guys, quick update on the topic. It has indeed uncovered a bug in the PromiseActorRef. It does handle sending Termination properly, but did so with a mistaken actor in the

Re: [akka-user] Re: how to tune akka remoting performance

2015-03-31 Thread Viktor Klang
Sounds like you're using too many FJ threads. On Mon, Mar 30, 2015 at 6:36 PM, Ivan Balashov ibalas...@gmail.com wrote: While running the test I see that interrupts and context switches are rather high (for a 4 cpu core box) r b swpd free buff cache si sobibo in cs

Re: [akka-user] Re: how to tune akka remoting performance

2015-04-01 Thread Viktor Klang
Could you share your entire config? On Tue, Mar 31, 2015 at 5:31 PM, Ivan Balashov ibalas...@gmail.com wrote: On Tuesday, March 31, 2015 at 11:23:25 AM UTC+3, √ wrote: Sounds like you're using too many FJ threads. I wish it was that simple. For both remoting and actor pool the same

Re: [akka-user] Re: how to tune akka remoting performance

2015-04-01 Thread Viktor Klang
Looks like you're using Java Serialization, a good first start would be to switch serializers for your messages. On Wed, Apr 1, 2015 at 3:49 PM, Ivan Balashov ibalas...@gmail.com wrote: Viktor, Here is the latest configuration that allowed to me reach 30msg/sec between 2 x 4cpu hosts in GCE

Re: [akka-user] Many concurrent network connections

2015-02-26 Thread Viktor Klang
Hi Haddock, First, let me say that your name is awesome. Secondly, have a look here: https://typesafe.com/blog/qa-with-caoyuan-deng-akka-at-wandoujia -- Cheers, √ On 25 Feb 2015 20:35, Haddock ffm2...@web.de wrote: Hello, I have a questions concerning holding many network connections and

Re: [akka-user] Delaying futures?

2015-01-29 Thread Viktor Klang
Hi John, try this signature instead: http://doc.akka.io/japi/akka/2.3.9/akka/pattern/Patterns.html#after(scala.concurrent.duration.FiniteDuration, akka.actor.Scheduler, scala.concurrent.ExecutionContext, java.util.concurrent.Callable) On Thu, Jan 29, 2015 at 10:34 PM, John Ulric uja...@gmail.com

Re: [akka-user] Akka io udp broadcast to subnet

2015-04-02 Thread Viktor Klang
Hi, 255.255.255.255 has been deprecated/discouraged for many many years. Related: http://stackoverflow.com/questions/7481332/udp-broadcast-on-java-doesnt-work On Thu, Apr 2, 2015 at 10:27 PM, saumitra.srivast...@gmail.com wrote: I am trying to use akka-io to broadcast a UDP packet to all the

Re: [akka-user] Re: Akka Stream is not running (without compiler error)

2015-04-02 Thread Viktor Klang
I suspect your problem is that your test exits before the stream has a chance to run. On Thu, Apr 2, 2015 at 11:56 PM, Viktor Klang viktor.kl...@gmail.com wrote: Works on my machine: scala import scala.collection.mutable.ArrayBuffer import scala.collection.mutable.ArrayBuffer scala import

Re: [akka-user] Re: Akka Stream is not running (without compiler error)

2015-04-02 Thread Viktor Klang
Works on my machine: scala import scala.collection.mutable.ArrayBuffer import scala.collection.mutable.ArrayBuffer scala import akka.stream._ import akka.stream._ scala import akka.stream.scaladsl._ import akka.stream.scaladsl._ scala implicit val sys = ActorSystem(repl) sys:

Re: [akka-user] Re: Akka Stream is not running (without compiler error)

2015-04-03 Thread Viktor Klang
exits before the stream has a chance to run. On Thu, Apr 2, 2015 at 11:56 PM, Viktor Klang viktor...@gmail.com wrote: Works on my machine: scala import scala.collection.mutable.ArrayBuffer import scala.collection.mutable.ArrayBuffer scala import akka.stream._ import akka.stream

Re: [akka-user] 2.4-SNAPSHOT Did bind-hostname/bind-port functionality change?

2015-04-14 Thread Viktor Klang
Hi Greg, have you verified that the configuration is applied to the application? On Tue, Apr 14, 2015 at 10:13 AM, tigerfoot gzol...@gmail.com wrote: Hello, I had a working demo of Akka remoting working in a Docker container. I ran my server in Docker and was able to communicate with it

Re: [akka-user] ReadPrefered in FlexiMerge (akka-streams)

2015-04-13 Thread Viktor Klang
Is if(input eq p.priority) also true? On Mon, Apr 13, 2015 at 7:11 PM, Johannes Plapp johannes.pl...@gmail.com wrote: Hi, While implementing a FlexiMerge we stumbled on the following issue: override def initialState = State[T](ReadPreferred(p.priority, p.second)) {

Re: [akka-user] Re: Is parent notified when child stops?

2015-04-21 Thread Viktor Klang
What does your observations show? :) On Tue, Apr 21, 2015 at 4:09 PM, Andrew Easter andrew.eas...@gmail.com wrote: Thanks for your reply. In my case, I'm not really interested in knowing exactly when the child stops. I simply want to know whether context.child would no longer return

Re: [akka-user] Can't Seem To Get Schedulers To Work

2015-04-26 Thread Viktor Klang
This works for me, must be your use of thunk-to-function parameters: scala object Concurrency { | import java.util.concurrent.Executors | import akka.dispatch.ExecutionContexts | import akka.actor._ | import scala.concurrent._ | import

Re: [akka-user] Akka with org.apache.log4j.MDC

2015-04-27 Thread Viktor Klang
Hi Anindita, It would be great for us to know what is lacking in the MDC sections of the Akka Logging documentation, please don't hesitate to contribute. Thanks! On Mon, Apr 27, 2015 at 8:09 AM, Anindita Ghatak anindita.g...@gmail.com wrote: Hi, How can I use Akka with org.apache.log4j.MDC ?

Re: [akka-user] Re: The best ways to resolve future inside an actor?

2015-05-14 Thread Viktor Klang
Stash and pipeTo is probably the best you can do today. The reason for things to be as they are is because it amounts to what's called a selective receive and it is typically a cause of poor performance during runtime (since it stalls the actor). If you have a more typical pipeline processing

Re: [akka-user] Re: The best ways to resolve future inside an actor?

2015-05-14 Thread Viktor Klang
What if it never completes? On Thu, May 14, 2015 at 7:03 PM, Andrew Gaydenko andrew.gayde...@gmail.com wrote: Sequence order isn't a problem. RondRobinPool(1) here isn't more rather just a limiting CPU consumption to a single core. As at the first message in the topic, the problem is to

Re: [akka-user] mapConcat

2015-05-12 Thread Viktor Klang
scala.collection.immutable.Iterable seems like a good choice over Seq On Tue, May 12, 2015 at 1:38 PM, Endre Varga endre.va...@typesafe.com wrote: Hi Peter, On Tue, May 12, 2015 at 1:30 PM, Peter Schmitz petrischm...@gmail.com wrote: First of all: Impressive work, guys! Though I have

Re: [akka-user] Re: Akka Streams Merge variance

2015-05-19 Thread Viktor Klang
Thinking about it perhaps it makes sense to have a MergeWith, where Merge is using the identity function? -- Cheers, √ On 19 May 2015 02:10, Andrey Kuznetsov f...@loathing.in wrote: I asked myself the same question when I faced to the problem of merging elements from Source[A] and Source[B]

Re: [akka-user] akka-http is there an example of showing how to integrate with servlet container?

2015-04-14 Thread Viktor Klang
One integration you can do easily is to have a ServletContextListener that creates the Akka Http server endpoint when loaded and stops it on unload. On Tue, Apr 14, 2015 at 3:53 PM, Roland Kuhn goo...@rkuhn.info wrote: Hi Tomer, the servlet container way of running things completely negates

Re: [akka-user] CPU spikes using fork-join-executor

2015-04-17 Thread Viktor Klang
I'd bet on this explanation too. Having looked at the code I think it should be possible to switch implementations to something without spinlocking. On Fri, Apr 17, 2015 at 8:20 AM, Roland Kuhn goo...@rkuhn.info wrote: Hi Akara, thanks for all the detailed information, I am 95% certain that

Re: [akka-user] How to restart a node?

2015-04-12 Thread Viktor Klang
The reason why it is not possible to rejoin is because other nodes have already acted upon the death of that node. Allowing the Undead in a cluster makes it really hard to reason about. On Sat, Apr 11, 2015 at 1:36 AM, Andrey Ilinykh ailin...@gmail.com wrote: Thank you! It works. But still

Re: [akka-user] Refer to the same cluster-wide router from several actors in the cluster on the same node

2015-04-07 Thread Viktor Klang
actorOf creates a new actor, and in this case you're doing it at the system level from within another actor: val httpWorkers = context.system.actorOf(FromConfig.props(Props.empty), cluster_router_httpworker) That's the problem. On Sun, Apr 5, 2015 at 6:54 PM, Eugene Dzhurinsky

Re: [akka-user] Re: Best practices for selecting or creating actor

2015-04-07 Thread Viktor Klang
val ref = context.child(name).getOrElse(context.actorOf(props, name)) On Sun, Apr 5, 2015 at 11:53 PM, Adam adamho...@gmail.com wrote: First of all, you shouldn't ever block like this, as you do with Await. As for your question - this sounds like something the parent actor should be

Re: [akka-user] Java : How should Futures be handled when Unit testing?

2015-04-09 Thread Viktor Klang
Does this help? http://christopher-batey.blogspot.se/2014/02/testing-scala-futures-with-scalatest-20.html On Thu, Apr 9, 2015 at 1:27 PM, Adam Daines dainesa...@gmail.com wrote: Hi all, I've got a question in relation to the unit testing of a piece of non actor code that produces a

Re: [akka-user] 2-way communication between Akka Streams and (remote) actors

2015-04-09 Thread Viktor Klang
You could have a mapAsync and use ask on the remote ActorRef? On Thu, Apr 9, 2015 at 8:49 PM, Robin Green gree...@gmail.com wrote: Closely related to this question https://groups.google.com/forum/#!searchin/akka-user/streams$20actors/akka-user/AxVI8T_laYg/Qsi3BfCzQMwJ, I know that Akka

Re: [akka-user] Java : How should Futures be handled when Unit testing?

2015-04-09 Thread Viktor Klang
, 2015 at 1:59 PM, Akka Team akka.o...@gmail.com wrote: On Thu, Apr 9, 2015 at 1:33 PM, Viktor Klang viktor...@gmail.com wrote: Does this help? http://christopher-batey.blogspot.se/2014/02/testing- scala-futures-with-scalatest-20.html That is for scala though. We usually use

Re: [akka-user] akka-streams - How to define a Source from an arbitrary event stream?

2015-04-09 Thread Viktor Klang
pushRecursively() onComplete { case Failure(ex) = onError(ex) context.stop(self) case s = } that's not safe. On Thu, Apr 9, 2015 at 1:16 PM, Jakub Liska liska.ja...@gmail.com wrote: I do it just via ActorPublisher, the scroll method is basically

Re: [akka-user] Java : How should Futures be handled when Unit testing?

2015-04-09 Thread Viktor Klang
Ouch, nice catch, now we've covered both the question and the alternative (Scala) :) On Thu, Apr 9, 2015 at 1:59 PM, Akka Team akka.offic...@gmail.com wrote: On Thu, Apr 9, 2015 at 1:33 PM, Viktor Klang viktor.kl...@gmail.com wrote: Does this help? http://christopher-batey.blogspot.se

Re: [akka-user] Re: akka-streams: FlexiRoute - route specific elements to specific outlets

2015-04-09 Thread Viktor Klang
What will you do if you get B's but only demand for As? -- Cheers, √ On 9 Apr 2015 19:10, Andrey Kuznetsov f...@loathing.in wrote: If I change State condition to DemandFromAll, stage will wait for all outlets to start demanding but I need elements to be emitted as soon as possible. On

Re: [akka-user] Flow supervision decider

2015-05-20 Thread Viktor Klang
From my PoV: It is vital to distinguish stream fatal errors from transient element processing error, the first terminates the stream abruptly, the second should be modeled within the processing domain, by transmitting things like Try[T] as elements for instance. On Wed, May 20, 2015 at 10:06 PM,

Re: [akka-user] Failure in inner stream not reflecting in the outer stream

2015-06-05 Thread Viktor Klang
My point is that if there are multiple elements in the substream then there could be multiple failures, multiple successes or a combination thereof. How would you represent that in a single result? On Fri, Jun 5, 2015 at 12:27 PM, Prog programad...@gmail.com wrote: I would like to have the

Re: [akka-user] Failure in inner stream not reflecting in the outer stream

2015-06-05 Thread Viktor Klang
If you want to break the outer stream on the first failure of the inner stream then I recommend using mapAsync and have the inner stream return a future in the inner stream. On Fri, Jun 5, 2015 at 2:39 PM, Prog programad...@gmail.com wrote: My point is imagine you have a large file (1GB)

Re: [akka-user] Re: [akka-hhtp][akka-streams] Process http request with flow

2015-06-09 Thread Viktor Klang
Hi, I don't understand what you mean. What does Does not solve my problem mean in this case? What -is- the result of the flow? On Tue, Jun 9, 2015 at 9:30 AM, Владимир Морозов greenhos...@gmail.com wrote: Hi, Oh... but if I change Sink.ignore to Sink.head[String] (for example) it not solve

Re: [akka-user] Re: [akka-hhtp][akka-streams] Process http request with flow

2015-06-09 Thread Viktor Klang
The results will travel to the Sink, so you'll have to not `ignore` the result. On Tue, Jun 9, 2015 at 9:15 AM, Владимир Морозов greenhos...@gmail.com wrote: Hi, I play more with actorPublisher, yes it is great thing, but - when I have stream like this: val jobManagerSource =

Re: [akka-user] Failure in inner stream not reflecting in the outer stream

2015-06-05 Thread Viktor Klang
What behavior would you want when there are multiple elements in the first source? What would the value in the outer onComplete be? On Fri, Jun 5, 2015 at 12:17 PM, Prog programad...@gmail.com wrote: Hi, I have the code bellow and I have tried many different variations of it with mapAsync in

Re: [akka-user] How does Akka implement sender and parent (internally)?

2015-06-04 Thread Viktor Klang
Hi Andriy, this is how sender is captured (implicits): https://github.com/akka/akka/blob/master/akka-actor/src/main/scala/akka/actor/Actor.scala#L447 this is how context is injected: https://github.com/akka/akka/blob/master/akka-actor/src/main/scala/akka/actor/Actor.scala#L428 On Thu, Jun 4,

Re: [akka-user] Failure in inner stream not reflecting in the outer stream

2015-06-05 Thread Viktor Klang
The parameter to mapAsync is how many currently in progress are allowed. I'd probably write it as: val finish = source.via(connectionFlow).mapAsync(1){ case response if response.status == StatusCodes.OK = response.entity.dataBytes.map(println).runForeach(identity) case _ =

Re: [akka-user] Re: Akka and DDD - Business Space to Solution Space for Bounded Context

2015-06-06 Thread Viktor Klang
Right, in a way Bounded Contexts is a mitigation against LCD. On Sat, Jun 6, 2015 at 7:47 PM, Greg Young gregoryyou...@gmail.com wrote: Bounded Contexts are more about understanding that the word Order means two very different things when I talk to OrderManagement vs Shipping. If I try to use

Re: [akka-user] logback turboFilter and akka LoggingReceive incompatible?

2015-06-22 Thread Viktor Klang
goal in our infrastructure. Regards, Roland 22 jun 2015 kl. 11:02 skrev Viktor Klang viktor.kl...@gmail.com: Doing the filtering pre-substitution seems like a bug. -- Cheers, √ On 22 Jun 2015 01:54, Sam Halliday sam.halli...@gmail.com wrote: Patrik, Thanks for investigating! You saved

Re: [akka-user] logback turboFilter and akka LoggingReceive incompatible?

2015-06-22 Thread Viktor Klang
Doing the filtering pre-substitution seems like a bug. -- Cheers, √ On 22 Jun 2015 01:54, Sam Halliday sam.halli...@gmail.com wrote: Patrik, Thanks for investigating! You saved me a few hours off my Monday as I was going to go through this in detail and put together a minimal test case :-)

Re: [akka-user] Re: Akka and Mesos: Will it blend?

2015-06-18 Thread Viktor Klang
Akka 2.4 solves the docker problem with supporting an external address and one internal. -- Cheers, √ On 18 Jun 2015 19:28, Jason Martens m...@jasonmartens.com wrote: I have heard from another co-worker that Akka remoting is very difficult on Mesos using Docker, because of the random ports

Re: [akka-user] Akka Streams: How do I know when a flow is finished?

2015-06-11 Thread Viktor Klang
Hi Eric, You'll need to instruct the connect of the Sink to keep its materialized value rather than the Flows: val src = Source(immutable.Seq(1,2,3)) val flo = Flow[Int].map(_ * 2) val sin = Sink.foreach(println) val runFlow = (src via flo).toMat(sin)(Keep.right) val fut = runFlow.run()

Re: [akka-user] Akka Streams: How do I know when a flow is finished?

2015-06-11 Thread Viktor Klang
I'd love to see some improvment in the handling of that. On Thu, Jun 11, 2015 at 6:40 PM, Viktor Klang viktor.kl...@gmail.com wrote: Hi Eric, You'll need to instruct the connect of the Sink to keep its materialized value rather than the Flows: val src = Source(immutable.Seq(1,2,3)) val

Re: [akka-user] Akka Streams: How do I know when a flow is finished?

2015-06-16 Thread Viktor Klang
On 16 Jun 2015 11:53, Endre Varga endre.va...@typesafe.com wrote: On Tue, Jun 16, 2015 at 11:50 AM, Viktor Klang viktor.kl...@gmail.com wrote: On 16 Jun 2015 11:18, Endre Varga endre.va...@typesafe.com wrote: On Tue, Jun 16, 2015 at 11:15 AM, Viktor Klang viktor.kl...@gmail.com wrote

Re: [akka-user] When deployed my system hangs when creating ActorSystem

2015-06-12 Thread Viktor Klang
What does JConsole say the threads are stuck on? On Fri, Jun 12, 2015 at 4:04 AM, Dennis Jönsson zeleb...@gmail.com wrote: Hello, I have been developing a cluster solution in akka for awhile. It is working fine together with the old code in my development environment. But now when its time to

Re: [akka-user] Akka Streams: How do I know when a flow is finished?

2015-06-12 Thread Viktor Klang
On Fri, Jun 12, 2015 at 3:40 PM, Eric Kolotyluk eric.koloty...@gmail.com wrote: Thanks; so my new code is logger.info(Create a Source based on a simple Iterable[T]) val source = Source(1 to 10) logger.info(create redundant flow1 because of Akka Streams API design limitations) val

Re: [akka-user] When deployed my system hangs when creating ActorSystem

2015-06-12 Thread Viktor Klang
I suspect you'll have to use the same java command as Eclipse generates when it starts. (and see what is different) On Fri, Jun 12, 2015 at 9:07 AM, Dennis Jönsson zeleb...@gmail.com wrote: Yeah I have tried it on several different computers with different OS, its the same thing. And this

Re: [akka-user] Error from non-actor execution context disappears

2015-06-15 Thread Viktor Klang
Hi Jonas, Alla is not involved in that execution path. Use Akka Dispatcher for the EC to the future iso the global pool. -- Cheers, √ On 15 Jun 2015 16:55, Jonas K thejo...@gmail.com wrote: I have an actor that calls code that returns a Future using an ExecutionContext different from the

Re: [akka-user] Akka Streams: How do I know when a flow is finished?

2015-06-16 Thread Viktor Klang
On 16 Jun 2015 10:26, Endre Varga endre.va...@typesafe.com wrote: On Tue, Jun 16, 2015 at 10:14 AM, Viktor Klang viktor.kl...@gmail.com wrote: Agreed, but 'toMat' is a terrible name. 'combineTo' would be better to be honest. Well, but then that can be confused with combining elements

Re: [akka-user] Akka Streams: How do I know when a flow is finished?

2015-06-16 Thread Viktor Klang
Agreed, but 'toMat' is a terrible name. 'combineTo' would be better to be honest. -- Cheers, √ On 16 Jun 2015 10:00, Endre Varga endre.va...@typesafe.com wrote: On Fri, Jun 12, 2015 at 10:55 PM, Viktor Klang viktor.kl...@gmail.com wrote: On Fri, Jun 12, 2015 at 3:40 PM, Eric Kolotyluk

Re: [akka-user] Akka Streams: How do I know when a flow is finished?

2015-06-16 Thread Viktor Klang
On 16 Jun 2015 11:18, Endre Varga endre.va...@typesafe.com wrote: On Tue, Jun 16, 2015 at 11:15 AM, Viktor Klang viktor.kl...@gmail.com wrote: On 16 Jun 2015 10:26, Endre Varga endre.va...@typesafe.com wrote: On Tue, Jun 16, 2015 at 10:14 AM, Viktor Klang viktor.kl...@gmail.com

Re: [akka-user] Akka http load balancer

2015-05-27 Thread Viktor Klang
On Wed, May 27, 2015 at 2:01 PM, Endre Varga endre.va...@typesafe.com wrote: Hi, Instead of Http.request, you should use the Flow returned by Http.superPool() (see http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/http/client-side/request-level.html). That flattens out

Re: [akka-user] Akka http load balancer

2015-05-27 Thread Viktor Klang
On Wed, May 27, 2015 at 2:33 PM, Viktor Klang viktor.kl...@gmail.com wrote: On Wed, May 27, 2015 at 2:01 PM, Endre Varga endre.va...@typesafe.com wrote: Hi, Instead of Http.request, you should use the Flow returned by Http.superPool() (see http://doc.akka.io/docs/akka-stream-and-http

Re: [akka-user] question on getting mailbox confirmation

2015-05-27 Thread Viktor Klang
Hi Shawn, On Mon, May 25, 2015 at 4:29 PM, Shawn Garner shawndgar...@gmail.com wrote: The arbiter sounds like what we would need. Are there any activator templates or example of someone using an arbiter in Akka you can point me to? This way I could demo it to my coworker without having to

Re: [akka-user] Java: Yet another get or create actor question

2015-06-02 Thread Viktor Klang
In the mean time there's getChild + Optional.ofNullable On Tue, Jun 2, 2015 at 11:43 AM, Roland Kuhn goo...@rkuhn.info wrote: Thanks for raising this, we should fix it https://github.com/akka/akka/issues/17635 for Akka 2.4 by offering a method that gives you an Optional instead of a Scala

Re: [akka-user] akka stream - download large file in chunks

2015-06-02 Thread Viktor Klang
Hi, This? http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/http/client-side/index.html On Tue, Jun 2, 2015 at 12:01 PM, programad...@gmail.com wrote: Hi, I am trying to download a file from a website using the akka stream, because today I have a problem of heap size.

Re: [akka-user] akka stream - download large file in chunks

2015-06-02 Thread Viktor Klang
Hi, a good start, in my opinion, would be if you could show what you have tried and what is not working. On Tue, Jun 2, 2015 at 1:36 PM, programad...@gmail.com wrote: Thank you for it, but I had already the documentation link, as well as links from stack overflow and other links in github

Re: [akka-user] akka-remote: If the configuration file contains an invalid settings, log message is null.

2015-07-02 Thread Viktor Klang
Hi okyongsu, thanks for the report! It does seem, at a glance, like the proposed fix merely treats the symptom rather than the problem. I wonder if there is a cleaner way to deal with this. On Thu, Jul 2, 2015 at 8:26 AM, okyongsu okyon...@gmail.com wrote: environment: - jdk 1.8.0_40-b26

Re: [akka-user] Akka HTTP Streams vs Pulse Queues

2015-07-06 Thread Viktor Klang
Hi Eric, I'm not sure I can answer your very broad question, would you mind/be able to formulate a couple of more specific ones? On Fri, Jul 3, 2015 at 6:34 PM, Eric Kolotyluk eric.koloty...@gmail.com wrote: I have prototyped an application that basically multiplexes messages, assembles them

Re: [akka-user] Akka Stream Source as ActorPublisher

2015-07-06 Thread Viktor Klang
Hi Maxim, could you please minimize the problematic code into a self-contained, no extraneous pieces, snippet? On Mon, Jul 6, 2015 at 9:55 PM, Maxim Korolyov korolyov.ma...@gmail.com wrote: Hey, i was playing with akka stream and akka http and faced and issue, when source created as

Re: [akka-user] count, process message in Akka

2015-06-29 Thread Viktor Klang
Hi Samy, What's the use-case? On Mon, Jun 29, 2015 at 8:14 PM, Samy sethu.r...@gmail.com wrote: How to Query (or get all) messages with a specific sender in a custom mailbox, I followed Akka custom mailbox but I dont have any luck -- Read the docs: http://akka.io/docs/ Check the FAQ:

Re: [akka-user] [Streams] Is ActorPublisher requested asynchronously or sequentially?

2015-05-25 Thread Viktor Klang
Hi Jakub, Starting to read your email I definitely thought there must be something mysterious at work! From what I can tell, there are a couple of compounding things here: 1) future.onComplete will be executed on another thread than the actor, or concurrently with the actor, this means that you

Re: [akka-user] question on getting mailbox confirmation

2015-05-25 Thread Viktor Klang
Hi Shawn, The use case you're referring to (transitive ordering) I think traditionally is accomplished in the actor model with the use of arbiters: https://en.wikipedia.org/wiki/Indeterminacy_in_concurrent_computation I.e. you need a single source of truth w.r.t. the ordering, and since Actors

  1   2   3   4   5   6   >