Service allocation, state and synchronization

  • Thread starter Thread starter regine issan
  • Start date Start date
R

regine issan

Hello,

Recently I have been using web services, asp.net and wcf.
I realized there are certain questions related to all of these
technologies and I'm looking
for an experiment to find the answers to the questions below for all
the technlogies.

these answers could hrlp understanding required synchronization
mechanisems and perdormace affects.

ideas are wellcome.

questions:
- is there single or multiple of instance of my service when multiple
clients are running
- are the services running in parallel run on different threads within
the same process or within difference processes
- any guidlines for synchronization to protect the state of my service
when multiple clients are running ?

thanks
 
regine issan said:
Hello,

Recently I have been using web services, asp.net and wcf.
I realized there are certain questions related to all of these
technologies and I'm looking
for an experiment to find the answers to the questions below for all
the technlogies.

these answers could hrlp understanding required synchronization
mechanisems and perdormace affects.

ideas are wellcome.

questions:
- is there single or multiple of instance of my service when multiple
clients are running
ASP.NET runs within a process known as the ASP.NET worker process. All
ASP.NET functionality runs within the scope of this process.

A Web server contains only a single ASP.NET worker process, which spawn
threads to service requests.
- are the services running in parallel run on different threads within
the same process or within difference processes

see above
- any guidlines for synchronization to protect the state of my service
when multiple clients are running ?

That's the job of the Web server, which it has internal mechanisms to
protect a threads state running on the Web server.


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4541 (20091025) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
there is one worker process per app pool. all requests (page or web
service serviced by this worker process using a thread pool.

there is one appdomain per vdir (web application). any ,net static
(shared in vb) is shared across all request to the appdomain, but not
across app domains. a static c/c++ variable would be shared across all
appdomains.

your web services must be thread safe. if you use statics, or
application variables (which are stored in a static collection) then you
must use proper synchronization.

-- bruce (sqlwork.com)
 
Back
Top