In the actorโs model, the actors have a kind of message loop where messages are matched, for example, pattern matching (depending on the language c)
eg. pseudo F #
let message_loop() = let! message = receive_message()
To a large extent, the signature of the message is mapped and associated with some actions to execute the message content.
Is there any conceptual difference between this and calling real methods? for example, if I do the following in C # 5:
class MyActor {
Thus, a method call on MyActor will result in an asynchronous message message sent to a message queue that processes only one kind of message; act. However, the behavior associated with the message is contained in the message itself (published from a public method).
So will this be considered a clean way to do actors in C # 5 / Async CTP?
The benefits would be that messages are simply defined as regular messages, rather than creating fuzzy messages like DTO classes.
So will it be enough to make it work?
source share