![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm designing a remoting C/S application. I want to obtain references to "business" objects created on the server side to enable invoking methods that will run on the server side. In order to make it more chunky, I want to enable the serialization, transportation of copies of the objects so that I can then inspect the various properties and data of the objects on the client side. In other words, I'm trying to get the best of both worlds with server side execution and data retrieval and then compressing/returning the results for the bulk of the data retrieval on the client side, eliminating the round trips. Some of these objects will have a good amount of data, so I'm expecting a substantial performance improvement by compressing the objects for transmittal over the wire). In my prototype, I can only seem to get local copies of the objects, rather than references to them. Logging in the class makes it clear where each method is being executed (client or server). I am creating a remoting object to the "main" object on the server and using that class to create and return business objects. It's unclear to me how to have that class return references to server-side business objects that are created on demand for the client. Let me try to make this more clear with a simple example: 1. Ask server remoting object for a new "log file" object. 2. The server returns a reference to an object living on the server. 3. Invoking the Clear method would cause the server-side obj to clear the logs. 4. Asking the server-side object for a copy would result in a client-side copy of the object (Thinking of a implementing a comrpessed XML stream to serialize/de-serialize the object across the wire). 5. Querying any of the properties of this client-side object would be super fast, as it's all local. Of course, I couldn't execute the methods on the local object. Are there are "patterns"/ common approaches to this design? Thank you. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |