My object's remoting proxy is WAY huge on the client

  • Thread starter Thread starter 0to60
  • Start date Start date
0

0to60

I have an object A, who contains a bunch of maps of other objects B, C, D.
Some maps are internal, some are private. Object A inherits from
MarshalByRefObject, whereas B, C and D are all marked Serializable.

On client computers, I'll obtain a remoting proxy to object A (often proxies
to many A's as this is a peer to peer app). Trouble is, if object A's
interal maps of B, C and D are large, A's proxies on client computers get
large too. I'm assuming that somehow A's proxy contains A's internal maps.

I don't want that. All I really want is for A's proxy to have a few public
methods in it and NO data. Any suggestions? Is there a way I can customize
the proxy to only contain the stuff I want?
 
Just to verify, how to do you know that the proxy is getting large? Have you
serialized the contents of the ObjRef to disk and looked at it?

As you mentioned, if A is MarshalByRef and that's the only object you pass
around, then your large objects should not be crossing the remoting
boundary. Can you post a small code example to demonstrate the issue and how
you concluded the proxy is large?

Ken
 
Back
Top