You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Naresh Agarwal <na...@yahoo.com> on 2001/10/20 10:17:43 UTC

MS-Soap and Multi-threading

Hi

I am developing a Soap Server using MS-SOAP low level APIs using ATL COM
(multi-threaded). I am using a ASP file to deploy Soap Server in IIS.

A instance of Soap Server is created in ASP file in "APPLICATION" scope.

Soap Server has following functions and it is thread safe (no global
variables/resources).

1)Process
2)FunctionX
3)FunctionY
4)FunctionZ

Process function creates instances of Serializer and Reader As follows :

Dim Serializer As MSSOAPLib.SoapSerializer
Dim Reader As MSSOAPLib.SoapReader

It then

1. Read Soap request using Reader
2. Calls one the three functions FunctionX, FunctionY and FunctionZ,
depending upon request
3. Generates Soap response using Serializer

Now in ASP file, Process function of Soap Server is called using the
instance created in "APPLICATION" Scope.

Now if there are (say) 5 simultaneous Soap requests, IIS will use 5
different threads (normally) to serve these requests.

1) Each of these thread will execute Process simultaneously.
2) Each of these will create Serializer and Reader inside the Process.

Please note that Serializer and Reader are objects of Soap Library, which is
a DLL.
Also MS-Soap readme file says "The Soap COM components don't work reliably
if called from a Multi-threaded Apartment"

Now i want to ask

1) Will these 5 threads have different copies of Serializer and Reader
objects or there will be a just one copy.
2) Will there by any synchronization problems (Serializer and Reader are
objects of DLL)
3) Will there be any performance problems, if Soap Server have to handle too
many requests simultaneously.

If any one has slightest of clue about it, please help me.

Thanks,

Regards,
Naresh Agarwal




_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com