I am developing a master-slave style application. The master application will send state data to the slave(s) to process and display at some constant rate. The state data is wrapped up into a single class that contains many fields. These field types consist of primitives, classes, interfaces, lists of interfaces, and so on. All the types are either BCL or custom types, so the the custom types can be modified if necessary. Both the master and and slave applications will be .NET 4.0. I am not concerned with serialization versioning as the master and slave applications will be delivered as a pair.
I need a "quick" way to serialize the state data on the master and deserialize it on the slaves. When I say "quick", I am more talking about development time (but processing time could be a factor if the solution was terrible). However, the master and slaves will be distributed over a WAN, so some level of compactness would be nice also.
For a quick solution, I am currently thinking about simply using BinaryFormatter
and then compressing the stream with GZipStream
. Is this the way to go for .NET 4.0?
GZipStream
is almost mandatory for this application. – Lassitude