>  Then, if understand well, Actors are like cell, in other words when the 
> system starts all the Actors must be instantiated and will be persistent. 
>

Not necessarily. You could have an actor configuration that starts with 
only one actor. You could think of that actor as a seed out of which an 
entire configuration of actors would grow. If your "seed" actor handles web 
requests, then it could *create* a new actor to handle every request that 
comes in. The per-request actor could then *create* more actors to handle 
various aspect of the request. When the request is complete, and a response 
is sent back to the originator of the request, every one of those actors 
could then be destroyed. (The abstract actor model does not talk about 
destroying actors much because it assumes infinite storage). 
 

> The part I don't understand well its, when the actor finished their job it 
> calls the method (in node will be a callback) "next", where it pass a 
> message, here I'm conceptually lost, isn't like an express app (i.e) where 
> you just res.send(message), or maybe its so but how I build a "response" 
> system.
>

I guess the first step would be to highlight that the "next" callback 
should accept more than one message (an actor can send any finite number of 
messages in the process of handling one message). I would say that express 
app is a bad analogy/model to think of when thinking of actors. 
 

> Another recommendation about the fork, spawn or just require method, which 
> you consider the best? Lets say the pros of fork / spawn will be if they do 
> hard computation it doesn't freeze the main process, but in node it will be 
> using a lot of ram (20mb per fork).
>

The fork/spawn will not scale to millions of actors. It won't even scale 
well into hundreds of actors. That's a big downside. An elaboration of the 
require method could maybe work, but it would have to address the problem I 
outlined with maintaining state information.
 

> I'm coming from the web world so distributed computation is another world 
> to me, so how do you structure the actors? How the system will know which 
> actor is supervisor of which actor / groups, the only reference I see was 
> akka and it does in the configuration.
>

Another part of the actor model is how addresses become known, this sort of 
relates to how will actors know about one another. The usual propagation of 
this knowledge is encapsulated in the following "rules" of how an Actor 
finds out about another.

An actor can know it's own address.
An actor knows the addresses of the actors it creates directly (children).
When an actor is created, it can be given addresses of other actors 
(siblings).
An actor can receive an address of another actor in a message.

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to