A component is a discrete unit of code built on Microsoft ActiveX technologies that deliver a well-specified set of services through well-specified interfaces. Components provide the objects that clients request at a runtime.
The components of a transaction must include:
Client logic: Includes forms and the user interface.
Network protocol: Links the client to the server.
Network receiver: Listens to the network accepts incoming calls from clients and manages congestion.
Queue manager: Tracks and manages connect in case client calls start to back up.
Connection manager: Tracks work and system resources on behalf of each client.
Context manager: Tracks each user NTs concurrent identity and state.
Security manager: Prevents unauthorized access to the application or data.
Thread pool: Avoids having to dedicate a thread to each user.
Service logic: Line-of-business or in-house code that the application performs.
Synchronization manager: Coordinates the transaction.
Configuration manager Manages thread and server resources.
Database connection manager : Allocates database connections for multiple users.
Data: The database that the transaction is working on.
Any system that allows clients to be added must scale up efficiently or risk a serious drop in performance as the number of client connections increases.
A scalable application has to take into account three basic elements:
- The messages from multiple clients will come across the network to access the shared data on the server. These messages need to be received, ‘queued, processed, and the responses routed back to the right clients promptly.
- Next, there is the idea of the context; it can be anything about the user, for example, the language of the user or even a complete identity of the user or perhaps a user configuration. A user's context is usually tightly related to what access is allowed and in general, security.
- Finally, the Service Logic layer, which contains some line-of-business logic that controls access to the shared data used. The problems associated with scaling arise at this point and require some synchronization such as database locking or a similar mechanism.
The key to building scalable applications is to understand that the logic to deal with most of the scalability issues is already integrated into Microsoft® Windows NT Server. The challenge, then, becomes how best to take advantage of it. Using MTS enables your developers to focus on the areas of line-of-business logic contained in the Service Logic and the Shared Data.