42

Channels are Actors

 5 years ago
source link: https://www.tuicool.com/articles/hit/rqaMZbY
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
I highly recommend Simon Fowler's ECOOP 2017 lecture https://www.youtube.com/watch?v=lpbkIjjoMRk

However, channels are best understood as Actors with put and get messages so that aChannel.put[x] puts x in aChannel and aChannel.get[ ] gets from aChannel. A channel of type T has the following interface: Interface Channel<T> put[T] -> Void, get[ ] -> T

Actors can be categorically automatized, which means that up to a unique isomorphism, there is just one model that satisfies the axioms. In this way, Actors can be much more precisely defined in a general way than can be done using an extended lambda calculus as in Fowler's lecture.

Furthermore, a common misunderstanding is that an an Actor must have a mailbox, message queue, or event queue. There would be an infinite regress if any of these were required because since everything is an Actor, each of these would itself need a mailbox, message queue, or event queue. Instead, an Actor (e.g. a ReadersWriters scheduler) performs internal queuing when required. See https://www.amazon.com/Inconsistency-Robustness-Studies-Logi...

To get the latest, see my upcoming Code Mesh Keynote: https://plus.google.com/+CarlHewitt-StandardIoT/posts/BXSZ7Y...


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK