Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question on .NET remoting
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00703774
Message ID:
00703983
Views:
17
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
Next
Reply
Map
View

Click here to load this message in the networking platform