Recursion support in Protobuf-net

143 views
Skip to first unread message

NYCBrit

unread,
Jan 31, 2011, 9:49:03 PM1/31/11
to Protocol Buffers
Would it be possible to support recursive graphs in protobuf-net, as a
implementation-specific custom message extension? For example, if
protobuf-net could automatically insert an "optional int32 uniqueID =
1000" field in to each message, it could store an auto-generated
unique identifier for each object. Then, if you come across a
previously serialized object, you need only read/write the uniqueID
field and leave the other optional fields blank. The protobuf-net
deserializer could output the previously constructed object. The
uniqueIDs would only be valid for a defined scope, eg. one contiguous
wire message.

Marc Gravell

unread,
Feb 1, 2011, 3:11:28 AM2/1/11
to NYCBrit, Protocol Buffers
Yes, that is already on my list of things I really, really want it to do. It will inevitably be in "v2" at some point, but to repeat your point: this will be 100% implementation specific and not generically portable between platforms, so it will have to be by explicit "opt in".

Marc


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




--
Regards,

Marc
Reply all
Reply to author
Forward
0 new messages