[protobuf] Re: Minimal Protobuf for deserializing from SerializedArray

2016-02-09 Thread Josh Haberman
Hi Tanweer,

You didn't mention which language you're using, but I'm guessing C++ or 
Java. You can pare down the full library by using the lite runtime -- see 
details here:

https://developers.google.com/protocol-buffers/docs/proto#options

Hope this helps,
Josh

On Tuesday, February 9, 2016 at 11:06:59 AM UTC-8, Tanweer Alam wrote:
>
> Hi,
> I have a situation in which I specifically require only Deserialize From 
> serializedArray functionality. I already have the serialized data.. Is it 
> possible (any defined way) in which I can have portion of protobuf library 
> instead of full libprotobuf or do I need pick classes from full source and 
> use it.
>
> TIA 
> tanweer
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: What tool does the protobuf project use to generate ref manual from c++ headers?

2016-02-09 Thread Josh Haberman
Hi Tamas,

I think the site is mostly hand-written with some light templating. You 
could probably do a similar thing with any number of open-source site 
builders like Jekyll.

Josh

On Tuesday, February 9, 2016 at 11:06:59 AM UTC-8, Tamás Kenéz wrote:
>
> What tool does the protobuf project use to generate ref manual from c++ 
> headers?
> I see there is almost no markup noise. Is the tool publicly available?
> Thanks, Tamas
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: Questions about Services

2016-02-09 Thread Josh Haberman
Hi Kevin,

I think gRPC is probably your best bet. It's true that it isn't in GA yet, 
but it's far more mature than any other options I'm aware of for protobuf 
services.

You can't "use" generic services per se. Generic services just provide an 
abstract interface -- someone has to provide an implementation. There 
aren't any mature implementations of abstract services floating around that 
I am aware of.

Josh

On Friday, February 5, 2016 at 1:38:03 PM UTC-8, kevin chaves wrote:
>
> Hi, 
>
> I'm completely new to using protocol buffers and there are some things 
> that aren't very clear. I may be missing something very simple but the 
> documentation says the simple services are being deprecated so you have to 
> turn them on using option cc_generic_services = false;. What is the 
> replacement for this in 3+? I did some digging and it looks like gRPC is a 
> plugin that can also be used to generate code but I'd like to avoid that 
> because it says it's still development builds. Are plugins the only options 
> now?
>
> Should I still be using the simple services?
>
> How well does gRPC work? Is there anything I should be concerned about 
> implementing C# client proxy and C++ server? Is that even possible?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] ParseFromArray for Data Deserialization

2016-02-09 Thread Tanweer Alam
Hi All,
I have a situation in which I have the serialized array and I only require 
the bare minimum part of protobuf so that I am able to deserialize the 
serialized array.
Do we have a  defined way for achieving this or do I need to pick up 
classes and use it in my code to do this.

TIA 
tanweer

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] What tool does the protobuf project use to generate ref manual from c++ headers?

2016-02-09 Thread Tamás Kenéz
What tool does the protobuf project use to generate ref manual from c++ 
headers?
I see there is almost no markup noise. Is the tool publicly available?
Thanks, Tamas

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Public protobuf demo server?

2016-02-09 Thread Tom Ball
Does anyone know of a public server that uses protocol buffers to 
communicate with its clients? I'm writing a tutorial for one of those 
clients, and demos feel more real if there is actual client-server 
communication.

If not, anyone have ideas for a simple demo server? An address book came to 
mind first, but it would have to be read-only or it would soon be full of 
garbage entries.

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Minimal Protobuf for deserializing from SerializedArray

2016-02-09 Thread Tanweer Alam
Hi,
I have a situation in which I specifically require only Deserialize From 
serializedArray functionality. I already have the serialized data.. Is it 
possible (any defined way) in which I can have portion of protobuf library 
instead of full libprotobuf or do I need pick classes from full source and 
use it.

TIA 
tanweer

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: Public protobuf demo server?

2016-02-09 Thread oak
Check out grpc?

http://www.grpc.io

On Tuesday, February 9, 2016 at 7:06:59 PM UTC, Tom Ball wrote:
>
> Does anyone know of a public server that uses protocol buffers to 
> communicate with its clients? I'm writing a tutorial for one of those 
> clients, and demos feel more real if there is actual client-server 
> communication.
>
> If not, anyone have ideas for a simple demo server? An address book came 
> to mind first, but it would have to be read-only or it would soon be full 
> of garbage entries.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: Unable to get through error: Protocol message contained an invalid tag (zero).

2016-02-09 Thread Josh Haberman
Hi Vishal,

The message basically means that the protobuf is corrupted (or isn't a 
protobuf at all).

The message is giving you more detail on the specific kind of data 
corruption. Protocol buffers don't allow tag number 0 -- you can't define a 
field like "int32 a = 0". But the binary protobuf you tried to parse 
contained a tag with field number zero. So parsing the protobuf failed.

Josh

On Friday, February 5, 2016 at 1:38:03 PM UTC-8, Vishal Singh wrote:
>
> Hi,
>
> I am building an application using Sitewhere in which the message exchange 
> between device and the server is done using Protocol Buffer format. The 
> server sends a command to the device after converting the message in this 
> format, but at the device end when the bytes array is converted to get the 
> command, following exception is thrown:
>
>  com.google.protobuf.InvalidProtocolBufferException: Protocol message 
> contained an invalid tag (zero).
>  at 
> com.google.protobuf.CodedInputStream.readTag(CodedInputStream.java:108)
>  at 
> com.sitewhere.android.generated.Android$AndroidSpecification$_Header.(Android.java:212)
>  at 
> com.sitewhere.android.generated.Android$AndroidSpecification$_Header.(Android.java:203)
>  at 
> com.sitewhere.android.generated.Android$AndroidSpecification$_Header$1.parsePartialFrom(Android.java:255)
>  at 
> com.sitewhere.android.generated.Android$AndroidSpecification$_Header$1.parsePartialFrom(Android.java:1)
>  at 
> com.google.protobuf.AbstractParser.parsePartialFrom(AbstractParser.java:200)
>  at 
> com.google.protobuf.AbstractParser.parsePartialDelimitedFrom(AbstractParser.java:241)
>  at 
> com.google.protobuf.AbstractParser.parseDelimitedFrom(AbstractParser.java:253)
>  at 
> com.google.protobuf.AbstractParser.parseDelimitedFrom(AbstractParser.java:259)
>  at 
> com.google.protobuf.AbstractParser.parseDelimitedFrom(AbstractParser.java:49)
>  at 
> com.sitewhere.android.generated.Android$AndroidSpecification$_Header.parseDelimitedFrom(Android.java:410)
>  at 
> com.sitewhere.android.example.SiteWhereExample.onReceivedCustomCommand(SiteWhereExample.java:273)
>  at 
> com.sitewhere.android.SiteWhereActivity$SiteWhereResponseProcessor.receivedCustomCommand(SiteWhereActivity.java:231)
>  at 
> com.sitewhere.android.mqtt.RegistrationManager.onCustomCommandReceived(RegistrationManager.java:112)
>  at 
> com.sitewhere.android.mqtt.DefaultMqttInteractionManager$MqttMessageProcessor.run(DefaultMqttInteractionManager.java:139)
>  at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:234)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
>
> I have no clue what is the meaning of "Protocol message contained an 
> invalid tag (zero)". Please help. The byte array received from the server 
> is: 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: --decode_raw errors with 'Failed to parse input'

2016-02-09 Thread Josh Haberman
It looks like Vinay didn't get a response when posting in 2013. A couple 
things to keep in mind though:

- protobufs are raw binary data, and they can contain NULL bytes. In 
Vinay's message above, GDB is probably treating the serialized protos as 
text strings, and so will stop printing at the first NULL byte. You need to 
get GDB to print the entire binary proto, which will probably require 
having an explicit length for the string and passing that to GDB's printing 
routine somehow.

- protoc --decode_raw expects its input in binary format. So passing it 
input like 0?)\224\002\177 won't do the right thing -- that is a text 
rendering of binary data. You could use printf to convert this to real 
binary data:

$ printf "0?)\224\002\177" > binary_data

But that proto still fails to parse with --decode_raw, probably because it 
is incomplete due to a NULL byte in the middle of the proto.

Hope this helps,
Josh

On Wednesday, February 3, 2016 at 1:37:40 PM UTC-8, tarun sharma wrote:
>
> Hi Vinay
>
> I am facing the same problem, I am reading protobuf data from a coredump 
> and I need to decode it to see what values it has, and I am getting the 
> same error ("Failed to parse input."). Did you find out a way out?
>
> Thanks!
> Tarun
>
> On Wednesday, 7 August 2013 16:22:58 UTC-7, Vinay Wagh wrote:
>>
>> Hi, 
>>
>> I am debugging a core file in gdb and I have the raw encoded data of a 
>> message. I want to decode this message to see the values. I tried using 
>> --decode_raw with no success. Here is what I am doing
>>
>> (gdb) p $12->send_ctx_.parts[0]
>> $23 = {_ = "0?)\224\002\177", '\000' , "\200"}
>> (gdb) p $12->send_ctx_.parts[1]
>> $24 = {_ = "\000M0\224\002\177", '\000' , "\200"}
>>
>> parts is an array of serialized messages. Now I try
>>
>> vagrant@dev-01:~$ protoc --decode_raw 
>> 0?)\224\002\177
>> Failed to parse input.
>>
>> I tried adding that data in a file and tried giving that as input
>>
>> protoc --decode_raw < ~/data.txt 
>> Failed to parse input.
>>
>> I thought maybe I need to \000 repeated 25 times followed by a \200 so I 
>> tried with that as well and still no luck. I then tried to use the decode 
>> instead of decode_raw option by specifying the proto path and the proto 
>> file and the message name but it still did not work. 
>>
>> I then tried to encode some data and decode it back to see if it works. I 
>> entered the values in text form in a file
>> error:OUT_OF_MEMORY,object_id:123,size:4096
>>
>> these are all valid values. I then ran the --encode option specifying the 
>> proto path and file
>>
>> protoc --proto_path=/path_to_proto_dir 
>> /path_to_proto_dir/proto_file.proto --encode=MessageName < ~/proto.txt
>> ?{? 
>>
>> I copied the text as is in to a file and rand --decode on it and it fails 
>> with 'Failed to parse input". What am I missing ? How do I use the 
>> decode_raw or decode option ? Is there a format the data has to be in for 
>> it to be decoded ?
>>
>> Thanks,
>> Vinay
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Instructed to "download a pre-built binary from our release page" : contains no pre-built binaries

2016-02-09 Thread Brian
On the main protobuf github page  it 
says that for "non-C++ users, the simplest way to install the protocol 
compiler is to download a pre-built binary from our release page". For the 
latest release there is no protoc binary provided. As a Java developer I 
would prefer not to have to install the C++ build chain tools just to use 
the protocol buffers compiler.

The current releases seem to contradict these instructions, but maybe this 
means that after I build the binaries myself they are then pre-built?

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Third Party Add ons: ProtoBufEditor - Editor for Protocol Buffers Messages

2016-02-09 Thread Bruce

The Listing for My project protobufeditor (Editor for Protocol Buffers 
Messages) is listed on

 https://github.com/google/protobuf/wiki/Third-Party-Add-ons#Other_Utilities 
page under Editor for serialized protobufs 


currently it points to the old Project page: 
https://code.google.com/archive/p/protobufeditor/

could you please update this to the new Project Page:


   - http://protobufeditor.sourceforge.net/
   

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.