Re: [akka-user] Message ordering for newly instantiated actors

2016-02-16 Thread James P
Got it. Many thanks :D On Tuesday, February 16, 2016 at 12:30:19 PM UTC-8, √ wrote: > > Hi James, > > 1) Message sends are not guaranteed to be delivered (i.e. at-most-once) > 2) B could die/exit before it gets the message from C > 3) C could die/exit before it gets the message from A > > That asi

Re: [akka-user] Message ordering for newly instantiated actors

2016-02-16 Thread Viktor Klang
Hi James, 1) Message sends are not guaranteed to be delivered (i.e. at-most-once) 2) B could die/exit before it gets the message from C 3) C could die/exit before it gets the message from A That aside, if those things do not happen, it should be fine. On Tue, Feb 16, 2016 at 9:27 PM, James P wr

[akka-user] Message ordering for newly instantiated actors

2016-02-16 Thread James P
Hi folks, Good day. I'm fairly new to Akka so I just wanted to ask the community a quick question. Consider the following scenario: 1) Actor A creates Actor B 2) Actor A sends a message to Actor C telling it to perform a computation and send results to Actor B 3) Actor C sends a message to Act

Re: [akka-user] Failing a stream when a downstream branch fails

2016-02-16 Thread Konrad Malawski
Errors only flow downstream. So in order to take a downstream error and make it fail something "upstream"... you'll have to connect that downstream to the upstream so it becomes a downstream :-) I hope that made sense :-) In general though, you could make a fan-out operation from your downstream

[akka-user] Re: java.sql.SQLTimeoutException due to Zip stage

2016-02-16 Thread David Knapp
It looks like you're using a fairly old version of akka-stream. Any chance on upgrading to the latest? Also, what is the type of PostgresChannelsRepository.activeTwitterProfiles? Also it would be helpful to see how someActor is used and how source is defined. On Monday, February 15, 2016 at 8:

[akka-user] Failing a stream when a downstream branch fails

2016-02-16 Thread David Knapp
I asked this on SO without any responses. Thought I'd x-post here. I'm wondering if there's any sane way to make this graph fail, or if I'm just thinking about this in the entirely wrong way: def flow(n: String) = Flow[Int].map{v => println(s"$n: $v"); v + 1} val g = Source.fromGraph(GraphDSL.cr

[akka-user] Re: Akka dispatchers are not reused instead new dispatchers are created overtime

2016-02-16 Thread Hareesh Jagannathan
Thanks a lot all. I will go ahead rethink the usage of default dipatcher for few of my actor(service calling and file-io calling ). Think its wise to move a threadpool executor based dispatcher. On Tuesday, February 16, 2016 at 9:33:17 AM UTC-6, Hareesh Jagannathan wrote: > > Akka application s

Re: [akka-user] Re: Akka dispatchers are not reused instead new dispatchers are created overtime

2016-02-16 Thread Viktor Klang
No, I'd use a dedicated dispatcher for the routees which do IO, use ThreadPoolExecutor. -- Cheers, √ On Feb 16, 2016 5:24 PM, "Hareesh Jagannathan" wrote: > > I do have blocking file-io in one of the router of the pipeline. > > Should i used Pinned dispatcher for those and go ahead with what yo

Re: [akka-user] Re: Akka dispatchers are not reused instead new dispatchers are created overtime

2016-02-16 Thread Konrad Malawski
You may want to read my SO answer which explains what you're seeing somewhat (including pictures and how to configure dispatchers properly): stackoverflow.com/questions/34641861/akka-http-blocking-in-a-future-blocks-the-server/34645097#34645097 --  Cheers, Konrad 'ktoso’ Malawski Akka @ Typesafe

[akka-user] Re: Akka dispatchers are not reused instead new dispatchers are created overtime

2016-02-16 Thread Hareesh Jagannathan
I do have blocking file-io in one of the router of the pipeline. Should i used Pinned dispatcher for those and go ahead with what you suggested for non blocking actors? On Tuesday, February 16, 2016 at 9:33:17 AM UTC-6, Hareesh Jagannathan wrote: > > Akka application spins a lot of new dispat

Re: [akka-user] Re: Akka dispatchers are not reused instead new dispatchers are created overtime

2016-02-16 Thread Viktor Klang
If you don't do any blocking then your max should be the number of cores you have and the factor about 0.6-0.7 -- Cheers, √ On Feb 16, 2016 5:17 PM, "Hareesh Jagannathan" wrote: > See thats my problem. All i have is 8core CPU (3 nodes) so basically 24 > cores. > > I understood the below form

[akka-user] Re: Akka dispatchers are not reused instead new dispatchers are created overtime

2016-02-16 Thread Hareesh Jagannathan
See thats my problem. All i have is 8core CPU (3 nodes) so basically 24 cores. I understood the below form documentation and blogs. Max*factor is most number of threads i can have. Min*factor in minimum number of threads i can have. So what exactly would you recommend. also why is that i am

Re: [akka-user] Re: Akka dispatchers are not reused instead new dispatchers are created overtime

2016-02-16 Thread Viktor Klang
Wow, you have 500 CPU cores on your machine? -- Cheers, √ On Feb 16, 2016 5:01 PM, "Hareesh Jagannathan" wrote: > Thanks for responding quickly. Attaching a screeshot form visual Vm. As > you can see there are more than 700 dispatcher for one my system. > > My design is as below. > >1. The

Re: [akka-user] Akka dispatchers are not reused instead new dispatchers are created overtime

2016-02-16 Thread Endre Varga
Are you referring to threads? On Tue, Feb 16, 2016 at 4:37 PM, Konrad Malawski < konrad.malaw...@typesafe.com> wrote: > Hi there, > Could you share your configuration first and also how you're observing the > described problem? > Do you have a reproducer for this mesbehaviour? > > -- > Cheers, >

Re: [akka-user] Re: Akka streams file compression

2016-02-16 Thread Konrad Malawski
Yay, Maciek sure is a great guy :-) --  Cheers, Konrad 'ktoso’ Malawski Akka @ Typesafe On 16 February 2016 at 16:40:26, Richard Rodseth (rrods...@gmail.com) wrote: Good news is that snappy-flows author has already updated. On Tue, Feb 16, 2016 at 5:40 AM, Viktor Klang wrote: Perhaps include a

Re: [akka-user] Re: Akka streams file compression

2016-02-16 Thread Richard Rodseth
Good news is that snappy-flows author has already updated. On Tue, Feb 16, 2016 at 5:40 AM, Viktor Klang wrote: > Perhaps include a link to it here for someone to perhaps do just that? :-) > > On Tue, Feb 16, 2016 at 2:36 PM, Endre Varga > wrote: > >> We have one actually hidden in HTTP, it jus

Re: [akka-user] Akka dispatchers are not reused instead new dispatchers are created overtime

2016-02-16 Thread Konrad Malawski
Hi there, Could you share your configuration first and also how you're observing the described problem? Do you have a reproducer for this mesbehaviour? --  Cheers, Konrad 'ktoso’ Malawski Akka @ Typesafe On 16 February 2016 at 16:33:21, Hareesh Jagannathan (harjag...@gmail.com) wrote: Akka app

[akka-user] Akka dispatchers are not reused instead new dispatchers are created overtime

2016-02-16 Thread Hareesh Jagannathan
Akka application spins a lot of new dispatchers overtime instead of reusing . The old dispatchers are going back to waiting state and never been reused or terminated. We use akka's default dispatcher with fork-join executors. we do override the default parallelism parameter between our actors

Re: [akka-user] Akka Stream Example

2016-02-16 Thread Konrad Malawski
Hi there, the docs are:  https://github.com/akka/akka/blob/master/akka-docs/rst/scala/stream/stream-quickstart.rst from there you can find the includecode snippets pointing to:  https://github.com/akka/akka/blob/master/akka-docs/rst/scala/code/docs/stream/TwitterStreamQuickstartDocSpec.scala which

Re: [akka-user] Akka Stream Example

2016-02-16 Thread Darion Yaphet
Yep ! That's all I need . Thank you for you help ~ 在 2016年2月16日星期二 UTC+8下午10:58:16,Konrad Malawski写道: > > Hi there, > the docs are: > https://github.com/akka/akka/blob/master/akka-docs/rst/scala/stream/stream-quickstart.rst > from there you can find the includecode snippets pointing to: > http

Re: [akka-user] Remoting transport back-pressure

2016-02-16 Thread Любен
Hi Guido, Thanks for the pointer to the chopping head mailbox. I will take a look, sounds really interesting. I am already using different bounded mailboxes between the Source and the Processing actor depending on the semanitcs of the computation: if the source is shared between multiple processin

[akka-user] Akka Stream Example

2016-02-16 Thread Darion Yaphet
Hi All I'm learning Akka to processing data streaming . stream-quickstart is a good start . Someone could tell me where to found this example source code ? thanks :) -

Re: [akka-user] How to persist path dependent types with Protobuff?

2016-02-16 Thread Konrad Malawski
Hi there, Protocol buffers don't really works on "any case class", you have to map values to protoc generated message classes, (middle collumn in the example), whihc are generated from an IDL shows on the left hand side column here: https://developers.google.com/protocol-buffers/ Read up on how

Re: [akka-user] Re: Akka streams file compression

2016-02-16 Thread Viktor Klang
Perhaps include a link to it here for someone to perhaps do just that? :-) On Tue, Feb 16, 2016 at 2:36 PM, Endre Varga wrote: > We have one actually hidden in HTTP, it just waits for someone to migrate > it out :) > > On Tue, Feb 16, 2016 at 2:25 PM, Viktor Klang > wrote: > >> No, it was encou

[akka-user] Re: Does akka.io support unix sockets (AF_UNIX)?

2016-02-16 Thread Rafał Krzewski
https://github.com/kohlschutter/junixsocket library supports only blocking IO, which is not the best match for Akka. https://github.com/jnr/jnr-unixsocket seems to be a better alternative because it provides NIO interface which means that it might operate in non blocking mode - but I don't have

Re: [akka-user] Re: Akka streams file compression

2016-02-16 Thread Endre Varga
We have one actually hidden in HTTP, it just waits for someone to migrate it out :) On Tue, Feb 16, 2016 at 2:25 PM, Viktor Klang wrote: > No, it was encouragement for the OP :) > > On Tue, Feb 16, 2016 at 2:16 PM, Endre Varga > wrote: > >> Planned. Had not time so far :) >> >> On Tue, Feb 16,

Re: [akka-user] Re: Akka streams file compression

2016-02-16 Thread Viktor Klang
No, it was encouragement for the OP :) On Tue, Feb 16, 2016 at 2:16 PM, Endre Varga wrote: > Planned. Had not time so far :) > > On Tue, Feb 16, 2016 at 2:15 PM, Viktor Klang > wrote: > >> (Or add support for compression!) >> >> On Tue, Feb 16, 2016 at 2:13 PM, Konrad Malawski >> wrote: >> >>>

Re: [akka-user] Re: Akka streams file compression

2016-02-16 Thread Endre Varga
Planned. Had not time so far :) On Tue, Feb 16, 2016 at 2:15 PM, Viktor Klang wrote: > (Or add support for compression!) > > On Tue, Feb 16, 2016 at 2:13 PM, Konrad Malawski > wrote: > >> Hi Richard, >> Not that I'm aware of. >> >> You can ping the library maintainer to upgrade to 2.4.2 (we're

Re: [akka-user] Re: Akka streams file compression

2016-02-16 Thread Viktor Klang
(Or add support for compression!) On Tue, Feb 16, 2016 at 2:13 PM, Konrad Malawski wrote: > Hi Richard, > Not that I'm aware of. > > You can ping the library maintainer to upgrade to 2.4.2 (we're releasing > that today) though :) > > On Tue, Feb 16, 2016 at 1:45 AM, Richard Rodseth > wrote: > >

Re: [akka-user] Re: Akka streams file compression

2016-02-16 Thread Konrad Malawski
Hi Richard, Not that I'm aware of. You can ping the library maintainer to upgrade to 2.4.2 (we're releasing that today) though :) On Tue, Feb 16, 2016 at 1:45 AM, Richard Rodseth wrote: > I just had the rather gratifying experience of adding Snappy compression > using snappy-flows with > > .via

Re: [akka-user] Re: Using local file system to store Actor's state ?

2016-02-16 Thread Chelios
Hey Guys, Sorry didn't get any notifications about your replies in my email. Thank you so much for your replies guys. Arno, you are right I should not be building my own database but I was just planning on storing the State of my actors locally (json files) instead of having it in memory in the

Re: [akka-user] Remoting transport back-pressure

2016-02-16 Thread Guido Medina
Hi Luben, There are other types of mailboxes good for that (depending on your requirements) you have bounded non-blocking and I'm not 100% sure but I think I read somewhere that in Akka streams you have a bounded chopping head sink, say you don't care about head messages that have taken too lon