Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question on .NET remoting
Message
From
26/09/2002 18:24:56
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00703774
Message ID:
00705005
Views:
17
Thanks, Rick. This was a good explanation ....

~~Bonnie

>MarshalByRefObject can (but doesn't have to) work like DCOM used to work with the Proxy/Stub setup.
>
>This means that you don't tranport the object over the wire, but the object stays on the server and is manipulated from the client through the proxy. Just like DCOM where the object lives and executes on the server and the client only uses the proxy.
>
>It can be more efficient if you're shipping a lot of data over the wire, but for smaller data sets (as you should be doing in distributed application) it's generally not that different.
>
>Using Remoting is considerably more complex than using WebServices and unless performance is absolutely paramount for the wire transfer I wouldn't go that route. It's not as flexible because in general it won't work over HTTP ports if the remote machine is also running a Web server whcih means you potentailly have to deal with security issues.
>
>
>+++ Rick ---
>
>
>
>>Dave,
>>
>>>>Think of your WebService as one big remote object.<
>>
>>So, is this the difference between passing DataSets to/from a WebService vs serializing the DataSet to XML and passing the XML? IOW, in the first case of passing the DataSets, it sounds like you are saying that the DataSet doesn't actually get passed to the client. I'm sure I'm misinterpreting something in what you said, because that sure doesn't sound right to me.
>>
>>Care to elaborate?
>>
>>Thanks,
>>~~Bonnie
>>
>>
>>
>>>>I'm 'guessing' (wildly guessing would be a better term) that by default, when we send up a dataset to a Web Service (and get one back), that's using MarshalByValue as the default. How would 'MarshalByRefObject' be more efficient?
>>>>
>>>
>>>Yes, look at the inheritance hierarchy of the DataSet Class.
>>>
>>>DataSet parent = MarshalByValueComponent = makes a copy of the object on the client machine.
>>>
>>>MarshalByRefObject uses a proxy/stub pair to invoke methods on an object running on a remote machine.
>>>
>>>There are many issues to consider when remoting your objects. Take the scenario to its extreme. Imagine that you have a DataSet with a million rows. When you marshal by value you get all those rows copied to the client. If you want to update just one row, you would have to copy the whole dataset, make changes on the client, and then send the updated dataset back to the Web service. Of course you would never do this with a million rows. You would use small datasets and maybe only send changes back to the web service.
>>>
>>>Instead, if you have a MarshalByRefObject with a method called UpdateColumn, for example, the client calls that method (invokes it remotely through the proxy) and just passes the new value to the remote object. The method gets executed on the remote machine which finds the row to change in the dataset and updates it. Obviously more efficient than sending a million rows.
>>>
>>>Think of your WebService as one big remote object.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform