Speed depends on usage pattern. Basically - it depends on how you use the objects. With MBR every access goes through remoting, with MarhalByValue you get local copies - which sometimes is not what you want.
Regards Thomas Tomiczek THONA Consulting Ltd. (Microsoft MVP C#/.NET) > -----Original Message----- > From: Michael Iles [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 27, 2003 3:06 PM > To: [EMAIL PROTECTED] > Subject: [ADVANCED-DOTNET] What's the overhead of a > MarshalByRefObject? > > > Say I had a large number of objects (e.g. 1000) that I wanted > to make available through remoting. > > Two plausible architectures are (1) expose each of the > objects as a MarshalByRefObject, or (2) register the objects > with a broker, and expose only the broker as an MBR object. > > Aside from the obvious extra level of indirection, how should > I evaluate these two approaches? > > What I'm really wondering is how MarshalByRefObjects are > implemented. Does the remoting subsystem maintain a broker of > its own for MBR objects? If those 1000 objects were going to > exist in memory anyway, what extra overhead is incurred by > making them all MBR? Which architecture would be faster? > > Any comments appreciated. > > Mike. > > You can read messages from the Advanced DOTNET archive, > unsubscribe from Advanced DOTNET, or subscribe to other > DevelopMentor lists at http://discuss.develop.com. > You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.
