On Wed, Dec 09, 2009 at 12:10:33PM +0100, Romain François wrote:
> Hello,
>
> Following Kenton's advice, I'm starting to look at implementing protobuf
> rpc over http. I have started to work on a basic java server (based on
> the com.sun.net.httpserver class). I will post this at some point when I
> am happier with it (currently it can only serve one dummy service that
> returns the input message as is)
>
> A request looks like this :
>
> -----------------------------------------------------
> POST /{service full name}/{method name} HTTP/1.0
> Connection: close
> Content-Length: {length of the serialized message}
>
> {raw bytes of the serialized message}
> -----------------------------------------------------
I'm using method name encoded in query part of URL like /base/url?Service.Method
Also it's seem useful to provide Content-Type to distinguish between different
encodings of message (for example JSON).
> And a successful response looks like this:
>
> -----------------------------------------------------
> HTTP/1.1 200 OK
> Content-length: {length of the serialized response}
>
> {raw bytes of the serialized response}
> -----------------------------------------------------
Also it may be useful to state that errors are transmitted as body of
500 Internal Server Error response.
For my implementation You may see [1] and [2] for python and C++ HTTP client.
Pavel
[1] http://grid.pp.ru/wiki/pbufrpc
[2] http://grid.pp.ru/cgit/pbufrpc
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To post to this group, send email to [email protected].
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.