Re: VB6 Winsock action on Server



Thank you for reponse. I've been away.

Your point regarding placing a file in non exclusive mode rang the bell. For
some
illogical reason I was putting the dll defined variables in the same
category as the
file the dll must access. You can see my problem if a copy of the file was
also
created with each instance and all instances could change the file.

I wish it were as simple as one std exe that accumulates client requests and
then processes in order. No one client request is related to any other.

Please comment if you have any stats on storage devices that have multiple
read/write heads with their own controller so that a one main thread type
server could not possibly utilize the capabilities of the additional
read/write heads. This is why I believe the multiple thread multi user dll's
will take advantage of
this technology.

Is specifying multi thread, multi user dll limit the dll to only one
instance? And if
yes would single thread with multilpe instances be better for controlling the
threads through what MS already provides, or not?

Thanks

Jerry Y


"Schmidt" wrote:


"jerry_ys" <jerryys@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
news:D3F6CA25-1399-45AF-8F65-57B8C1A14182@xxxxxxxxxxxxxxxx
Just to verify your response at the very top level before I
get too deep into it, using an active X exe as the server program
that defines the winsock cntl and receives multiple client requests
to perform different, or the same tasks that are in a active x dll
which this server will use will create a separate dll instance for
each client request process it, and return to the active x exe the
client data that the exe will then pass back to the client's own
desktop provided multi-threading is specified for the active x dll?
Yes.

The right client will get the right data back?
Of course, if you place/send the (serialized) response on the appropr.
"socket-channel", this client has established before after a successful
connect.

If the dll above accesses a large file, when it creates an instance
of itself for each client request, will it also make it's own copy of
the file?
Not sure, what you mean here exactly.
If multiple Dll-Instances want to acces the same file at the same time,
then this file has to be opened in a nonexclusive mode.

Synchronization problems?
That depends - if the Dll-Instances only read from this file, then there
are no Sync-Problems.
It's another story, if each Dll-Instances can change content inside the
file.
Here you will have to use your own "Transaction-Mechanism" - if the
file is an *.mdb, then you could use the Transaction-Mechanisms of the
underlying DB-Engine.

Or, would the dll be better as the server with the winsock controls array,
and it instead would call the active x exe to service the client, since
the exe
does not make instances of itself and can better control the data access
and
keep it synchronized.(one copy)
Seems you have a scenario, where the server has to ensure an
"in-order-access"
to a single server-resource (large File) for requests from multiple clients.
This is best solved, if you work singlethreaded with the Winsock-Array
inside
a normal Standard-Exe as the Server (AX-Exe not necessary).
Inside the DataArrival of the SockArray you simply cumulate the incoming
Data
for each Client-Connect separately until the "JobData" is complete. Then you
simply have to start the "JobWorkerRoutine" with the appropriate Data,
related
to the ClientConnect(-Index) and send the result back over the appropriate
Winsock-Instance. Since you are working singlethreaded, no other ClientJob
can be executed at the same time, as long as you don't execute DoEvents
anywhere inside the JobWorkerRoutine.

If you want to use my RPCServer-Environment, you can achieve the same
effect (serialized access to a single server-resource) by placing the
appropr.
Code inside a RPC-Singleton-Object, wich the RPCServer allows to access
from inside the WorkerThreadPool.

Olaf



.



Relevant Pages

  • RE: how to share a static variable between 2 different process
    ... dll into Component Services in Windows as a COM+ server. ... my dll has been exposed as a COM object thanks ... course one client could pay only seats who reserved itself. ... disk) of the reservations and the related process who made the reservations. ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: how to share a static variable between 2 different process
    ... dll into Component Services in Windows as a COM+ server. ... my dll has been exposed as a COM object thanks ... course one client could pay only seats who reserved itself. ... disk) of the reservations and the related process who made the reservations. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Calling a DLL from a Java Applet
    ... >> I'm trying to write a Java applet to call a dll that resides on the web ... >> web server. ... > The applet runs on the client. ...
    (comp.lang.java)
  • Re: Hosted .NET client control wont start in IE6/IIS6
    ... If the DLL is downloaded to the client to be executed on the client, ... I am developing a .NET client to run as a hosted control in Internet ... Windows Server 2003 machine running IIS 6 the control won't start. ...
    (microsoft.public.inetserver.iis)
  • Re: remoting options
    ... Copied the "server dll" into the bin directly on the client. ... Now if I use soapsuds I am presuming I will compile and copy ...
    (microsoft.public.dotnet.distributed_apps)