Question

I was wondering what is the actual difference between Kahn Process Network and Actor Model. Indeed, if I look up at the definition, they both are models in which computational entities (called Actors in both cases...) exchange messages via unbounded buffers. Moreover, in both cases, these messages are sent asynchronously since a procedure can always send a message. It does not need to wait for the recipient to be ready to receive.

Hence my question, is there any actual difference ?

Thanks a lot !

Was it helpful?

Solution

Kahn process network is guaranteed to be deterministic. All the FIFO connections between processes are priorly known and they do not dynamically alter during the course of execution. In contrast, in case of Actor model (quoting wikipedia) :

in response to a message that it receives, an actor can make local decisions, create more actors, send more messages, and determine how to respond to the next message received.

Actor model, therefore is not guaranteed to be deterministic. Quoting Wikipeda :

The Actor Model features unbounded nondeterminism which was captured in a mathematical model by Will Clinger using domain theory.

Another important distinction is how the communication takes place

In case of KPN - to preserve determinism, all communication is through FIFO channels. But there is not such requirement in case of Actor model. Quoting Wikipedia :

[In KPN there is] No requirement on order of message arrival [....] If output message ordering is desired, then it can be modeled by a queue Actor that provides this functionality. Such a queue Actor would queue the messages that arrived so that they could be retrieved in FIFO order. So if an Actor X sent a message M1 to an Actor Y, and later X sent another message M2 to Y, there is no requirement that M1 arrives at Y before M2.

In this respect the Actor model mirrors packet switching systems which do not guarantee that packets must be received in the order sent. Not providing the order of delivery guarantee allows packet switching to buffer packets, use multiple paths to send packets, resend damaged packets, and to provide other optimizations.

As is quite clear from the above discussion, KPN is a much more constrained scenario which can be modelled using the actor model by adding additional restrictions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top