Re: VatTP and Waterken protocols compared
Bill Frantz <[email protected]>
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Message-ID | <r02010500-1049-272B7517883611DDBAE00030658F0F64@[192.168.1.5]> |
[email protected] (Tyler Close) on Sunday, September 21, 2008 wrote: >On Sun, Sep 21, 2008 at 2:20 PM, Ben Laurie <[email protected]> wrote: >> On Sun, Sep 21, 2008 at 2:17 PM, Tyler Close <[email protected]> wrote: >>> On Sun, Sep 21, 2008 at 12:29 PM, Ben Laurie <[email protected]> wrote: >>>> Also, an evil recipient can stall the sender by never processing messages. >>> >>> The sender has an independent message queue for each recipient host, >>> so an evil recipient can only stall its own reception of messages. >>> Other recipients are not affected. >> >> So what happens when the sender tries to queue a message to the full queue? > >There's no notion of the sender's queue being full. If an application >is worried about this kind of resource exhaustion, it can keep track >of its outstanding messages and stop sending them when appropriate. When I think about these issues, I think about a program which wishes to invoke a remote operation on each member of a large collection class. The naive approach is to enumerate the collection class and send a message, with a promise for the result, for each member. In E on Java, if the remote processing is slower than the communication system, the remote vat queue will fill up and generate an out-of-memory exception. In Waterken, the sending vat will be blocked on the send via TCP backpressure. If the only function of the sending vat is to get answers for each member, then this result is fine. If the remote end continues to process messages, then eventually the local end will get all its messages sent and get the answers. The other case is Ben's evil recipient. In that case, the local vat will never get the answers, and how it fails to not get them is less interesting. There are two cases where the local vat needs to be aware of the problem: (1) It has other functions it must perform, and must remain responsive for them. (2) It has other remote vats that also could provide the answers it needs. Cheers - Bill ----------------------------------------------------------------------- Bill Frantz | There are also no libertar- | Periwinkle (408)356-8506 | ians in financial crises. | 16345 Englewood Ave www.pwpconsult.com | - Jeff Frankel | Los Gatos, CA 95032