I think for "*2\ Can actors have states ?*" the documentation is clear 
enough :

> One actor, which is to oversee a certain function in the program might 
> want to split up its task into smaller, more manageable pieces. For this 
> purpose it starts child actors which it supervises 

...  

The quintessential feature of actor systems is that tasks are split up and 
> delegated until they become small enough to be handled in one piece

 I have not yet seen how a parent can create child but I think it will be 
clear soon.


On Thursday, 29 September 2016 15:30:43 UTC+2, Massim0 wrote:
>
> Hi There,
>
> I have a (Java) application that collect information form various sources 
> (SCM, Execution envs, Issues tracker, ..) with the goal of identifying "
> *violations*" on our *products* (New component found, New dependency 
> found, No sources for project, Wrong name, ..) and publish them as events.
> It work and start to gain attention from colleagues but some tasks are 
> really long and while the code seems clear, it will become hard to reason 
> in term of responsibilities. That's why I would like to evolve to Akka but 
> I don't have any experience with Akka and would have a clear view on the 
> "how to" before starting.
>
>
> *1\ Is it a good use case for Akka ?*
> I would like to make the whole system as much asynchronous as I can 
> because some inspections are really slow. But also because I rely mainly on 
> conventions and that when they are not followed I got exceptions and the 
> system crash. While with Akka I can publish the error as violation and 
> continue.
>
> *2\ Can actors have states ?*
> I'm not speaking of finite state machine but more about "context". In the 
> hello world tutorial, the Greeter actor has one `*var *message`. That 
> means that If I send it three different `WhoToGreet(name)` before `Greet` 
> then it is only the latest name that will be used. That seems a little 
> weird so I think an usual pattern will be to create multiple instances of 
> the same actor. In my case I should have one `Actor` per *Product* that 
> will spawn one actor per kind of *violation*.
>
> If that is the correct way of working, is it the role of the parent actor 
> to create the child `ActorRef` of should I use another mechanism (which 
> one ?)
>
> *3\ Where to put the business code ?*
> I have the notion of *inspector* that detect one kind of violation. And 
> some services to obtains raw information. May I merge them within my actors 
> or just call them from the actors ?
>
> Thanks a lot for your replies.
>

-- 
>>>>>>>>>>      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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to