Groups 85 of 99+ julia-users › Is the Actor model for parallelism a good paradigm for Julia 3 posts by 3 authors Lyndon White Feb 1 Hi, So I do a lot of batch processing, for machine learning. I have a lot of RAM, 45Gb, and 12 cores. My normal method for parallel processing is to replicate any common shared read-only memory across all workers, using @everywhere. Then process my data with pmap, or a variation of my own pmapreduce. On my work yesterday, I couldnot replicate my common shared memory across all workers, as it was too large (17Gb). So I left it on processor 1, and told the workers to do a remotecall_fetch to retrieve it. This seems to have worked very well, as the workers quickly get out of sync so beg from processor 1 at different times. And processor 1 is normally unused til the worker are all done anyway. I was thinking about it after I went home, and realised that this was a very rough approximation of the Actor model (If I am recalling the Actor model correctly). What I am thinking, is I could have 1 worker per service -- where a service is combination of data and functions that operate on it. Which is more than 1 worker per core. When ever a worker needs that data, it remotecall_fetches the function on the services worker. (Potentially it does smarter things than a remotecall_fetch, so it is unblocking.) Is this sensible? Stefan Karpinski Feb 2 Actors in the actor model are somewhere between a Julia Task (shared memory, concurrent but not parallel) and a Julia Worker (separate memory, concurrent and parallel). Once Julia Tasks are actually parallel as well as concurrent (i.e. can run in separate threads), then the two will be even more similar. I'm not sure that we'll ever get to a straight up actor model since memory isolation is very expensive unless you have universal immutability (like Erlang). But it seems like a good idea to make the difference between local tasks and remote tasks as transparent as possible so that you can program across them uniformly when it makes sense. It's nice to hear that this model is working well for you. By having workers pull work when they're idle, you're effectively using a greedy form of dynamic work scheduling, which is similar to what pmap does. - show quoted text - Oliver Schulz Feb 18 Hi, in case you're interested, I'm working on a Julia task/channel based actor framework: https://github.com/daqcore/Actors.jl It's registered, but still in an early stage and doesn't support inter-proccess/inter-host actor messages yet - though I hope to add that soon. Also, it probably will need to change quite a bit once Julia multi-threading lands. :-) Cheers, Oliver - show quoted text -