Hi,
Basically, I need to clone objects to remote processes. Now it's not that simple...
- I want to decide per remote client which members are to be serialized. Some of the data must remain hidden for security reasons, and the extent of the data hiding is dynamically computed at runtime and may change per object per client over time.
- In some cases only a part of a class might have changed. I'd want to serialize only the affected data to perserve bandwidth, CPU etc.
- Performance is an issue! and it seems to me that serializing/deserializing via string tags e.g. the "i" in info.AddValue("i", n1); might not be very efficient. More so that I don't intend to use XML or SOAP formatters and the streams will be read by proprietary software only.
In addition to the above, I've tried to figure out what happens in a complex environment that has many object that cross reference on another. I couln't find any discussion in the MSDN docs nor elsewhere on how this is handled by the serialization framework.
I know it seems like I'm leaning towards designing a custom serialization mechanism (which is kind of true), but can anyone please illuminate things for me Are my facts correct Are there complex examples for serialization that someone can point me at
Cheers,

Use .net serialization or a custon soultion?
Brian Cheek - MSFT
Hi Newborn, did we answer your questions
Cheers,
JJustice [MSFT]
Bu Shaz
DB, to add to Igor's post, you'll probably want to keep your security decisions distinct from your serialization optimizations. Decide who can see which pieces of information, and then pass the safe information to the serialization layer. You can then write your own "delta serializer" that sends only the changed part of each object. Mixing the two layers increases your complexity, which increases the chance of errors, which increases the possibility of accidental information disclosure.
Cheers,
JJustice [MSFT]
mikeymay
Instead of trying to tune serialization accordingly to your requirements may be it would be simple to implement a message based approach to exchange data between server and client.
If you could post here more detailed description of your task (WHAT should be done, not HOW do YOU think it should be done) we'll try help you to find more appropriate solution.
ps:
.NET Serialization uses ObjectIDGenerator class to resolve cross reference issues.
Richard2ne1
Your question is intriguing and it may be addressed (to an extent) by the recently released beta preview of this product:
http://www.morantex.com/Persistore.aspx
This technology provides managed services for shared memory, memory mapping, and data and object persistence, these mechanisms are fundamentally related and this product abstracts them very neatly.
Feedback is being accumulated and may be used to define new features that customers are seeking, so do epxlore the preview and do not hesistate to send any comments, requests or suggestions, they will be well received.
H
David Right
Newborn,
The simple answer is custom. Be it explicit implementation of ISerializable or a complete custom solution.
Why
Serialization is designed for distributed as opposed to remote apps, in that a remote connection already controls streaming (with serialization) between the remote object and its proxy.
I imagine what you want is to have the remote object serve up the data to the client for local processing, in this case you do not need serialization at all. All you need is some key-value collection to pass between server and client (message approach as Igor mentions).
The Serialization process is a valid method to generate this but do not get caught up in the streaming.
In some testing I ran over a set of hierarchical related objects, the explicitly implemented ISerializable that just added needed values, it generated one tenth (1/10) the bytes that the general [Serializable] attribute generated.
Oh and yes serialization of cross references works fine if all required objects are serializable (be careful of circular references).