Re: [akka-user] Is ExecutionContext.reportFailure working?

2017-06-20 Thread Viktor Klang
Hi Sean, On Tue, Jun 20, 2017 at 12:51 AM, Sean Shubin wrote: > While I was trying to stub out an execution context to test concurrent > code, I noticed some surprising behavior demonstrated below. I would have > expected the exception thrown by the Future to cause reportFailure to be > invoked

Re: [akka-user] Is ExecutionContext.reportFailure working?

2017-06-20 Thread Viktor Klang
happy hakking! On Tue, Jun 20, 2017 at 10:32 PM, Sean Shubin wrote: > Regarding #1, that is the information I was missing, thank you for > clearing that up. Hopefully that will guide me to how to test asynchronous > code with an synchronous execution context. > > Regarding #2 and #3, I agree, I

Re: [akka-user] remoting comparison: Artery vs Netty

2017-07-03 Thread Viktor Klang
Likely bottlenecked either by network or serialization method (or quite possibly both?). -- Cheers, √ On Jul 3, 2017 1:06 PM, "Patrik Nordwall" wrote: > What is the unit of the values in the table, e.g. 416? I guess it's > milliseconds? > > That doesn't match our tests >

Re: [akka-user] [ANNOUNCE] ChanaMQ - an Akka based AMQP messaging broker

2017-07-24 Thread Viktor Klang
Cool! What kind of scalability&performance profile are you getting? On Fri, Jul 21, 2017 at 9:20 PM, Caoyuan wrote: > Hi, > > We are developing an AMQP messaging broker - ChanaMQ, which is based on > Akka actors and Akka streaming. > > It's currently under Alpha phase, but with lots of AMQP 0-9-

Re: [akka-user] [ANNOUNCE] ChanaMQ - an Akka based AMQP messaging broker

2017-07-24 Thread Viktor Klang
Cool. What does the p90 and p99 look like? -- Cheers, √ On Jul 25, 2017 12:19 AM, "Caoyuan" wrote: > I've got some preliminary benchmarks. As the maximized distributed design > of ChanaMQ. It's bit lagging behind RabbitMQ when applying a few > publishers/consumers, but will be on par with Rabb

Re: [akka-user] [ANNOUNCE] ChanaMQ - an Akka based AMQP messaging broker

2017-07-27 Thread Viktor Klang
Very consistent. What's the current bottleneck? On Thu, Jul 27, 2017 at 7:52 PM, Caoyuan wrote: > Below is the latency in ms when applying 1-publishers - 100-consumers: > > > "max-latency":15.044784, > "min-latency":13.960142, > "avg-latency":14.623772, > "p95-latency":14

Re: [akka-user] [ANNOUNCE] ChanaMQ - an Akka based AMQP messaging broker

2017-07-28 Thread Viktor Klang
Would be interesting to see if the new AffinityPool would make any difference. On Thu, Jul 27, 2017 at 10:44 PM, Caoyuan wrote: > > > On Thursday, July 27, 2017 at 12:47:39 PM UTC-7, √ wrote: >> >> Very consistent. What's the current bottleneck? >> > > Not too much so far. The major decision of

Re: [akka-user] problem with pinned dispatcher

2017-08-01 Thread Viktor Klang
«Note that it’s not guaranteed that the *same* thread is used over time, since the core pool timeout is used for PinnedDispatcher to keep resource usage down in case of idle actors. To use the same thread all the time you need to add thread-pool-executor.allow-core-timeout=off to the configuration

Re: [akka-user] Using zip with mapAsyncUnordered

2017-08-26 Thread Viktor Klang
Hi Ori, The answer is: it is allowed for the materializer, dispatcher, JVM, OS Scheduler to allow for elements produced by the mapAsyncUnordered to be reordered—it doesn't mean that they will sometimes, will always, will never, etc. If you don't want possible reordering, use mapAsync. Cheers, √

Re: [akka-user] Ask not working if Future is used in receive partial method

2017-10-14 Thread Viktor Klang
Hi Danny, there are two problems: 1) https://doc.akka.io/docs/akka/current/scala/additional/faq.html#sender-getsender-disappears-when-i-use-future-in-my-actor-why- 2) https://doc.akka.io/docs/akka/current/scala/general/jmm.html#jmm-shared-state Happy hakking! On Fri, Oct 13, 2017 at 6:59 PM,

Re: [akka-user] Spray->Akka-Http Migration - seeing high 99th percentile latencies post-migration

2017-10-23 Thread Viktor Klang
What definition of latency are you using? (i.e. how is it derived) On Mon, Oct 23, 2017 at 10:11 PM, Gary Malouf wrote: > Hi Konrad, > > Our real issue is that we can not reproduce the results. The web server > we are having latency issues with is under peak load of 10-15 > requests/second - ob

Re: [akka-user] Spray->Akka-Http Migration - seeing high 99th percentile latencies post-migration

2017-10-23 Thread Viktor Klang
w off the percentiles (which is what I think is happening). > > > > On Mon, Oct 23, 2017 at 4:20 PM, Viktor Klang > wrote: > >> What definition of latency are you using? (i.e. how is it derived) >> >> On Mon, Oct 23, 2017 at 10:11 PM, Gary Malouf >> wrote:

Re: [akka-user] Spray->Akka-Http Migration - seeing high 99th percentile latencies post-migration

2017-10-23 Thread Viktor Klang
th("myawesomepath") { > traceName("CoolStory") { > ///do some stuff > complete("This is great") > } } > > For what it's worth, this route is a 'POST' call. > > On Mon, Oct 23, 2017 at 4:30 PM, Viktor Klang > wrote: > >> No, I

Re: [akka-user] FlowOps concat with Source.fromFuture behaviour

2017-10-25 Thread Viktor Klang
Does it behave differently from `Source.single(somePromise.future).mapAsync(1)(identity)` ? On Wed, Oct 25, 2017 at 12:01 PM, Christopher Hunt wrote: > Hey community, > > I've got a situation where there's a promise that, when completed, I'd > like to concat its value onto the *end* of any strea

Re: [akka-user] FlowOps concat with Source.fromFuture behaviour

2017-10-25 Thread Viktor Klang
On Wed, Oct 25, 2017 at 1:16 PM, Christopher Hunt wrote: > > > > On 25 Oct 2017, at 21:05, Viktor Klang wrote: > > > > Does it behave differently from > > `Source.single(somePromise.future).mapAsync(1)(identity)` > ? > > Interesting idea. Thanks Viktor. I

Re: [akka-user] Re: Usage of StreamConverters.asOutputStream / possible alternative API?

2017-10-26 Thread Viktor Klang
Be careful though, as you need to ensure proper happens-before relationship between the writes and the closing of the OutputStream. (and other writes of course) On Thu, Oct 26, 2017 at 1:56 PM, Rafał Krzewski wrote: > That worked like a charm :) Thanks a lot Johan! > > Cheers, > Rafał > > W dniu

Re: [akka-user] Re: Usage of StreamConverters.asOutputStream / possible alternative API?

2017-10-26 Thread Viktor Klang
Yup On Thu, Oct 26, 2017 at 3:51 PM, Rafał Krzewski wrote: > Hi Viktor, > > I'm passing the OutputStream to a single method that does a bunch of > writes synchronously and as soon as it returns I do os.close() so I should > be good, no? > > Cheers, > Rafał > > W dniu czwartek, 26 października 20

Re: [akka-user] Allowing SecurityException to propagate during actor system termination

2017-11-13 Thread Viktor Klang
When you say "unhandled exception" you mean "uncaught exception"? On Mon, Nov 13, 2017 at 4:48 AM, Christopher Hunt wrote: > Hi everyone, > > I have a situation where I need to call System.exit upon an actor system > having terminated. In some runtime situations, a SecurityException will > be th

Re: [akka-user] Allowing SecurityException to propagate during actor system termination

2017-11-13 Thread Viktor Klang
Hunt wrote: > Ah yes, uncaught. Thanks for the correction. > > On 13 Nov 2017, at 21:12, Viktor Klang wrote: > > When you say "unhandled exception" you mean "uncaught exception"? > > On Mon, Nov 13, 2017 at 4:48 AM, Christopher Hunt > wrote: > >>

Re: [akka-user] Preventing Memory Leaks

2017-11-19 Thread Viktor Klang
The ActorRef won't prevent the Actor-instance from being garbage-collected. But if you want to avoid hanging onto stale ActorRefs I'd recommend using Death Watch and remove the refs as they are reported in as dead. On Sun, Nov 19, 2017 at 8:13 PM, Joseph Mansigian < joseph.c.mansig...@gmail.com> w

Re: [akka-user] Re: How to measure performance of Actor Message from one actor reaching to another actor

2017-12-15 Thread Viktor Klang
Also, is serialization/deserialization included? At what point does the timer clock start, and when does it stop? -- Cheers, √ On Dec 15, 2017 20:31, "Patrik Nordwall" wrote: > What are you interested in? Throughput (msg/s) or latency (us)? Remote or > local? What will the results of the bench

Re: [akka-user] Request for help on Improving Scalability for Akka Streams Program

2018-01-11 Thread Viktor Klang
Where is your bottleneck? On Thu, Jan 11, 2018 at 12:17 PM, wrote: > Hi Everyone, > > I am learning Scala and Akka Streams, I would kindly like to request for > help on enhancing my small Akka Streams Program so that it can scale with > increase in data. Below are the two functions of the Progra

Re: [akka-user] Akka stream out of band data

2018-02-18 Thread Viktor Klang
How do you deal with M:N ports or X:Y element permutations? -- Cheers, √ On Feb 18, 2018 01:53, "Christopher Hunt" wrote: > Hi there, > > I’ve been wondering recently if there’s been any thought around carrying > out of band data through an Akka Stream in the spirit of network streams: > https

Re: [akka-user] HTTP server performance

2018-02-20 Thread Viktor Klang
Mirek, As a general note: Benchmarking using default configuration is almost pointless* since a default configuration is—by definition, and by necessity—a configuration which will not be *optimal for a specific use-case*. *It can be useful as a baseline for tuning. On Mon, Feb 19, 2018 at 11:30

Re: [akka-user] HTTP server performance

2018-02-20 Thread Viktor Klang
The top hit for me when searching for "tuning akka http" is: https://stackoverflow.com/questions/41297334/akka-http-performance-tuning On Tue, Feb 20, 2018 at 5:39 PM, Mirek Suk wrote: > There is not much to change in akka http server configuration. Care to > share any tips ? > > I've tried fidl

Re: [akka-user] HTTP server performance

2018-02-20 Thread Viktor Klang
Ok. So besides the common dispatcher tuning tips, JVM tuning tips, and Linux IO tuning tips there's also a lot of settings for Akka Http specifically. On Tue, Feb 20, 2018 at 6:23 PM, Mirek Suk wrote: > Thanks, but been there seen

Re: [akka-user] HTTP server performance

2018-02-20 Thread Viktor Klang
What dispatcher tuning did you experiment with? On Tue, Feb 20, 2018 at 10:57 PM, Mirek Suk wrote: > Only a few of them could affect CPU consumption and throuput, unless they > mean something else. > Besides that as I mentioned in op throuput degradation was "random" and on > same system. Tunnin

Re: [akka-user] Re: HTTP server performance

2018-02-20 Thread Viktor Klang
On Tue, Feb 20, 2018 at 11:46 PM, Mirek Suk wrote: > I doubt dispatcher is problem as forkjoinpool with default (and lesser > settings due to tests required by ops) were tried. > What do you mean by "lesser settings"? How did changing pool size and/or throughput affect your bench? What tool are

Re: [akka-user] Re: HTTP server performance

2018-02-21 Thread Viktor Klang
What does wrk2 say w.r.t. throughput? Are you testing pipelined requests or new connections for each request? Are you testing over network or not? On Wed, Feb 21, 2018 at 12:25 AM, Mirek Suk wrote: > Lesser = less maximum threads. Akka has minimum which is "high" for 2 core > machines. = in erro

Re: [akka-user] import context.dispatcher nullpointerexception

2018-03-06 Thread Viktor Klang
Context is bound to the lifecycle of the actor. On Tue, Mar 6, 2018 at 8:37 PM, Jeff wrote: > I have noticed an issue where if a future maps/flatmaps after actor > shutdown, a NullPointerException is thrown. I've narrowed it down to the > import > context.dispatcher, which I technically underst

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] 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 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 code). > > My Java de

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 wrote: > hi - yes > > > On 7 January 2015 at 11:32, Viktor

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 wrote: > Hi Viktor, > Ok sorry - I'm not an expert in these matters - apologies for the > vagueness. I'll do

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 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 questions, the > one i had was

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 it.

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 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! > Absolutely, the reordering is

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 wrote: > Thank you Soumya, > >I think Akka-streams is the way to go. However, I would also > appreciate some performance boost as well - still have 40 milli

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 wro

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 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. Is there any effect of

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 wrote: > > > On Fri, Jan 9, 2015 at 10:02 PM, Viktor Klang > wrote: > >> >> >> On Fri, Jan 9, 2015 at 9:40 PM, David Hotham > > wrote: >> >>> Of course it's normal and expected that a Pri

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" 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] 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" 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. > Logs show it is us

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" 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 nested deep under the f

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 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 an example: > >

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 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, >> √ >> On 1

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 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 were, is there 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 wrote: > I haven't. > > I've managed to figure out that sometimes the following code > > [[ > int nextStepNumbe

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 wrote: > Hi Viktor, > > after upgrading to akka 2.3.9 my multi-jvm-test c

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 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, but with enough lo

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 s

Re: [akka-user] Acceptable Limits for Actor Creation and Destruction?

2015-01-26 Thread Viktor Klang
Hi Paul, There's also the question if they are spawned under the same parent or not. On Mon, Jan 26, 2015 at 5:07 PM, Paul Cleary wrote: > Thank your for the reply, > > These machines are typically 4 core / 8 GB machines with only our app > running. The only JVM settings are CMS and Parallel Y

Re: [akka-user] Acceptable Limits for Actor Creation and Destruction?

2015-01-26 Thread Viktor Klang
Hi Paul, you may want to put the parent on a different dispatcher than the children, since the creation process is a handshake. (so both parent and child needs CPU time) On Mon, Jan 26, 2015 at 5:49 PM, Paul Cleary wrote: > Victor, > Yes, they are spawned under the same parent (same actual acto

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 wrote: > Hi All, > I recently upgraded my application Akka version from 2.2.4 to

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 wrote: > Hi all. > > What do you think about an idea of module providing possibility to create

Re: [akka-user] Re: Addressing paths to cluster peers

2015-01-27 Thread Viktor Klang
Hi Mark, The "user" section means that it is for actors spawned by a user, and not by the system itself, for example. On Mon, Jan 26, 2015 at 8:44 PM, Mark Grey wrote: > I got this addressing to work using the path below: > > ActorPath path = new RootActorPath(mUp.member().address(), >> "/").de

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 C

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" 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 not entirely e

Re: [akka-user] Is forwarding a message to all children via an actor selection more efficient than iterating over the child ActorRefs?

2015-01-29 Thread Viktor Klang
+1 guess for nr 2 -- Cheers, √ On 29 Jan 2015 09:00, "Roland Kuhn" wrote: > Hi Nick, > > I never benchmarked this, but I would guess that the second one should be > a tad faster. Please share your findings! > > Thanks, > > Roland > > 28 jan 2015 kl. 21:37 skrev Nick Ebbitt : > > I have a scenar

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 wrote: > Is the

Re: [akka-user] Linking actors after creation

2015-02-03 Thread Viktor Klang
Hi Ugo, Thanks for your question! No, Akka does not support any notion of "adoption". On Tue, Feb 3, 2015 at 6:15 PM, Ugo Matrangolo wrote: > Hi, > > trying to wrap my head around Akka and I have simple question: is it > possible to create a parent-child relationship between two actors *after*

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 th

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 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 qu

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, 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 actor on > fiber

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, 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 Akka Dispa

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 wrote: > I feel pre

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

2015-02-09 Thread Viktor Klang
Hi Alexey, Doug is currently working on a proposal for this for JDK9, perhaps something for inspiration? http://gee.cs.oswego.edu/dl/jsr166/dist/docs/java/util/concurrent/SubmissionPublisher.html On Sun, Feb 8, 2015 at 5:54 PM, Alexey Romanchuk wrote: > Hello again, > > My idea right now is to

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" wrote: > > Hello, > > I have Akka configured not to exit JVM on fatal errors by setting the "akka.jvm-exit-on-fatal-error" propert

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 error

Re: [akka-user] Future and Thread.

2015-02-13 Thread Viktor Klang
Hi Maatary, 1) This is rather easily explored with the following incantation: scala> Future { Thread.currentThread.isDaemon } foreach println true 2) I am not sure I understand the question, would you mind elaborating? Hi, by default, on which kind of Thread is a future executed ? Example: wh

Re: [akka-user] Re: streams - Source that emits only 1 (or no) element

2015-02-16 Thread Viktor Klang
Giovanni, On Mon, Feb 16, 2015 at 9:37 PM, Giovanni Alberto Caporaletti < paradi...@gmail.com> wrote: > What I'm saying is that conceptually having a single item or a stream are > two different things and this should be reflected in the type system (e.g. > rx Task). > I disagree and let me tell

Re: [akka-user] Re: streams - Source that emits only 1 (or no) element

2015-02-17 Thread Viktor Klang
Hi Giovanni, On Mon, Feb 16, 2015 at 11:31 PM, Giovanni Alberto Caporaletti < paradi...@gmail.com> wrote: > You're absolutely right about the future not representing an "already > running computation". But it's not a "blueprint". If a see a future, I take > for granted that something will happen

Re: [akka-user] Re: streams - Source that emits only 1 (or no) element

2015-02-17 Thread Viktor Klang
Thanks for raising a good question! -- Cheers, √ On 17 Feb 2015 12:47, "Giovanni Alberto Caporaletti" wrote: > Thank you for your replies Viktor and Endre. I see your point and of > course the possibility of a failure has always to be considered, regardless > of the "cardinality" of the stream.

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" wrote: > Hello, > > I have a questions concerning holding many network connections and whether > A

Re: [akka-user] Problem with akka tcp streams

2015-03-19 Thread Viktor Klang
This looks weird: val file = scala.io.Source.fromFile(new File("./logfile.txt")) val lines = file.getLines() <-- getLines here? Source(() => file.getLines()).map(line => { On Thu, Mar 19, 2015 at 8:28 PM, Martynas Mickevičius < martynas.mickevic...@typesafe.com> wrote: > Hi, > > are you sur

Re: [akka-user] akka-streams constructing Source from Iterator

2015-03-19 Thread Viktor Klang
You need to also make sure that the underlying connection gets closed both in the case of afilure but also in the case of non-exhaustion. On Thu, Mar 19, 2015 at 10:08 PM, wrote: > Martynas, > > I have an existing function that creates Iterator that wraps ResultSet and > I can pass this function

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 wrote: > Hi all, > >

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" wrote: > Actually ActorFlowMaterializerSettings is complaining > about initialInputBufferSize = 0. What are the reasons you can't disable > buffe

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 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) buffer for that sec

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 wrote: > Hi Peter, > > Why don't you just create a custom stage then where you bundle up al

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 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 us sy id >> wa >

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

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 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 > dispatcher i

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 wrote: > Viktor, > > Here is the latest configuration that allowed to me reach 30msg/sec > between 2 x 4cpu hosts in GCE network. > > htt

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, wrote: > I am trying to use akka-io to broadcast a UDP packet to all the nodes in > my subnet? I am fo

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: akka.actor.A

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 wrote: > Works on my machine: > > scala> import scala.collection.mutable.ArrayBuffer > import scala.collection.mutable.ArrayBuffer > > scal

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

2015-04-03 Thread Viktor Klang
ote: > >> 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 >> wrote: >> >>> Works on my machine: >>> >>> scala> import scala.collec

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 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 responsible for. > I'm n

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 wrote: > Hell

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 wrote: > Hi all, > > I've got a question in relation to the unit testing of a piece of non > actor code that produces a Future via performing an

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 wrote: > Closely related to this question > , > I know that Akka Streams do not yet

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

2015-04-09 Thread Viktor Klang
M UTC+1, √ wrote: >>> >>> 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 wrote: >>> >>>> >>>> >>>> On Thu, Apr 9, 2

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 wrote: > I do it just via ActorPublisher, the "scroll" method is basically > asynchronously l

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 wrote: > > > On Thu, Apr 9, 2015 at 1:33 PM, Viktor Klang > wrote: > >> Does this help? >> >> >> http://christopher-bat

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" 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 Thursday, Apri

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 wrote: > Thank you! It works. But still there is a slim chanc

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 wrote: > Hi, > > While implementing a FlexiMerge we stumbled on the following issue: > > override def initialState = > State[T](ReadPreferred(p.priority, p.second)) { > (ctx, input, elemen

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 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 from an > extern

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 wrote: > Hi Tomer, > > the servlet container way of running things completely negates all the > benefi

  1   2   3   4   5   6   >