The preceding chapter showed how you can create multithreaded clients that call XML Web services or remote components asynchronously. Along the way, we sorted through the details of responsible threading, with topics such as synchronization and callbacks. This chapter shifts the focus and asks how threading can be put to use in a remote component. To answer this question, we need to consider different singleton designs. With singleton designs, you are responsible for adding the infrastructure that allows your component to support multiple simultaneous users. You'll need to spawn new threads as needed, track users, and ensure thread safety. Furthermore, if you're expecting a large user load, you must use some type of thread pooling to ensure scalability. This chapter tackles all these considerations. You'll also see how you can create a Microsoft Windows service to act as a .NET Remoting component host. |