[akka-user] How to programmatically add children to a FSM actor?

2014-02-11 Thread Nader Aeinehchi
Hi How can a child actor (which itself implements FSM) be created and added as a child to the context of a FSM actor? Suppose the following pseudocode: trait WorkerFSM[S, D] extends FSM[S, D] trait ManagerFSM[S, D] extends FSM[S, D] { // Does not work // Create some WorkerFSM actor and ad

[akka-user] ConfigFactory caching Config objects

2014-02-11 Thread Shannon Lloyd
Hi, Firstly, I'm aware of this thread: https://groups.google.com/forum/#!searchin/akka-user/configfactory/akka-user/md2b192hqLA/bjs6tO9HSBkJ However, what I'd like to know is, is it possible to disable caching? The Javadoc for ConfigFactory.invalidateCaches states that it "Reloads any cached

[akka-user] :26: error: not found: value context

2014-02-11 Thread Qiang Fu
when i type context.actorOf(Props[HelloWorld], "ss") on console, there is error ":26: error: not found: value context". and if i import content._, there is also error ":26: error: not found: value context". who knows reason? thanks -- >> Read the docs: http://akka.io/docs/ >

[akka-user] ASP.NET to Akka through Azure/AWS message queue

2014-02-11 Thread Tagir Magomedov
Hello everyone. I guess it's one of those "should I use Akka for this" posts. I'm completely new to distributed application design and am trying to do this test application to get some understanding on how it all works together. Thus I would appreciate any feedback on the following applicatio

Re: [akka-user] Agents on Android

2014-02-11 Thread Akka Team
Hi Tim, I'm not aware of anything special within agents; why are you asking? Does something not work? Regards, Roland On Mon, Feb 10, 2014 at 10:59 AM, Tim Pigden wrote: > Hi - anyone tried using agents on Android? Any reason to think there would > be a problem? > > -- > >> Read the

Re: [akka-user] Cluster sharding design questions

2014-02-11 Thread Akka Team
Hi Vince, in the end it boils down to how you model your domain and which entities will be created in what numbers; only you can estimate this and determine which entities need sharding and which not. Regards, Roland On Mon, Feb 10, 2014 at 2:34 PM, Vince Golding wrote: > > > On Monday, Febr

Re: [akka-user] Router - remote actors - pool

2014-02-11 Thread Akka Team
Hi Bryan, this feature already exists (although it is currently somewhat under-documented with respect to being available in conjunction with remoting): akka.actor.deployment { /remote1 { router = broadcast-group routees.paths = ["akka.tcp://mysystem@127.0.0.1:6661/user/remote", "akka.t

Re: [akka-user] akka-camel jetty Producer: getting an uncaught Exception | Internal server error

2014-02-11 Thread Akka Team
Hi Raj, I might be missing something, but why do you think Camel comes into the picture at all? Since without it your application is running just fine, I would say that you should just go with that and be happy :-) Regards, Roland On Mon, Feb 10, 2014 at 7:06 PM, Vaibhav Raj wrote: > Use cas

Re: [akka-user] ConfigFactory caching Config objects

2014-02-11 Thread √iktor Ҡlang
What's the use-case? On Tue, Feb 11, 2014 at 6:33 AM, Shannon Lloyd wrote: > Hi, > > Firstly, I'm aware of this thread: > https://groups.google.com/forum/#!searchin/akka-user/configfactory/akka-user/md2b192hqLA/bjs6tO9HSBkJ > > However, what I'd like to know is, is it possible to disable cachin

Re: [akka-user] Agents on Android

2014-02-11 Thread Tim Pigden
Hi I'm just asking before I start Seems the safest policy that's all Thanks Tim On 11 Feb 2014 09:10, "Akka Team" wrote: > Hi Tim, > > I'm not aware of anything special within agents; why are you asking? Does > something not work? > > Regards, > > Roland > > > > On Mon, Feb 10, 2014 at 10:59 AM,

Re: [akka-user] clean cluster exit

2014-02-11 Thread Akka Team
Hi James, the sequence you describe makes perfect sense to me, and the ClusterSingletonManager tries to be overly thorough here; so much so that I would call it a bug. Thanks for reporting! Regards, Roland On Mon, Feb 10, 20

Re: [akka-user] :26: error: not found: value context

2014-02-11 Thread √iktor Ҡlang
did you import scala.actors.Actor instead of akka.actor.Actor? On Tue, Feb 11, 2014 at 5:18 AM, Qiang Fu wrote: > when i type context.actorOf(Props[HelloWorld], "ss") on console, there is > error ":26: error: not found: value context". > > and if i import content._, there is also error ":26:

[akka-user] Akka 2.1.4: Spurious Akka Timeouts

2014-02-11 Thread Brian Fowler
Hi, In Akka 2.1.4 I'm seeing the following behaviour. We have a set of actor systems on different boxes in the following configuration. ActorSystemA (Actor 1) - | _

Re: [akka-user] Swapping ActorRef on SupervisorStrategy

2014-02-11 Thread Akka Team
Hi Diego, apart from style questions (like using a sealed State trait instead of an Int), there is just one thing: you might want to use `val` instead of `def` when declaring the supervisorStrategy in general, unless you consciously did it here because failure is so rare that the allocation should

Re: [akka-user] Swapping ActorRef on SupervisorStrategy

2014-02-11 Thread Akka Team
Hi Oleg, your proposal is a bit futuristic in the sense that passing in failures as normal messages is something that I am only experimenting with for Akka 3 at the moment ;-) Regards, Roland On Mon, Feb 10, 2014 at 10:27 PM, Oleg Zhurakousky < oleg.zhurakou...@gmail.com> wrote: > What if yo

[akka-user] Re: Akka Clustering

2014-02-11 Thread Amit Mula
hi guys! I am again stuck with a cluster pub sub problem. Recently, I was using the *Send()* method of *DistributedPubSubMediator *but seems like the message are not being received by the subscriber. Instead of subscribe, I have used put in the subscriber actor initialization : mediator.tell(

[akka-user] Re: SSL, keystore, truststore

2014-02-11 Thread Raymond Roestenburg
Also, I could not find any code that does hostname verification from the client side, which is described as something that should be done when using a raw SSLEngine. (I'm now obviously reading the JSSE docs :-) BTW I'm asking these questions to verify that my understanding is correct, and as a

[akka-user] Execute multiple Actor.Receive

2014-02-11 Thread Jatin Puri
I have multiple traits that have a method of type `Actor.Receive`. i.e. Something like trait Functionality { var allReceives:Set[Receive] } trait LoadBalancer extends Functionality{ def body:Receive = {whatever} allReceives += body } class Act extends Actor w

Re: [akka-user] Using Akka cluster to build a SOA framework?

2014-02-11 Thread Akka Team
Hi Giovanni, while it might work to send a transaction around between actors, I believe that that is the wrong approach. In the Actor Model, the only consistent place is within a given actor, everything else is inconsistent. Therefore I would collect all information needed for performing a DB tran

Re: [akka-user] ASP.NET to Akka through Azure/AWS message queue

2014-02-11 Thread Akka Team
Hi Tagir, that design is certainly possible (I would not qualify use-cases as correct or incorrect), although SignalR/Azure/DB are not a priori necessary components: you could also build the front-end using Play framework(for example), use Akka Cluster

Re: [akka-user] How to programmatically add children to a FSM actor?

2014-02-11 Thread Akka Team
Hi Nader, it is not completely clear to me what you mean, especially by the "Does not work" comment. Within an FSM you can create child actors just like in any other actor, using "context.actorOf(.., name)". Child actors enjoy the same kind of encapsulation from all others--including from thei

Re: [akka-user] Akka 2.1.4: Spurious Akka Timeouts

2014-02-11 Thread Akka Team
Hi Brian, the old remoting in Akka 2.1.x used a lock to protect the map which holds the connection information, which might be to blame here; the remoting layer was completely rewritten using actors for 2.2. Can you upgrade to 2.2.3 to see if that fixes the issue? (or if you can spare the time, it

Re: [akka-user] Re: Akka Clustering

2014-02-11 Thread Akka Team
Hi Amit, using Put will register the path of the given ActorRef in the registry. Since you are creating a Router, that path will be "/user/subscriberActor/c1" (or similar). In order to make it work you can either - not make it a Router (can your PubSub deliver more messages per second than

Re: [akka-user] Execute multiple Actor.Receive

2014-02-11 Thread Akka Team
Hi Jatin, the typical examples for composing different behaviors amounts to the orElse kind of construction, so you will have to build you little support trait yourself--there is basically one line missing in the code you show ;-) Regards, Roland On Tue, Feb 11, 2014 at 12:44 PM, Jatin Puri

Re: [akka-user] Agents on Android

2014-02-11 Thread Roland Kuhn
Hi Tim, sounds very reasonable; let us know what you find! Happy hakking, Roland 11 feb 2014 kl. 11:35 skrev Tim Pigden : > Hi > I'm just asking before I start > Seems the safest policy that's all > Thanks > Tim > > On 11 Feb 2014 09:10, "Akka Team" wrote: > Hi Tim, > > I’m not aware of any

Re: [akka-user] Re: Akka Clustering

2014-02-11 Thread Patrik Nordwall
Hi Amit, I suspect that it is because of the router. I guess that you do the Put from the SubscriberActor, which are child actors of the router, i.e. they have path "/user/subscriberActor/$x" What happens if you remove the Put from inside SubscriberActor, and instead register the router from the

[akka-user] [2.3.0-RC2] Cluster config problems with messages being dropped

2014-02-11 Thread Brian McGee
Hey, For local testing with Akka 2.2.x I had configured a simple cluster with a single seeder. For the hostname in various config sections I was using 0.0.0.0. After migrating to 2.3.0-RC2 I now get lots of "endpointWriter - dropping message ... arriving at [akka.tcp://cluster@0.0.0.0:2552] inb

Re: [akka-user] Akka IO Pipelines going away

2014-02-11 Thread Andrew Gaydenko
On Wednesday, January 22, 2014 11:21:46 AM UTC+4, rkuhn wrote: > > We know that people have been running their business on a 1.0 milestone of > Akka, or used the experimental Cluster successfully, and this has maybe led > to the expectation that even our experiments are highly reliable—which we

Re: [akka-user] Akka 2.1.4: Spurious Akka Timeouts

2014-02-11 Thread Brian Fowler
Hi Roland, Thanks for the response. Unfortunately can't migrate to 2.2.3 because of this issue https://groups.google.com/forum/#!searchin/akka-user/fowler/akka-user/I-rqfGbq7UE/Yd_DO3NxjZ8J https://www.assembla.com/spaces/akka/tickets/3860 Remote systems seem to lose connectivity in 2.2.3 and

Re: [akka-user] Swapping ActorRef on SupervisorStrategy

2014-02-11 Thread Oleg Zhurakousky
Hi Roland >From 'pure messaging' paradigm this is not all that futuristic, just and ErrorMessage. Although I do understand that you may want to encapsulate it inside of a higher level object (e.g., Message's payload with headers containing additional information), but that may be a whole different

Re: [akka-user] Agents on Android

2014-02-11 Thread Kurt Williams
I have used them, they work great. On Feb 10, 2014 1:59 AM, "Tim Pigden" wrote: > Hi - anyone tried using agents on Android? Any reason to think there would > be a problem? > > -- > >> Read the docs: http://akka.io/docs/ > >> Check the FAQ: http://akka.io/faq/ > >> Search

Re: [akka-user] Router - remote actors - pool

2014-02-11 Thread bryan hunt
Awesome, that's exactly what I was looking for, thanks Roland! On Tuesday, February 11, 2014 10:15:05 AM UTC, Akka Team wrote: > > Hi Bryan, > > this feature already exists (although it is currently somewhat > under-documented with respect to being available in conjunction with > remoting): > >

Re: [akka-user] Re: Akka Clustering

2014-02-11 Thread Amit Mula
Hello Patrik, registering the router from the outside worked. Thanks man. This I will now keep in mind while creating a router. Amit On Tuesday, 11 February 2014 18:23:38 UTC+5:30, Patrik Nordwall wrote: > > Hi Amit, > > I suspect that it is because of the router. I guess that you do the Put >

Re: [akka-user] ASP.NET to Akka through Azure/AWS message queue

2014-02-11 Thread Angel Java Lopez
I have no experience in your setup nor akka. But I worked in a team using: ASP.NET MVC (Web API? I don't remember, no SignalR in those days), Azure Queue, Azure Worker for a turn-based game, with real-time action (not a chess-by-email) My experience: Latency counts (and Azure Queues was part of

Re: [akka-user] Swapping ActorRef on SupervisorStrategy

2014-02-11 Thread Diego Balduini
Hi Oleg, I will try doing something with become like your sample and see whats happens. Thank you for the reply On Monday, February 10, 2014 7:27:31 PM UTC-2, Oleg Zhurakousky wrote: > > What if you consider Hot Swap Actor, then you could rely on > become(behavior). > Pseudo-coding: > class Ca

Re: [akka-user] Swapping ActorRef on SupervisorStrategy

2014-02-11 Thread Diego Balduini
I will change it to val, thank you On Tuesday, February 11, 2014 8:58:45 AM UTC-2, Akka Team wrote: > > Hi Diego, > > apart from style questions (like using a sealed State trait instead of an > Int), there is just one thing: you might want to use `val` instead of `def` > when declaring the super

Re: [akka-user] Sending Actor Ref to remote machine and using them to connect.

2014-02-11 Thread √iktor Ҡlang
On Tue, Feb 11, 2014 at 3:58 PM, Tarun Arora wrote: > Hello, > > is it possible that ActorRef is transmitted to another system via actor > message, and then used at the target to connect? > Yes > > as per the akka docs it says it should be possible > http://doc.akka.io/api/akka/2.3-M2/#akka.a

[akka-user] Sending Actor Ref to remote machine and using them to connect.

2014-02-11 Thread Tarun Arora
Hello, is it possible that ActorRef is transmitted to another system via actor message, and then used at the target to connect? as per the akka docs it says it should be possible http://doc.akka.io/api/akka/2.3-M2/#akka.actor.ActorRef (ActorRefs can be freely shared among actors by message p

[akka-user] How to best handle async callbacks from provided 3rd party java library

2014-02-11 Thread shooali
Hi, I am new to Akka os I apologise in advance if this is too simple. I starting to write an application that is supposed to handle incoming events from a 3rd party server. The connection is proprietary and I need to use their library in Java in order to communicate with it. The way it works i

Re: [akka-user] How to best handle async callbacks from provided 3rd party java library

2014-02-11 Thread Akka Team
Hi Shooali, if you are given only that interface, then creating your own Thread is probably the best thing to do. Tying it to an Actor only makes sense if you have a way to make that Client loop stop when the actor is shut down (i.e. you can call something in postStop() which will then eventually

Re: [akka-user] akka cluster seed nodes on ec2

2014-02-11 Thread Timothy Perrett
Hey Roland - doesnt "always on" sound like "will never fail"... ? I wouldn't be comfortable manually managing that cluster, so it would need an ASG, which in turn will remove the oldest node when shrinking, so over time you'd end up loosing all your original seed nodes if your cluster is expand

Re: [akka-user] akka cluster seed nodes on ec2

2014-02-11 Thread Patrik Nordwall
Hi Tim, You can use whatever nodes as seed nodes, except for when you start up a fresh cluster from scratch. When you start a node you can use the AWS API to discover other EC2 instances and use all or a few as seed nodes. The special case is when starting a new cluster, and then I imagine that y

Re: [akka-user] akka cluster seed nodes on ec2

2014-02-11 Thread James Bellenger
Hi Tim, We have a similar-ish setup over here. We ended up registering all nodes in zookeeper and doing discovery through that. This works well for initial cluster startup as well as nodes joining an existing cluster. It also works well for hybrid environments that are not all on aws. On Tue, Feb

Re: [akka-user] How to best handle async callbacks from provided 3rd party java library

2014-02-11 Thread shooali
Thanks for the prompt reply. I have a way to stop it. Just to clarify things for me: Is the first option better then the second? Thanks On Tuesday, February 11, 2014 5:50:37 PM UTC+2, Akka Team wrote: > > Hi Shooali, > > if you are given only that interface, then creating your own Thread is >

Re: [akka-user] How to best handle async callbacks from provided 3rd party java library

2014-02-11 Thread Roland Kuhn
Hi Shooali, 11 feb 2014 kl. 21:05 skrev shooali: > Thanks for the prompt reply. > > I have a way to stop it. Just to clarify things for me: > Is the first option better then the second? I don’t know what first and second refer to, but given the information available so far I would recommend st

Re: [akka-user] Using Akka cluster to build a SOA framework?

2014-02-11 Thread Giovanni Botta
Roland, Thanks for the reply. I do agree that having individual actors wrap each transaction might be the way to go. I will cook up a little demo and send it over your way so you can decide if it's worth adding to the docs. Ian, I am aware of the Camel module. I'll definitely check it out and di

Re: [akka-user] Using Akka cluster to build a SOA framework?

2014-02-11 Thread Roland Kuhn
Hi Giovanni, 11 feb 2014 kl. 17:22 skrev Giovanni Botta: > Roland, > Thanks for the reply. I do agree that having individual actors wrap each > transaction might be the way to go. I will cook up a little demo and send it > over your way so you can decide if it's worth adding to the docs. Sound

[akka-user] Re: Swapping ActorRef on SupervisorStrategy

2014-02-11 Thread Diego Balduini
Hello, After refactoring my code following your tips, this is what i've came to. Don't know if it is the best solution, but it works, its prettier than the last one and i could remove all vars. Thank you all. Regards, Diego. > class CacheSupervisorActor extends Actor with ActorLogging { > >

Re: [akka-user] clean cluster exit

2014-02-11 Thread James Bellenger
Thanks for the followup Roland Bonus Followup Round! This original issue came up in looking at the cluster sharding support in 2.3.0-RC2 We like to use "ephemeral" cluster nodes with random akka ports. After the cluster shuts down, the first node that comes up and becomes ShardCoordinator recovers

Re: [akka-user] clean cluster exit

2014-02-11 Thread Patrik Nordwall
Hi James, On Tue, Feb 11, 2014 at 9:21 PM, James Bellenger wrote: > Thanks for the followup Roland > Bonus Followup Round! > > This original issue came up in looking at the cluster sharding support in > 2.3.0-RC2 > We like to use "ephemeral" cluster nodes with random akka ports. After the > clu

Re: [akka-user] ConfigFactory caching Config objects

2014-02-11 Thread Shannon Lloyd
We were originally looking at Archaius for our application, because we need to be able to detect changes to the config at runtime (to support things like programmatic reconfiguration of loggers - just an example), but we prefer Typesafe Config's config format over plain properties files (gives

Re: [akka-user] How to best handle async callbacks from provided 3rd party java library

2014-02-11 Thread shooali
Hi Roland, The second option was to have my own Main class (extends App...) which starts a thread listening to the event and also starting an ActorSystem explicitly. Thanks a lot for the help. On Tuesday, February 11, 2014 10:18:39 PM UTC+2, rkuhn wrote: > > Hi Shooali, > > 11 feb 2014 kl. 21:

Re: [akka-user] clean cluster exit

2014-02-11 Thread Roland Kuhn
My guess is that James means that the processor does not get any persisted events from the log because its ID includes host and port. For a “mobile” Processor like that it is best to choose a processorId which does not contain these data, e.g. by using self.path.toStringWithoutAddress. Regards,

Re: [akka-user] ConfigFactory caching Config objects

2014-02-11 Thread √iktor Ҡlang
Hi Shannon, This sounds completely unrelated to Akka, I propose discussing it over at https://github.com/typesafehub/config/issues On Tue, Feb 11, 2014 at 9:33 PM, Shannon Lloyd wrote: > We were originally looking at Archaius for our application, because we > need to be able to detect changes

Re: [akka-user] master/master or disconnected mode example ?

2014-02-11 Thread Joseph Pachod
Hi Oleg Thanks for your answer :) Well, I worked on some homegrown EDA framework which had support for master/master and events replaying, so I guess I was starting with too much expectation. Anyway, regarding akka-persistence, there's no support out of the box for master/master. If a local inst

[akka-user] Akka Remote Controller / Workers getting disconnected and quarantined

2014-02-11 Thread HARSH PATEL
*Remote Controller System:* Code: private final ActorRef reaper = getContext().actorOf(Props.create(Reaper.class), "reaper"); private final ActorRef router = getContext().actorOf(Props.create(Worker.class).withRouter(new RemoteRouterConfig(new RoundRobinRouter(10), getNodes())), "router"); get

Re: [akka-user] master/master or disconnected mode example ?

2014-02-11 Thread Oleg Zhurakousky
> whether akka would be right the right tool for the job to be fair you have to try few to answer that ;) Cheers Oleg On Tue, Feb 11, 2014 at 5:48 PM, Joseph Pachod wrote: > Hi Oleg > > Thanks for your answer :) > > Well, I worked on some homegrown EDA framework which had support for > master/

[akka-user] Agents and futures

2014-02-11 Thread partycoder
Hello, I have a question. val f = some future val a = Agent(some type) // This may cause an ordering problem f map { result => a.send(result) } How do I use agent.send/sendOff using futures? Regards -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: http://

[akka-user] Configure cluster nodes n AdaptiveLoadBalancingPool dynamically

2014-02-11 Thread Zoran Jeremic
Hi, I've implemented Akka cluster where I have one master node that initialize cluster in the following way: AdaptiveLoadBalancingPool pool = new AdaptiveLoadBalancingPool( > MixMetricsSelector.getInstance(), 0); > ClusterRouterPoolSettings settings = new ClusterRouterPo

Re: [akka-user] master/master or disconnected mode example ?

2014-02-11 Thread Martin Krasser
Hi Jospeh, On 11.02.14 23:48, Joseph Pachod wrote: Hi Oleg Thanks for your answer :) Well, I worked on some homegrown EDA framework which had support for master/master and events replaying, so I guess I was starting with too much expectation. Anyway, regarding akka-persistence, there's no