[fpc-pascal] Actor Model implementation in Pascal

Sven Barth pascaldragon at googlemail.com
Sun Mar 13 22:35:25 CET 2011


Am 13.03.2011 22:30, schrieb Jorge Aldo G. de F. Junior:
> yes, its a kind of message passing.
>
> but mine is in native pascal and i have no intention of making
> bindings for other languages...
>
> its wayyy simpler than mpich too. you just pass TObjects back and
> forth from threads.
>
> (I understand that TCustomMessage is way too restrictive, so i am
> planing to develop a kind of interface based model, so you can pass
> arbitrary objects around).
>
> it simplyfies thread programming a lot, at a cost of a little overhead.
>
> the switchboard (the thing that routes messages between threads) is
> itself a class factory, so your threads can start/stop other threads
> (called 'actors" in this context) and send message to them.
>
> the default actor implementation is event based, where the class name
> of the object received triggers an dispatchstr... but i am looking for
> other ways to deal with message receiving.
>
> if you dont like this model you can override TActorThread.Execute and
> do business your own way...
>
> As it is a simple implementation in native pascal, theres no concept
> of security or whatever.
>
> later i can add blowfish encryption to the TCP/IP part of the thing
> and message authentication using SHA1
>
> (TCP/IP streaming of messages across machines, for this little library
> "Pascal-Actor-Model", is the reason behind so many questions i've sent
> to this mailing list about multi-threading, blowfish and SHA1
> encryption...)

I might look at this once I have a usecase for it (currently I have 
rather single threaded problems to solve :P ). Thank you for sharing, 
though.

Regards,
Sven



More information about the fpc-pascal mailing list