When we connect one TProvider component to many TClinentDataSet component
then what happens in term of following. Suppose there are 60 TClientDataSet
on many client applications and One TProvider on AppServer.
1- When all 60 TClientDataSet request data like
MyClientDataSet.Provider.DataRequest(mySQL) then does Provider will handle
all 60 requests in serial way or asynchorus way.
2- Does TProvider will create separate thread for every request or all the
requests will be handled in on TProvider thread.
Looking forward to any explaniation for MIDAS mechanism. Thanks,
Rafey.
(I assume you are using Delphi 3, MIDAS 2 and DCOM based on previous
posts, apologies if this is incorrect.)
There are various different scenarios depending on how you configure
your application server. For instance, an easy way to ensure the
requests are handled asynchronously is to make it so that each client
runs their own instance of the application server program (using the
options in DCOMCNFG - set the identity to 'the launching user').
However, having multiple processes running on the server can make your
application messy if you want to have, for instance, a main form that
shows the connected users.
Another approach is to use the ThrddCF.pas unit that Borland released.
This allows you to create each remote data module in an apartment
thread for each client. An important issue is to make sure each client
has their own database connection and session. Otherwise, while user 1
is opening their query, users 2..n will have to wait for the operation
to complete before they can open their queries. If you use ThrddCF and
give each client a session and database connection of their own then
you will be able to process the requests asynchronously. This leads to
a massive performance increase in that while client 1 is, for instance,
opening a query on the database, the thread will be idle allowing the
other clients to request processing and data. If you write a program of
this type and have many users connecting, all making many requests, you
can see by looking at a trace file that the requests are asynchronous.
Looking at the Task Manager performance graph you can see that the
processor usage is on average much higher, without the peaks and
troughs you would get when only one user is connected.
I hope this is some help, send me a mail to
simon.l...@lovelyspamgb.abb.com (removing the lovelyspam bit of
course) if you want me to send you an example program.
Regards,
Simon Lawrence
-------------------------------------------------------
Organisation: The largest company you've never heard of
Sent via Deja.com http://www.deja.com/
Before you buy.