This page is no longer maintained — Please continue to the home page at www.scala-lang.org

remote actor mailbox capacity... credit control flow

No replies
cminter
Joined: 2009-04-27,
User offline. Last seen 1 year 29 weeks ago.

At the Scala Lift Off conference there was a session on actors and how the several actor implementations might converge to agree on a common API.

Philipp Haller and David Pollak were the main people talking whose names I could remember (sorry, I didn't catch the names of other people talking).


A sub-topic that came up was how mailbox capacity could be dealt with.  There were a bunch of interesting points about whether the sender should block and timeout or an exception should be thrown.  But the point of this message is that I just wanted to suggest a mechanism to solve a different aspect of the problem... remote actor mailbox capacity.


I think one nice way to deal with remote actor mailbox capacity would be using "credit control flow" or "link credits".  I'm not an expert on this, I am familiar with it through Intel's Quick Path Interconnect (QPI) (http://en.wikipedia.org/wiki/Intel_QuickPath_Interconnect ) but I know it has earlier hardware implementations in ATM networks.  Credit control flow allow allows you to not overflow the receiver's buffers by having the sender keep track of credits.  Basically, each sender has a number of credits given to it from the receiver (or an agreed upon number of credits).  The sender must have a credit to send and decrements the credit count when it sends.  Periodically the receiver returns credits to the sender once it consumes messages from its buffer.


So.... the benefit of 'credits' is that you can remain asynchronous as long as you have the credits to send on a link.  In a software implementation it might be worth piggybacking return of credits on other messages.  But after a timeout with no messages on a link you could force a separate credit message.


Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland