[akka-user] Dispatcher not configured for path exception

2014-06-01 Thread lee json
I have an actor system configured with remote and pinned dispatcher 

  my-setting {
akka {
  actor {
provider = "akka.remote.RemoteActorRefProvider"
my-pinned-dispatcher {
  executor = "thread-pool-executor"
  type = PinnedDispatcher
}
  }
  remote {
netty.tcp {
  hostname = "127.0.0.1"
  port = 1234
}
  }
}
  }

My actor that will be created is instantiated  within another actor as 
below: 

  val myActor = context.actorOf(Props(classOf[MyActor]).
withDispatcher("my-setting.my-pinned-dispatcher"), "myActorName")

But it throws exception saying 

 Dispatcher [my-setting.my-pinned-dispatcher] not configured for path 
akka://MySystem/user/actor1/myActorName
at 
akka.remote.RemoteActorRefProvider.actorOf(RemoteActorRefProvider.scala:219)
at akka.actor.dungeon.Children$class.makeChild(Children.scala:191)
...

I check RemoteActorRefProvider.scala source, it seems to me that it doesn't 
successfully configure dispatcher because at line 219 it checks if the 
system has dispatcher

if (!system.dispatchers.hasDispatcher(props.dispatcher))
throw new ConfigurationException(s"Dispatcher [${props.dispatcher}] 
not configured for path $path")

How can I configure pinned dispatcher with RemoteActorRefProvider enabled? 

akka version is 2.2.3

Thanks


  

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] ClusterClient and getting response from cluster

2014-06-01 Thread Patrik Nordwall
On Sat, May 31, 2014 at 4:56 AM, Eugene Dzhurinsky 
wrote:

> Hello!
>
> I have a cluster with set of FSM actors deployed there. I also have a
> *ClusterClient* configured to send a message to the dedicated actor
> service, which then processes the passed data and now it has to *respond
> to the sender*.
>
> Like, actor *Client* sends a message to the cluster, which is routed
> through the *ClusterClient* and is delivered to the *WorkerFSM*, now the
> *WorkerFSM* processes the message and has to send the result back to the
> *Client*.
>
> But the *sender()* method in *WorkerFSM* will return the reference to
> *ClusterClient* - not
> *Client.*
>

That is surprising. The ClusterClient is using forward so the original
sender is passed on to the ClusterReceptionist, which creates a "response
tunnel" actor. Your WorkerFSM should see that response tunnel as sender. It
has the same name as the client actor, but is a child of the
ClusterReceptionist. When you reply to that sender the message will be
routed back to that response tunnel, and then back to the client. The
reason for this is to avoid inbound connections from other cluster nodes to
the client.

Are you using Akka version 2.3.3?

/Patrik


>
> How do I know which actor has been sending the message to the cluster?
>
> Thanks!
>
> --
> >> Read the docs: http://akka.io/docs/
> >> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Patrik Nordwall
Typesafe  -  Reactive apps on the JVM
Twitter: @patriknw



-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Current Best Practices for CQRS with Akka?

2014-06-01 Thread Ashley Aitken

Howdy All,

I've been reading lots of threads on the Akka User mailing list and pull 
requests and blog posts within the community but I am confused about what 
currently are the "best practices" for:

1. Distributed and Resilient Pub-Sub within Akka

It seems to me that a resilient pub-sub is a key component for a CQRS 
approach and for a distributed system this would also need to be 
distributed.  I believe the event system in Akka is currently per-node and 
not resilient.  What is the current best practice for resilient distributed 
pub-sub for CQRS with Akka?  

Please note the best practice may be to use a third-party distributed and 
resilient pub-sub technology and I am open to that (but I would prefer to 
stay with something within Akka or the Typesafe platform).

2. Process Managers

What is the best approach to implementing process managers (for sagas) in 
CQRS with Akka.  I am quite a novice in this area so the answer may be 
obvious but I'm wondering about whether it's best to use singleton actors, 
processors, eventsourced processors, finite state machine etc.  

It seems to me that process managers in a distributed system would also 
require distributed and resilient pub-sub (as discussed above) to work well.

3. Denormalisation of Views

I've discussed this previously with Martin and others as a result of the 
restriction of Views to track one processor.  Ideas like using a database 
with triggers within the view model to update denormalised data were 
suggested but I am wondering if this is the best practice for now?

I'm thinking that again distributed and resilient pub-sub (as discussed 
above) may be another way to achieve this.

Sorry if I have missed some crucial documentation or posts.  I've probably 
seen most discussion relating these to the questions but I'm somewhat 
confused as some of the posts are older and others discuss solutions 
without Akka Persistence (I think).

Thanks in advance for any suggestions.

Cheers,
Ashley.


-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] reactive streams uses ack based write throttling?

2014-06-01 Thread Kenneth Owens
My questions pertain to the choice of ack based write throttling in the 
reactive streams implementation using Akka. I currently have multiple, Akka 
based, Protocol Buffers via TCP services running in production at my 
company, and, like the group at spray, I tend to prefer nack based write 
throttling with read suspension back pressure (Empirically, I've found this 
method to be much more performant). From review of the source, it seems 
that the writePump will buffer all incoming data prior to demand being 
established and any outstanding writes being complete, concatenate the 
buffered data into a single ByteString, and then send the data to the 
underlying TCP actor managing the NIO selector for the connection.


   - Is my understanding correct?
   - If so why has this method been selected instead of optimistic write 
   through?
   - Am I missing some implication of this method with respect to dynamic 
   back pressure control? It seems that better performance might be gained by 
   writing to the NIC optimistically until CommandFailed occurs, and that, as 
   the back pressure here is applied by the kernel TCP buffers and I/O device, 
   it should not affect downstream remote  subscribers or affect the back 
   pressure balance between remote hosts
   

Thanks you in advance for you reply,
-K

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] There are now akka-stream in master. Why?

2014-06-01 Thread Andrew Gaydenko
On Sunday, June 1, 2014 7:42:49 PM UTC+4, Konrad Malawski wrote:
>
> Yes, perhaps I should explain our current workflow with these branches 
> actually:
>
> master will eventually become akka 2.4.x
>
> release-2.3 will eventually become akka 2.3.4 (and 2.3.5 if it’s needed 
> etc).
>
> release-2.3-dev is used only for streams development. It is separate to 
> keep iterating / releasing streams faster than the main akka 2.3. 
>  It will be merged to release-2.3 once we decide they’re ready to roll-in.
>
> Needed changes from 2.3 will be ported to 2.4 (master), of course at some 
> point.
>
> I hope this helps!
>

Yes, absolutely, thanks!

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] There are now akka-stream in master. Why?

2014-06-01 Thread Konrad Malawski
Yes, perhaps I should explain our current workflow with these branches
actually:

master will eventually become akka 2.4.x

release-2.3 will eventually become akka 2.3.4 (and 2.3.5 if it’s needed
etc).

release-2.3-dev is used only for streams development. It is separate to
keep iterating / releasing streams faster than the main akka 2.3.
 It will be merged to release-2.3 once we decide they’re ready to roll-in.

Needed changes from 2.3 will be ported to 2.4 (master), of course at some
point.

I hope this helps!
​
-- 
Cheers,
Konrad 'ktoso' Malawski
hAkker - Typesafe, Inc



-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] There are now akka-stream in master. Why?

2014-06-01 Thread Andrew Gaydenko
Aha, thanks, I see, it's just a way to organize branches. 

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] There are now akka-stream in master. Why?

2014-06-01 Thread Konrad 'ktoso' Malawski
No worries, https://github.com/akka/akka/tree/release-2.3-dev/akka-stream
Happy hakking :-)

-- 
Konrad 'ktoso' Malawski
hAkker @ typesafe

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: There are now akka-stream in master. Why?

2014-06-01 Thread Andrew Gaydenko
Sorry, my mistake, I mean "There are *no* akka-stream...". I haven't found 
a way to edit the subject.

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] There are now akka-stream in master. Why?

2014-06-01 Thread Konrad 'ktoso' Malawski
Uhm, I don’t think it ever had streams in it, hm! :-)
The streams are in active development and are located in the release-2.3-dev 
branch.
Slightly hidden we know, on the other hand, it’s very aggressively changing, so 
that may be a good thing…

Anyhow, you’re free to give it a spin! Feedback is also very welcome.
Happy hakking!


-- 
Konrad 'ktoso' Malawski
hAkker @ typesafe

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] There are now akka-stream in master. Why?

2014-06-01 Thread Andrew Gaydenko
I just have noticed master hasn't anymore akka-stream subproject. Does it 
mean akka (and Scala in whole) reactive streaming is preparing for the next 
reincarnation? :)

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] [streaming] newbie Q's about time and scale

2014-06-01 Thread Konrad Malawski
Hello Ian,
replies in-line :-)

I'm recently read about reactive streams, and want to know some more about
> it.
>
Awesome, you're in the right place then :-)


> how does one deal with time. specifically how do I set up a periodic
> scheduler to tell the flow that it's time to emit results. (and ideally
> allow my service to set the time based on input records and not use system
> time, so I can do stuff like replaying logs)
>
The first time based operators have been merged just by the end of last
week actually -
https://github.com/akka/akka/commit/0fb9a92efcc4cf707bfe6fdc92dcf0ad4225209e
Akka Streams are still in very early stages as you can see, but having a
look at the above code may help you out.



>  and secondly how do I scale these flows to work over multiple machines.
> Ideally I'd like to just hand a dozen machines to Akka and say 'go wild'
> and let it figure it all out, but failing that how can I allocate resources
> to a producer?
>
The streams are currently "in jvm".
While streaming over the network is our goal in the long run (and providing
back-pressure among these nodes) these are still "coming".
We do have an TCP stream implementation, but that's not exactly what you're
asking for.


I hope this helps, cheers!

-- 
Cheers,
Konrad 'ktoso' Malawski
hAkker - Typesafe, Inc



-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] how to access external config inside a test spec (akka 2.0) ?

2014-06-01 Thread srinivas gullapalli
Even i am facing almost the same issue.I am not able to load config files 
using  *"class MyTestSpec extends TestKit(ActorSystem("*

*MyActorSystem", ConfigFactory.load()))*


Could you please provide pointers how to specify 
 -Dconfig.file=... VM parameter when running testcase.I have couple files 
to be specified.I am a newbie to scala and akka.


On Thursday, 29 March 2012 11:51:27 UTC-5, h3nk3 wrote:
>
> On Thu, Mar 29, 2012 at 16:58, Sergey Malov  > wrote:
> > Hi Henrik,
> > Thanks for your reply, however one do not normally define ActorSystem in 
> a test suite which extends TestKit which is necessary to get access to 
> TestActorRef.  I am not even sure it is possible. Sorry, I probably was not 
> too clear about it.
>
> It is possible to use TestActorRef without extending TestKit - see gists 
> below.
>
> > Instead it is defined in a test class definition like this:
> >
> >class MyTestSpec extends TestKit(ActorSystem("MyActorSystem")) { 
> … }
> >
> > However adding configuration like one would normally do in a code:
> >
> >class MyTestSpec extends TestKit(ActorSystem("MyActorSystem", 
> ConfigFactory.load())) {
> >…
> >val actor = TestActorRef(new ServiceActor(val))
> >…
> >}
> >
> > doesn't work - ServiceActor fails to instantiate due to inability to 
> find configuration settings.
> >
>
> Make sure you use the -Dconfig.file=... VM parameter when you run your
> test in order to make ConfigFactory.load() work.
> Your issue seems to be related to this somehow. I can specify a
> specific file and use ConfigFactory.load().
>
> I have created some gists that you can have a look at for more information.
> https://gist.github.com/2239521
> https://gist.github.com/2239565
>
> Hope this solves your problem. Otherwise just let me know and we will
> eventually fix it.
> Cheers
> //Henrik
>
> > Thanks,
> >
> > Sergey
> >
> > On 2012-03-28, at 5:37 PM, Henrik Engström wrote:
> >
> >> Hello Sergey,
> >> See inline comment.
> >>
> >> On Wed, Mar 28, 2012 at 18:24, Sergey Malov  > wrote:
> >>> In my test case I create reference for an actor being tested like:
> >>>
> >>>val actor = TestActorRef(new ServiceActor(val)) (1)
> >>>
> >>> However ServiceActor get some of its settings from configuration file, 
> supplied to it through the ActorSystem("Name", config) in a real 
> application.
> >>>
> >>> Thus attempt to create actor like on line (1) causes an 
> com.typesafe.config.ConfigException$Missing exception.
> >>>
> >>> How can I inject my custom config into the unit test ?
> >>
> >> You can populate the actor system with a specific config values when
> >> you create it, e.g.:
> >> val system = ActorSystem("TestSystem", ConfigFactory.parseString(""" {
> >> awesome.movie = "The Big Lebowski" } """))
> >>
> >> HTH
> >> Henrik
> >>
> >>>
> >>> Thanks,
> >>> Sergey
> >>>
> >>> --
> >>> You received this message because you are subscribed to the Google 
> Groups "Akka User List" group.
> >>> To post to this group, send email to akka...@googlegroups.com 
> .
> >>> To unsubscribe from this group, send email to 
> akka-user+...@googlegroups.com .
> >>> For more options, visit this group at 
> http://groups.google.com/group/akka-user?hl=en.
> >>>
> >>
> >> --
> >> You received this message because you are subscribed to the Google 
> Groups "Akka User List" group.
> >> To post to this group, send email to akka...@googlegroups.com 
> .
> >> To unsubscribe from this group, send email to 
> akka-user+...@googlegroups.com .
> >> For more options, visit this group at 
> http://groups.google.com/group/akka-user?hl=en.
> >>
> >
> > --
> > You received this message because you are subscribed to the Google 
> Groups "Akka User List" group.
> > To post to this group, send email to akka...@googlegroups.com 
> .
> > To unsubscribe from this group, send email to 
> akka-user+...@googlegroups.com .
> > For more options, visit this group at 
> http://groups.google.com/group/akka-user?hl=en.
> >
>
>

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.