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}
-----------------------------------------------------
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}
-----------------------------------------------------
Since this is very early in this, I wondered if others would have views
on this.
http is quite verbose for sending protobuf message around, but it is
likely to be implemented for a lot of languages.
Regards,
Romain
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/Gq7i : ohloh
|- http://tr.im/FtUu : new package : highlight
`- http://tr.im/EAD5 : LondonR slides
--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To post to this group, send email to prot...@googlegroups.com.
To unsubscribe from this group, send email to protobuf+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
On 12/09/2009 09:12 PM, Kenton Varda wrote:
> Coincidentally, last weekend I started working on an open source
> protobuf-based RPC system. Currently I am defining a socket-level
> protocol, but I also intend to support an HTTP-level protocol with
> optional JSON encoding to allow calls from Javascript. I stuck some
> totally undocumented code here:
Thanks. My intention of having it over http is that it can communicate
with other languages. I'd be good if we can synchronize our protocols.
I need to make some changes based on what you said on another thread,
and then I'll make my java basic server code available.
> http://pbcap.googlecode.com
>
> But some coworkers pointed out that the name is confusingly similar to
> "pcap", so I'm planning to change it.
>
> Currently this is not an official Google project; I'm working on it in
> my spare time.
>
> 2009/12/9 Romain François <francoi...@free.fr
--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To post to this group, send email to prot...@googlegroups.com.
To unsubscribe from this group, send email to protobuf+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
On 12/09/2009 09:12 PM, Kenton Varda wrote:Thanks. My intention of having it over http is that it can communicate with other languages. I'd be good if we can synchronize our protocols.
Coincidentally, last weekend I started working on an open source
protobuf-based RPC system. Currently I am defining a socket-level
protocol, but I also intend to support an HTTP-level protocol with
optional JSON encoding to allow calls from Javascript. I stuck some
totally undocumented code here:
I need to make some changes based on what you said on another thread, and then I'll make my java basic server code available.
http://pbcap.googlecode.com
But some coworkers pointed out that the name is confusingly similar to
"pcap", so I'm planning to change it.
Currently this is not an official Google project; I'm working on it in
my spare time.
2009/12/9 Romain François <francoi...@free.fr
<mailto:francoi...@free.fr>>
A request looks like this :
-----------------------------------------------------
POST /{service full name}/{method name} HTTP/1.0
I would recommend against putting the service type name in the URL.
This makes it impossible to export two services of the same type.
Instead, you should allow the application to register services under
any name it chooses.
Fair enough. Maybe adding some protobuf specific headers :
ProtobufService: {service full name}
ProtobufMethod: {method full name}
Cool. Do you have your layout documented somewhere in your project.
Embed service full name and method name in the http request as we do allows the request to be self-contained. What kenton suggests needs the client to know of the mapping between the service full name (in pb speech) and the http service name, which might then need an independant exchange before hand between the client and the server .
client: how do you call this service
server: foo
client: sending the http request using foo
Either way is fine. It would be good to all agree on what rpc over http means.
On 12/10/2009 10:15 AM, Marc Gravell wrote:
The layout in the original post looks a lot like how protobuf-net does
RPC over http. It uses {root}/service/method, but it would be trivial to
tweak it to use any similar pattern. I'd be happy to make tweaks to
protobuf-net to make it play the same game, and try a few
cross-implementation scenarios.
Marc
2009/12/10 Romain François <francoi...@free.fr<mailto:francoi...@free.fr>>
On 12/09/2009 09:12 PM, Kenton Varda wrote:
> Coincidentally, last weekend I started working on an open source
> protobuf-based RPC system. Currently I am defining a socket-level
> protocol, but I also intend to support an HTTP-level protocol with
> optional JSON encoding to allow calls from Javascript. I stuck some
> totally undocumented code here:
Thanks. My intention of having it over http is that it can communicate
with other languages. I'd be good if we can synchronize our protocols.
I need to make some changes based on what you said on another thread,
and then I'll make my java basic server code available.
> http://pbcap.googlecode.com
>
> But some coworkers pointed out that the name is confusingly
similar to
> "pcap", so I'm planning to change it.
>
> Currently this is not an official Google project; I'm working on
it in
> my spare time.
>
|
internal const string HTTP_RPC_VERSION_HEADER = "pb-net-rpc"; |
| internal const string HTTP_RPC_MIME_TYPE = "application/x-protobuf"; |
So xxx?method=method&service=service is more close to me.
It is so we'll trying to find common point...
> It is easy enough for me to encode the request in your format if I
> wanted to be able to interchange with your server, but is it not better
> to all use the same ...
As last resort we may define set of calling conventions for clients.
Pavel
--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To post to this group, send email to prot...@googlegroups.com.
To unsubscribe from this group, send email to protobuf+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
It's great news that you working on a standard way to communicate
between Protocol Buffers implementations!
I think its handy to export several services from the same end point,
> You don't need to send the service name at all. The server should already
> know what kind of service it is exporting.
especially if you are running RPC over something else than HTTP. If
you were to run Protocol Buffers RPC over plain sockets you'd probably
want to publish a bunch of services on the same port.
On Thu, Dec 10, 2009 at 05:06:09PM +0100, Romain François wrote:For simplicity (from my point of view). Query string is here only to identify method
> > I'm using method name encoded in query part of URL like /base/url?Service.Method
>
> That seems odd. Why not /base/url?service=Service&method=Method instead ?
to call and not to pass parameters to it. So why to bother?
Interesting. Essentially a discovery service for protobuf RPC.
I am not quite sure what you mean by "pointers to other services". Is
it going to reference them by name or a more complex structure
containing full endpoint information?
Also, is it going to be an extension to pbcap or something completely
new?
The reason I am asking is because some patterns in pbcap (such as
wrapping up everything into a global Stream message) are rather
questionable and not without consequences.
To unsubscribe from this group, send email to protobuf+u...@googlegroups.com.
Will there be a way to directly connect to the service or a clientmust go thru the discovery service each time a connection is open?
> What do you mean? The global "Stream" message exists only to define theFrom pbcap.proto it looked to me as all requests and responses must be
> protocol. It is not actually used at runtime -- individual messages are
> read from the stream one at a time.
wrapped inside a Stream message. I guess I'll need to take a look at
the implementation before I ask more questions, I only had time to
take a quick peak earlier today.
To unsubscribe from this group, send email to protobuf+u...@googlegroups.com.
On Dec 10, 2009, at 18:33 , Kenton Varda wrote:I'm curious: Why have the Open request at all? Why not just "cal method Foo.Bar()"? Are you planning on supporting some concept of "sessions"?
client: "Open service Foo."
client: "When request 1 is complete, call method Bar() on the result."