Service allocation, state and synchronization

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
 
M

Mr. Arnold

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
 
B

bruce barker

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,096
Latest member
ThurmanCre

Latest Threads

Top