[fpc-pascal] Acitve Object Messaging Library

Werner Van Belle werner at yellowcouch.org
Mon Apr 5 19:31:46 CEST 2010


Michael Van Canneyt wrote:
> MPI is for passing messages between parallel running tasks. (the name
> means Message Passing Interface)
> This is what Active Objects does.
>
> To me, the difference seems that Active Objects runs within a single
> process, and MPI allows to run the tasks in different processes, even
> on different machines.
That is correct. The active objects can run multple tasks with a choosen
number of threads, all within the same process. By default, each active
object has its own associated thread.

MPI on the other hand can send messages accross multiple machines and
processes. This requires either a shared memory or a serialization
layer, neither of which I looked into.

Historically, the main reason I wrote this was because the thread
management in BpmDj (http://bpmdj.yellowcouch.org/) had become a
nightmare and the only sensible way to deal with this was thinking in
terms of message queues. Implementing that however was remarkably hard.
Especially the fairness requirement was hard to solve. E.g: 1000 tasks
sending messages to 1 task should not keep that one task from performing
work.
> It seems to me that there are more parallels between MPI and Active
> Objects
> than you think. Both are tools for parallel (sic) computing, after all.
Well, I would say: give it a try. If somebody feels it would be useful
to extend it accross process by adding an extra new class that would
serialize a message before sending it to a target, that would be
interesting. However, in that case, we must think about passing a local
stub through a message to a remote active object. That would require the
serializer to deseriealize this 'local stub' to either the local active
object or to a new stub that connects to the originally intended remote
active object. So, this will heavily depend on the serialisation and
deserialisation capabilities of fpc. And of course, I have no experience
with that as such.

Wkr,

-- 
http://werner.yellowcouch.org/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20100405/a7f0b4d1/attachment.sig>


More information about the fpc-pascal mailing list