mcnamaragio

Hello,
I startet learining net remoting basics but I haven't got any experience in it. Can you please explane what's the major difference between cao and sao objects and when to use them


Re: .NET Remoting and Runtime Serialization SAO and CAO in remoting

mahjayar

SAO is a shared object that is activated once and shared across multiple clients. Modes it can be created is Singleton or PerCall when a new object is created for each method call by the client.

CAO as its name stands is client activated and a new instance is created on the server on an explicit activation demand from the client. CAO's are used when the client wants to have a particular instance serve all methods. Clients can also pass in custom arguments to the remote objects constructor in CAO.

Refer Msdn documentation at http://msdn2.microsoft.com/en-us/library/kwdt6w2k.aspx for more details.






Re: .NET Remoting and Runtime Serialization SAO and CAO in remoting

mcnamaragio

So does it mean that if I have a SAO object then it will be the same object for all clients and if I have several clients that create CAOs then they will be different objects and independent from each other.




Re: .NET Remoting and Runtime Serialization SAO and CAO in remoting

mahjayar

As I said SAO can be in two modes Singleton and PerCall. Singleton is one object for all clients and PerCall will instantiate one object for every method invoked on the remote object