<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr"><p style="box-sizing:border-box;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,system-ui,'Segoe UI',Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:14px;font-variant-ligatures:normal;margin-top:0px">Disclaimer: this was work done during my graduate study. It was presented in front of an audience that included Gul Agha who appreciated the work.</p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,system-ui,'Segoe UI',Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:14px;font-variant-ligatures:normal">The Actor model is great concurrency model to build on top of thanks to its data isolation and asynchronous message processing properties. However, lack of guarantees to control the order in which messages are processed by an actor makes implementing synchronization and coordination patterns difficult in the Actor model. Solutions to support such order in processing constraints may require the actor to buffer messages and resend the messages to itself until the message is processed. The resulting code is a petri-dish of code that intertwines both algorithmic logic and synchronization constraints.</p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,system-ui,'Segoe UI',Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:14px;font-variant-ligatures:normal">I would encourage you to look into the Selector model which is an extension of the Actor model that allows an actor to have multiple mailboxes. These mailboxes can be enabled/disabled to control which message is processed next by the selector (in many ways this is similar to a select operation among multiple channels in Communicating Sequential Processes style programs). Enabling/disabling does not affect which messages are accepted at a mailbox. </p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,system-ui,'Segoe UI',Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:14px;font-variant-ligatures:normal">In essence, an actor is a selector with a single mailbox which is always enabled. Selectors simplify writing of synchronization and coordination patterns using actors such as:<br></p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,system-ui,'Segoe UI',Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:14px;font-variant-ligatures:normal">a) 'synchronous' request-reply,<br style="box-sizing:border-box">b) join patterns in streaming applications,<br style="box-sizing:border-box">c) supporting priorities in message processing,<br style="box-sizing:border-box">d) variants of reader-writer concurrency, and<br style="box-sizing:border-box">e) producer-consumer with bounded buffer.</p><p style="box-sizing:border-box;margin-top:0px;color:rgb(36,41,46);font-family:-apple-system,system-ui,'Segoe UI',Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:14px;font-variant-ligatures:normal;margin-bottom:0px"><br></p><p style="box-sizing:border-box;margin-top:0px;color:rgb(36,41,46);font-family:-apple-system,system-ui,'Segoe UI',Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:14px;font-variant-ligatures:normal;margin-bottom:0px">Relevant links:<br style="box-sizing:border-box"><a href="http://dl.acm.org/citation.cfm?id=2687360" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none" target="_blank">http://dl.acm.org/citation.<wbr>cfm?id=2687360</a><br style="box-sizing:border-box">Detailed description: <a href="https://shamsimam.github.io/papers/2014-agere-selector.pdf" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none" target="_blank">https://<wbr>shamsimam.github.io/papers/<wbr>2014-agere-selector.pdf</a><br style="box-sizing:border-box">Slides: <a href="https://shamsimam.github.io/papers/2014-agere-selector-slides.pdf" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none" target="_blank">https://shamsimam.<wbr>github.io/papers/2014-agere-<wbr>selector-slides.pdf</a></p></div>
</div><br></div>