Chapter 4. Instance Management


Instance management is the name for a set of techniques used by WCF to bind client requests to service instances, governing which service instance handles which client request. You need instance management because applications differ too much in their needs for scalability, performance, throughput, transactions, and queued calls. When it comes to those needs, there simply isn't a one-size-fits-all solution. However, there are a few canonical instance management techniques that are applicable across the range of applications, thus enabling a wide variety of scenarios and programming models. These techniques are the subject of this chapter, and understanding them is essential to developing scalable and consistent service-oriented applications. WCF supports three types of instance activation: per-call services allocate (and destroy) a new service instance per client request. Sessionful services allocate a service instance per client connection. Finally, with a singleton service, all clients share the same service instance across all connections and activations. This chapter provides the rationale for each of the instance management modes; offers guidelines on when and how to best use them; and also addresses some related topics such as behaviors, contexts, demarcating operations, instance deactivation, and throttling.[*]

[*] This chapter contains excerpts from my article "WCF Essentials: Discover Mighty Instance Management Techniques for Developing WCF Apps," MSDN Magazine, June 2006.




Programming WCF Services
Programming WCF Services
ISBN: 0596526997
EAN: 2147483647
Year: 2004
Pages: 148
Authors: Juval Lowy

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net