WCF Tutorial
Lección 112 de 236 · Part 37 PerCall instance context mode in WCF · Bases de datos
Part 37 PerCall instance context mode in WCF
Link for code samples used in the demo
http://csharp-video-tutorials.blogspot.com/2014/02/part-37-percall-instance-context-mode_26.html
Link for all dot net and sql server video tutorial playlists
http://www.youtube.com/user/kudvenkat/playlists
In this video we will discuss, PerCall instance context mode in WCF with an example. This is continuation to Part 36. Please watch Part 36 before proceeding.
When the instance context mode for a wcf service is set to PerCall, a new instance of the wcf service object is created for every request, irrespective of whether the request comes from the same client or a different client. Let’s prove this with an example.
What are the implications of a PerCall WCF service?
1. Better memory usage as service objects are freed immediately after the method call returns
2. Concurrency not an issue
3. Application scalability is better
4. State not maintained between calls.
5. Performance could be an issue as there is overhead involved in reconstructing the service instance state on each and every method call.