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

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