[E-Lang] Ordering
Jonathan A Rees
jar1@mumble.net
Thu, 19 Jul 2001 21:31:00 -0700
[Forwarded by permission. --MarkM]
Markm, I remember you saying you had to be dragged "kicking and
screaming" to accepting ordering constraints on promise resolution.
Now I can't find this message (tried skimming erights.org and the
e-lang archive, and tried Google on both), and even if I were to find
it I don't think it had a pointer to the argument that eventually
swayed you.
I find the argument in Walnut persuasive, but unprincipled.
I assume you began with the position that message passing is like
using the post office or IP: If I mail my bank a deposit on Monday and
a withdrawal on Tuesday, and the withdrawal can only be covered by the
deposit, then I am stupid, since the post office provides no ordering
guarantees. But if I do the deposit at an ATM on Monday and the
withdrawal at an ATM on Tuesday, I can expect to be covered (modulo
the fact that the banking system doesn't *really* provide guarantees
like this, but let's ignore that). The ordering constraints make
sending to an object begin to be like interacting with the object, and
is generally useful.
But by making sender and/or receiver identity figure in message
passing semantics, it becomes difficult to employ an agent, yes? That
is, suppose I do the deposit, then ask (and authorize) my agent to do
the withdrawal. Can't the two messages get out of order, if the
triangle inequality doesn't hold (sending from me to bank takes longer
than me to agent + agent to bank)? Using the postal system, the bank
and I would agree on some kind of ordering abstraction that allows me
to communicate ordering to the bank (e.g. using serial numbers - like
TCP on top of IP). If this mechanism is explicit (instead of bundled
with message passing semantics), designating an agent is
straightforward - I give the agent access to the object or other
apparatus that I was using to implement the ordering constraint
(e.g. a stream or counter - and I believe there the computer science
lit is full of clever distributed algorithms for doing things like
this), or just give it a serial number to use directly, or something.
I hope I'm merely ignorant here. Perhaps there's more to E message
ordering than what's in Walnut. I haven't been following all the
messages about ordering and streams; and the volume makes it difficult
to track down answers to questions like this. If my question is not
mere ignorance, feel free to re-send to e-lang.
The reason I want to know this: I'm trying to convince a project to
use Elib, and am getting "but promises are so complicated". I want
their defense to be as good as it can be.
Thanks much
Jonathan Rees