2.0.3rc1

2008-11-25 Thread Kenton Varda
I just put a release candidate here:
http://groups.google.com/group/protobuf/files

Test and tell me what's broken.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: RESTful queries (GET) with Protocol Buffers

2008-11-25 Thread Dave Bailey

I was actually doing something similar recently.  I am not an expert
on web services or any of that, but I am using GET, with the
serialized message encoded as a URL-safe base64 variant (using '-'
instead of '+', and '_' instead of '/').  This makes it so that every
request can be represented as a URL.  The response content contains
the (similarly encoded) serialized object that contains the result of
the request/command/operation/whatever.  The only restriction that I
can think of is that some web servers may not like long URLs, but for
me, that is not an issue, since the encoded serialized messages are
never more than a few hundred bytes.

-dave

On Nov 25, 8:35 am, Michael Case <[EMAIL PROTECTED]> wrote:
> I'm trying to design a RESTful API using protocol buffers, which
> involves complicated searches with a lot of inputs.
>
> Searches, to me, should genereally be a GET.  We're not updating
> anything, we're just running a query, basically.  Now, simple searches
> are easily represented as a simple URL:  myapp.com/employees/12345
> returns the record for employee #12345, right?  But in my case there
> are a LOT of search parameters and filters specified, etc.., and its
> not very applicable to a URL.  But its still just a query.
>
> Using protocol buffers, we have a search-request message that
> encapsulates all the inputs.  I'd like to send that in lieu of the
> hairy URL, but GET doesn't (formally) support a request payload...
>
> I'm tempted to just use a POST, because its easy to send the request
> in the HTTP message body.  But technically, I think this violates
> RESTful principals.  I wonder if there are any recommendations that
> would allow me to be a purist?? :)
>
> Thanks,
> -Michael-
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Repeated message field in c pacakge

2008-11-25 Thread Kenton Varda
cc'ing Dave Benson, who maintains the only C port I'm aware of.

On Tue, Nov 25, 2008 at 8:54 AM, <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> I'm using the protocol buffers package for c. It's very useful and
> handy. However I've encountered a problem when trying to use a message
> with a nested repeated field of an other message type.
>
> This is the simplified version -
> message Item {
>int32 id = 1;
> }
>
> message LookupReply {
>repeated Item replica_list = 1;
> }
>
> Here is the code for constructing the message:
> ...
>LookupReply nlr = LOOKUP_REPLY__INIT;
>
>(&nlr)->replica_list = (Item**)malloc(1*sizeof(Item*));
>(&nlr)->n_replica_list = 1;
>
>Item* item1 = (Item*)malloc(sizeof(Item));
>item1->id = 1;
>(&nlr)->replica_list[0] = item1;
>
>int len = lookup_reply__get_packed_size(nlr);
> ...
>
> The call to lookup_reply__get_packed_size causes a segmentation
> fault.
> I first tried using a string id field in the Item message, and that
> failed too.
>
> However when I used a string repeated field (with a few obvious
> semantic changes) everything worked fine.
>
> Anyone else has maybe used repeated message field in the c package and
> got it to work (or if not, can explain why it doesn't work)?
>
> Thank you,
> Aviad
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: MVN/Java Error: duplicate class: com.google.protobuf.DescriptorProtos

2008-11-25 Thread Kenton Varda
Are you building the Java code using Maven or by some other method?

On Tue, Nov 25, 2008 at 6:02 AM, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:

>
> Hi,
> I down loaded   protobuf-2.0.2.zip, installed mvn onto Ubuntu 8.04
> installation with OpenJDK Java.
>
> The c++ build is fine, but I get the above error when building the
> Java classes.
> referenced to java/com/google/protobuf/DescriptorProtos.java:[5,13]
>
> Any ideas?
> cheers.
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



RESTful queries (GET) with Protocol Buffers

2008-11-25 Thread Michael Case

I'm trying to design a RESTful API using protocol buffers, which
involves complicated searches with a lot of inputs.

Searches, to me, should genereally be a GET.  We're not updating
anything, we're just running a query, basically.  Now, simple searches
are easily represented as a simple URL:  myapp.com/employees/12345
returns the record for employee #12345, right?  But in my case there
are a LOT of search parameters and filters specified, etc.., and its
not very applicable to a URL.  But its still just a query.

Using protocol buffers, we have a search-request message that
encapsulates all the inputs.  I'd like to send that in lieu of the
hairy URL, but GET doesn't (formally) support a request payload...

I'm tempted to just use a POST, because its easy to send the request
in the HTTP message body.  But technically, I think this violates
RESTful principals.  I wonder if there are any recommendations that
would allow me to be a purist?? :)

Thanks,
-Michael-
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Repeated message field in c pacakge

2008-11-25 Thread osishkin

Hi,

I'm using the protocol buffers package for c. It's very useful and
handy. However I've encountered a problem when trying to use a message
with a nested repeated field of an other message type.

This is the simplified version -
message Item {
int32 id = 1;
}

message LookupReply {
repeated Item replica_list = 1;
}

Here is the code for constructing the message:
...
LookupReply nlr = LOOKUP_REPLY__INIT;

(&nlr)->replica_list = (Item**)malloc(1*sizeof(Item*));
(&nlr)->n_replica_list = 1;

Item* item1 = (Item*)malloc(sizeof(Item));
item1->id = 1;
(&nlr)->replica_list[0] = item1;

int len = lookup_reply__get_packed_size(nlr);
...

The call to lookup_reply__get_packed_size causes a segmentation
fault.
I first tried using a string id field in the Item message, and that
failed too.

However when I used a string repeated field (with a few obvious
semantic changes) everything worked fine.

Anyone else has maybe used repeated message field in the c package and
got it to work (or if not, can explain why it doesn't work)?

Thank you,
Aviad
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



MVN/Java Error: duplicate class: com.google.protobuf.DescriptorProtos

2008-11-25 Thread [EMAIL PROTECTED]

Hi,
I down loaded   protobuf-2.0.2.zip, installed mvn onto Ubuntu 8.04
installation with OpenJDK Java.

The c++ build is fine, but I get the above error when building the
Java classes.
referenced to java/com/google/protobuf/DescriptorProtos.java:[5,13]

Any ideas?
cheers.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---