[protobuf] Re: Avoid attributes/ Cyclic support

2010-05-04 Thread Fabio Maulo
LOL!! I know Marc, I know... at this moment the dll version is not the problem and the DocumentSerializer is injectable. What I need is an efficient, high speed but overall not invasive and supporting cyclic reference serializer. Cyclic as: Parent IEnumerable Children Child Parent Parent I'll

Re: [protobuf] Re: Avoid attributes/ Cyclic support

2010-05-04 Thread Marc Gravell
Oh, I should also add that BinaryFormatter is slow(er) and uses more bandwitdh (very important when IO is your biggest bottleneck). This is based on "v1": http://www.servicestack.net/benchmarks/NorthwindDatabaseRowsSerialization.100-times.2010-02-06.html

Re: [protobuf] Re: Avoid attributes/ Cyclic support

2010-05-04 Thread Marc Gravell
Please allow me to say something loudly: **Do not use BinaryFormatter for persistence.** (IMO) That road is full of problems; even assuming you never want to do anything except MS/.NET, it is still hugely limiting around your assemblies. I've lost track of people asking "I rebuilt my dll; now non

[protobuf] Re: Avoid attributes/ Cyclic support

2010-05-04 Thread Fabio Maulo
For sure! Marc. I'm working in a new commercial prj for win-azure. The persistence will look like a doc DB (well... pardon me... it will be my interpretation). I have a base test for IDocumentSerializer and I have tried some others serializer and, so far, I'm stuck with .NET binary formatter. Looki

Re: [protobuf] Re: Avoid attributes/ Cyclic support

2010-05-04 Thread Marc Gravell
"v2" does all of this, and more. The existing ("v1") attributes essentially just become the /default/ implementation. There is a new "TypeModel" class (for want of a better name), which functions a bit like "XmlSerializer", "DataContractSerializer", etc. - You can have as many TypeModel instances

[protobuf] Re: Avoid attributes/ Cyclic support

2010-05-04 Thread Fabio Maulo
I can't ignore you ;) What I mean is exactly a "independent" metadata. Something like Serializer.Serialize(Stream dataStream, T object, IDictionary metaHolder); Because protobuf-net supports different set of meta-data (embedded, DataContract and so on) the most easy way to be DRY is converting a

Re: [protobuf] Avoid attributes/ Cyclic support

2010-05-04 Thread Marc Gravell
You mention attributes; what implementation are you using? protobuf-net (one of the .NET implementations) uses .NET attributes as one mechanism for describing fields; is this what you mean? If it is, then I have a soon-to-be-released "v2" of protobuf-net which indeed allows independent metadata (as

[protobuf] Re: Seg Fault with MutableRepeatedMessage()

2010-05-04 Thread Ryan
Amazing! Completely overlooked that method. Thanks a ton! On May 4, 12:46 pm, Jason Hsueh wrote: > Ah, you want AddMessage() instead then. That'll return a pointer to a valid > message object, and you can call GetReflection() on that. > > > > On Tue, May 4, 2010 at 9:43 AM, Ryan wrote: > > Ah, y

[protobuf] Re: Issue 186 in protobuf: Full PHP Compiler

2010-05-04 Thread protobuf
Comment #2 on issue 186 by pierluigi.mar: Full PHP Compiler http://code.google.com/p/protobuf/issues/detail?id=186 Thanks -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to proto...@googlegroups.com. T

Re: [protobuf] Re: Seg Fault with MutableRepeatedMessage()

2010-05-04 Thread Jason Hsueh
Ah, you want AddMessage() instead then. That'll return a pointer to a valid message object, and you can call GetReflection() on that. On Tue, May 4, 2010 at 9:43 AM, Ryan wrote: > Ah, yes, I will update that loop. > > I'm still a little confused about something though. Ultimately I am > trying t

[protobuf] Re: Issue 186 in protobuf: Full PHP Compiler

2010-05-04 Thread protobuf
Updates: Status: OutOfScope Owner: --- Comment #1 on issue 186 by jas...@google.com: Full PHP Compiler http://code.google.com/p/protobuf/issues/detail?id=186 It doesn't appear that there are any other options currently, but someone recently posted about writing a PHP compiler:

[protobuf] Re: Seg Fault with MutableRepeatedMessage()

2010-05-04 Thread Ryan
Ah, yes, I will update that loop. I'm still a little confused about something though. Ultimately I am trying to create an entry, and set a field, within this nested- repeated message. However, how can I create an entry without first getting the reflection for the nested message? My .proto file is

Re: [protobuf] Avoid attributes/ Cyclic support

2010-05-04 Thread Jason Hsueh
On Mon, May 3, 2010 at 11:29 PM, Fabio Maulo wrote: > - Is there a way to avoid attributes ? > I mean something like an "internal" metadata where we can define the > identifier of each member. > I'm not sure what you mean by this. By attributes do you mean field options? Can you describe in more

Re: [protobuf] Seg Fault with MutableRepeatedMessage()

2010-05-04 Thread Jason Hsueh
Your msg is completely empty. There aren't any entries in the repeated field - FieldSize() should be returning 0. Your loop needs to terminate when i < size, not i <= size - accessing the 1st element of an empty repeated field is going to return an invalid pointer. FYI bounds checking is done in d

[protobuf] Avoid attributes/ Cyclic support

2010-05-04 Thread Fabio Maulo
- Is there a way to avoid attributes ? I mean something like an "internal" metadata where we can define the identifier of each member. - protobuff supports cyclic references? -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this g

[protobuf] Seg Fault with MutableRepeatedMessage()

2010-05-04 Thread Ryan
Hello all, I am getting a segmentation fault when trying to use the MutableRepeatedMessage() class with a nested repeated method. My simple C++ code is as follows: /* Decleration in bufferDB.h*/ private: std::string serialData; Message* msg;

[protobuf] Issue 186 in protobuf: Full PHP Compiler

2010-05-04 Thread protobuf
Status: New Owner: ken...@google.com Labels: Type-Defect Priority-Medium New issue 186 by pierluigi.mar: Full PHP Compiler http://code.google.com/p/protobuf/issues/detail?id=186 Hi, I've my own API that can serialize in Xml or Json, I really want to add the serialization to the protocol buffe