Out of the several specifications, a problem I find is they all use
serialized messages as a byte string as part of the message.  That's
inefficient and in the case of C++ involves triple-copying - from
socket buffer to kernel buffer to user buffer to parsed message.  At
the very least that last copy should be avoided (from what I know the
first two can't be avoided at the current moment unless you have
sophisticated hardware).

Also the java version tries to do too much, adding the ability to
query what methods are available.  I think that's best done as a
default RPC service on top of the RPC layer (as in, every rpc server
has a rpc method called "GetKnownMethods()" for example).  Agreeing
with most people here, extra layers like security should be done in
the layer above or below (think RPC over https).

After stripping that all down, you can have a simple protocol such as:
message RpcRequestHeader {
  required uint32 id = 1;
  enum RequestType {
    REQUEST  = 0;
    CANCEL   = 1;
  }
  optional RequestType type = 2 [default = REQUEST];
  optional string service_name = 3;
  optional string method_name = 4;
}

where every request would send the request header message, followed by
the request message.  Each message is sent as a length/serialized-
message pair, where length is a varint64.  This is what I'm doing so
far as an experimentation in implementing C++ based rpc.

Frank

On Oct 28, 2:37 pm, "Paul P Komkoff Jr" <[EMAIL PROTECTED]> wrote:
> On Tue, Oct 28, 2008 at 9:07 PM, Pavel Shramov <[EMAIL PROTECTED]> wrote:
> > By the way one of the simpliest ways for RPC is to use HTTP transport.
> > It's have some limitations (e.g large overhead for small messages) but
> > also some benefits (e.g many libraries for performing HTTP calls and
> > simple proxying)
>
> Speaking of ugly hacks, one of the intermediate versions of rpc I used
> were, actually, protocol buffers over xmlrpc. messages were serialized
> and then wrapped into xmlrpc.Binary
>
> --
> This message represents the official view of the voices in my head.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to