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

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?
 
K

Ken Kolda

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top