Re: Remoting and DataSets

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi, James:

Let me give you inputs about my concerns. See my inline comments.

"James Crosswell" <james@xxxxxxxxxxxxxx> wrote in message
news:%23Y7naj4VHHA.5068@xxxxxxxxxxxxxxxxxxxxxxx
I've put together a basic server and client in remoting. In order to pass
data around I presumed you'd use the detached objects like DataSet,
DataTable and DataRow so I figured I'd define a DataSet class in an
assembly that was shared by the client/server (along with the interfaces
for the server) and then add a couple of methods:
Fill(ref DataSet aDataSet, string aTableName);
UpdateData(DataSet aDataSet);

Overall, I don't recommend you to remote dataset or datatable across
across machines. It is a wrong approach unless you are sure that your server
just supports a limited number of clients on LAN only.


The idea being that these would be generic methods allowing the client to
pass a DataSet object to the server to have one of it's tables filled or
to send updates back to the server.

It seems like there's actually a fair amount of work involved in order to
write the generic UpdateData method though - I have to build up a
DataAdapter, set the TableMappings and the FieldMappings and finally build
the Update, Insert and Delete statements (all of which I was just going to
generate automatically - for example, to do an update I'd do "Update [All
fields except the PK] WHERE PK = [Original PK]" - in my case if I want to
do anything fancy then I'll typically do it in the triggers for the
table/view that I'm updating in the actual databases themselves, so no
need to do anything but plain jane default stuff in the
insert/update/delete statements in the .NET remoting server).

If I were you, I will use parameterized statements for insert, update and
delete. Suppose that you need to update a set of records, I will use
something following:

Update Table MyTableName Set AColum = ?, MySecondColumn = ? Where
SomeKeyColumn = ?.

Use this way is perferred for better generics and speed. Note that ADO.NET
doesn't have so good generic data accessing support as OLEDB. You may be
forced to use OLEDB .NET provider. You can also see our sample at
http://www.udaparts.com/document/articles/asyniis.htm. Inside the sample,
you will find a simple to show you how to use parameterized statements for
these purpose. That sample supports all of data sources (Access, MS SQL,
Oracle, DB2, mySQL, ......) through OLEDB technology.



Then I got to thinking, this is ridiculous - surely someone has bumped
into this problem before me so I went scouring the internet for all and
any posts I could find relating to remoting and datasets. Remarkably I
came back with very little and certainly nothing that discussed sending
updates back to the server or handling these.

I did find the odd post from folks that suggested DataSets + Remoting was
a bad idea, with various others fervently replying that they agreed, but
they didn't go into any details as to why this might be the case. Perhaps
it was for performance reasons in which case maybe simply serializing the
datasets in binary format rather than XML would help or using something
like GenuineChannels might do the trick.

GenuineChannels solves a set of problems that MS .NET remoting should not
have. MS remoting implementation is really BAD from my view, although it has
a good archtecture. However, I do NOT think that GenuineChannels is able to
help your application performance at all.

So, a couple of questions:

1. Is there anything I should know about why using DataSets + Remoting
might be a bad idea?

It depends on how many clients and network types. It may work very well with
a few clients + LAN networks.


2. Presuming it's not such a bad idea as all that (it seems like the docs
for .NET encourage using these in remoting situations at least) does
anyone know of examples or tutorials or even just passing
conversations/blogs anywhere that discuss more specifically sending
DataSet updates back to a remoting server and handling these?

Actually, it is bad idea. You can't assume it is a good idea.


Any help appreciated.

Best Regards,

James Crosswell
Microforge.net LLC
http://www.microforge.net


.



Relevant Pages

  • Re: Unbearable Login Delays for SBS 2008
    ... Start, administrative tools, microsoft windows server update services, options, server cleanup wizard. ... I went into the WSUS console and can't find where the "Option" selection is and the "click" clean database option is. ... You may be surprised at the number of outdated and unapplicable updates it deletes. ... Howener when the clients try to login their machines get stuck at:Applying computer Settins" before they finally get to their desktops. ...
    (microsoft.public.windows.server.sbs)
  • Re: COM+ Hölle
    ... > die Kommunikation zwischen Server und den Clients. ... > Clients nutzen (anfangs dachten wir noch an eine simple TCP/IP ... die Wrapperklasse - verschiedene Vorteile: ... Remoting innerhalb des .NET-Frameworks ist aber inzwischen schon ...
    (microsoft.public.de.vb)
  • Re: Remoting and COM+
    ... assembly contains two COM visible objects - one is trigger by a service to load a config file and start listening for remoting clients, the other is used in remoting calls. ... On one server, this is enough, and clients can create and make use of the remoted object. ... On another server, the remoting configuration object reports a successful start, but clients are unable to use the remoted object. ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Group Policy Results Wizard
    ... I actually run WSUS on my domain so would expect most updates to applied ... what solved it but I believe that I updated our server with the latest MS ... I have since rebooted both the server and a few of the clients, ... Business Server Windows Firewall" (not Small Business Server Internet ...
    (microsoft.public.windows.server.sbs)
  • Re: Programs
    ... See www.dxloader.com for a program that I use to provide my clients with ... transparent updates to the programs I've written for them. ... I have an area defined on my web server for each of my ... I have to issue a new exe. ...
    (microsoft.public.fox.programmer.exchange)