2 Replies Latest reply on Nov 21, 2007 11:44 PM by trustin

    One-way messages in Remoting 3

    dmlloyd

      I've been thinking about what Trustin said when we met a number of weeks ago, about one-way messages, delivery guarantee, and how it is implemented.

      Trustin's point back then was that a one-way message is actually very similar to a Request. It is simply a Request with no return value, or a return value that is ignored.

      Using Requests one can simulate all the desirable delivery guarantee levels. The "fire and forget" model can be done by doing an asynchronous send and just ignoring the returned FutureReply. Delivery guarantee can be done by using a synchronous invocation, and having the remote service just return the reply immediately (before processing the message). And a guaranteed completion can be done just by doing a regular request (but with no reply value).

      So I'm thinking that these interfaces should be unified. It will cut down on code and simplify the implementation of services as well.

      Thoughts?

        • 1. Re: One-way messages in Remoting 3
          mazz

          +1 to this.

          I implemented a guaranteed delivery mechanism on top of Remoting2 that did just this. Asynchronous sending and it just ignores the return value.

          I'm looking forward to seeing how Remoting3 can implement this for me using a better guaranteed delivery model than what I used :)

          But the concepts you present sound good and its a model I know works at least :)

          • 2. Re: One-way messages in Remoting 3
            trustin

            Great idea. (Yeah, my idea sometimes makes a sense, hehe!)