[Rprotobuf-yada] bytes

Dirk Eddelbuettel edd at debian.org
Sat Sep 11 18:19:01 CEST 2010


Hi Koert,

On 11 September 2010 at 09:02, eckuipers-web at yahoo.com wrote:
| 
| Hey Dirk & Romain, 
| I just read both your replies. Thanks for getting back so quick. It's okay that 
| i missed the release, I will just use the SVN if/once you decide to switch to 
| raw.

Feel free to take the lead and work on a patch.  We are both pretty tied up
with other things, but would welcome such a patch as ...
 
| Getting to the raw bytes is particular important for RPC implementations, since 
| they almost all rely on this feature. This is how i ran into it: i was trying to 
| build a R client for my protobuf over zmq RPC implementation (soon to be 
| released open source).

... that for example sounds awesome!  I also have played with ZeroMQ and like
it.  

Getting RPC onto PProtoBuf, and in particular decent performance RPC (and
even Message Queing) would be sweet.  ProtoBuf is becoming a nice little
interface languages -- Drizzle (the database project that is in some ways a
reboot of MySQL) uses it for all internal data passing.

Cheers, Dirk

| To be specific: in RPC it is up to the channel implementation to get both the 
| request protobuf message and the function name across to the server for the 
| request. And for the response the server has to send back the response protobuf 
| message and possible errors. Naturally one wants to use protobuf for this. But 
| since the request message and response message are unknown classes from the 
| RPC's point of view, the only way to deal with them is as serialized raw bytes. 
| So most RPC implementations have their own proto file that looks something like 
| this:
| 
| 
| 
| message Request {
|   required string method = 1;
|   required bytes request = 2;
| }
|  
| message Response {
|   optional bytes response = 1;
|   optional string error = 2;
| }
| Best,
| Koert
| 
| 
| ----- Original Message ----
| From: Dirk Eddelbuettel <edd at debian.org>
| To: eckuipers-web at yahoo.com
| Cc: rprotobuf-yada at lists.r-forge.r-project.org
| Sent: Fri, September 10, 2010 6:54:46 PM
| Subject: Re: [Rprotobuf-yada] bytes
| 
| 
| Hi Koert,
| 
| Thanks for posting on-list! 
| 
| On 10 September 2010 at 15:19, eckuipers-web at yahoo.com wrote:
| | Dirk, Romain,
| | Why did you decide to represent the bytes field type by an R character vector? 
| 
| | Why not raw?
| | I have a message with a bytes field, and within R i cannot get to the bytes 
| | since the character representation cuts it off at the first null character it 
| | runs into, it seems. So charToRaw doesnt help me here either. 
| | 
| | Any suggestions?
| 
| Fair question. 
| 
| We just happened to have uploaded 0.2.0 which should be on CRAN tomorrow --
| did you check against the ancient version on CRAN or did you check against
| SVN?
| 
| Dirk
| 
| -- 
| Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
| 

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com


More information about the Rprotobuf-yada mailing list