WCF instance dictates how the objects are created while WCF concurrency dictates how many requests can be handled by the WCF objects.
WCF instancing - per call, per session and single
WCF concurrency - single , multiple, reentrant
Single: -
==============
1) A single request has access to the WCF service object at a given moment of time.
2) So only one request will be processed at any given moment of time. The other requests have to wait until the request processed by the WCF service is not completed.
Multiple: -
==============
1) In this scenario multiple requests can be handled by the WCF service object at any given moment of time.
2) In other words request are processed at the same time by spawning multiple threads on the WCF server object. So you have great a throughput here but you need to ensure concurrency issues related to WCF server objects.
Reentrant: -
==============
1) A single request thread has access to the WCF service object,
2) but the thread can exit the WCF service to call another WCF service or can also call WCF client through callback and reenter without deadlock.
Note: By default WCF services are 'Single' concurrency and instancing mode ‘per call’.
Per call
==============
• You want a stateless services
• Your service hold intensive resources like connection object and huge memory objects.
• Scalability is a prime requirement. You would like to have scale out architecture.
• Your WCF functions are called in a single threaded model.
Per session
==============
• You want to maintain states between WCF calls.
• You want ok with a Scale up architecture.
• Light resource references
Single
==============
• You want share global data through your WCF service.
• Scalability is not a concern.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment