Introduction:
Microsoft Transaction Service (MTS) represents a new type of product, which makes it easier to develop and arrange high performance, variable scale, reliable distributed applications. This is achieved by combining the variable scale, reliability of the transaction controller with the component-based development and arrangement technology.
Why use Microsoft transaction services?
Microsoft transaction services are designed to make structural high performance, variable scale, reliable Internet and intranet applications easier. For many years, we can construct these applications, but it requires talents and investments beyond the capacity of most companies.
The MTS is based on the confirmed transaction processing method, but its importance exceeds the field of transaction controller, which defines a simple programming mode and execution environment for distributed, component-based server applications.
The application is made up of Microsoft ActiveX components that provide commercial application functions. These components seem to be developed for single users. By installing these components in the MTS environment, the server application can high performance, reliable automatic change scale to support the simultaneous multi-customer.
MTS is specifically designed to allow server applications to change within a large user-wide (from a small single-user system to high-capacity web servers). It also has robustness and integrity that is usually only a high-end transaction processing system.
Here's part of the development of the development of an excellent server application is a simple review.
We discuss this problem from three different perspectives:
First, it emphasizes a network server to provide a reasonable level of service that must work.
Second, it discusses the problem caused by the component-based application.
Third, it describes the integrity of the application even when the error occurs.
MTS provides an application programming mode that allows developers to avoid these complex, allowing developers to focus on program functionality and reduce the costs and time required for constructors.
Server basic structure:
The server has a senior foundation. Building a web application server from scratch is not an easy task. Complete the actual business function, such as handling the order of online library, actually just a small part of the work. A typical server system must have a high-level basis to get acceptable performance and scale.
Application service developers must conduct many parts of the basic components in person. For example, the sequence call provides a rich service, and system developers must still make the following work:
Register Directory System Server;
Manage server handling pools and thread pools;
Finally, the server needs to manage the service management thread pool for multi-user requests, not just for a single user. Many customers simultaneously request synchronization using shared data and resources. This requires the advanced lock protocol to explain the problem of dead lock, conditional competition, resource lack and other performance. Manage customer content, including full views of database connection and data structure. (Target view)
Customer buffer to improve potential slow network traffic.
Complete security to ensure that business features and objects are only available to authorized.
Complete management and confirmation tools to allow remote installation and management of the server.
MTS provides an application / server basic structure to meet the above requirements.
Constructs components-based applications:
From the component constructor, it is very attractive to developers and is one of the early goals of object-oriented calculations. Since it provides a natural way to encapsulate business features, it is more attractive to the development server application.
However, component engineering procedures is difficult than it appears. A fundamental weakness of the early object system is a lack of a common framework to allow developers to combine objects created by different parts from creating objects in a complete program whether they are in the same process or cross process. The component object model (COM) solves this problem.
However, it is not enough to simply use a COM model to construct a server application from a component. This component must use a common service framework. The chances of those who have the developers who constructed server frameworks use other groups of components will be small.
The MTS program engineer and programming interface provide a common framework to construct components-based server applications.
Keep the integrity of the program:
It is very important that the business system should accurately maintain business. For example, a online library must track orders. Otherwise, it will produce huge income loss. Existing orders may be lost or delayed when ordering orders, and unsatisfactory users may go to elsewhere. Maintaining the integrity of the commercial system is not easy, especially after an error occurs. Ironically, even if the computer has become more reliable, the system becomes more unreliable as a whole. The error is a frequent event for the Numerible table-type computer that provides Internet and intranet to dozens, hundreds, and even tens of thousands of servers.
The requirements for distributed procedures make the problem complex. Business matters, such as books, gradually involved in multiple servers, must confirm its credit, books must ship, must manage inventory, and customers must have funds. All this makes multiple database updates on multiple servers must be required. Distributed developers must expect some part of the program to continue running after an error in other parts. These anti-wrong regulations are several times that of a single program.
Business procedures are often required to coordinate multiple jobs as a single business affairs. A online library will definitely not arrange the shipping schedule without processing the appropriate order, and it is impossible to charge the user without notifying its delivery date. Coordination of these work makes them or does not happen, and if there is no special system support, it is very difficult.
Even when an error occurs, make sure that the minimum unit of the program is not easy. Especially when an application is distributed over multiple databases and systems. This problem has been used in a variety of components that hide their capable completion.
The program must also provide consistent behavior when multiple users get the same component. The simultaneous order for the same book should not generate only a book to two users. Resource competition will eventually cause inconsistency unless the program is written correctly. These problems are difficult to solve and spend a lot of money. And more likely to occur as program growth and cost increase. This is also caused by the use of components.
MTS uses components-based programming complete transactions that make you develop robust, distributed, component-based programs.
MTS engineer
This part is an introduction to the main elements of MTS engineers
These elements include:
ActiveX components, complete the application functionality.
Transaction management service executor runs service for program components.
Service processing, providing a proxy processing environment for the storage program component.
Resource Manager (RM), the stage of the management program, such as related database systems and transactional messages.
Resource allocator, management process within the component, non-durable sharing data, including the database connection pool, management queue.
Microsoft distributed transaction coordinators allow for coordination of transactions through multiple resource managers, distributors and program components.
Microsoft Transaction Server Components: Program Components Make business behavior. These components have complete business rules, providing views and program state changes. Consider an example of online library. The records used in the database system represent the durability of the business, such as hang orders, convenient directories, acceptable bills. The application component refreshes the status to reflect changes such as new orders and directory sends.
The MTS program component is ActiveX processing server (DDL). You can create and implement these components by using Microsoft Visual Basic, Visual C , Visual J or any development tools compatible with ActiveX.
ActiveX is based on CoM, including:
Interface concept, method of requesting service from objects;
Connection to transparent objects via processor and machine boundaries;
Confirm the mechanism of components, dynamic loading, and implementation components;
Objects can support multi-interface through the MTS engineer and provide a user to query the special interface of supported objects. And allow components to provide different levels of features and gradually introduce new versions.
The MTS extends COM to provide a universal server program framework. In addition to the intrinsic features mentioned above, MTS also handles the server registration, process, thread management, content management, shared resources management and synchronization, and components-based security management. Introducing transactions into program templates as a minimum unit update and mechanisms that meet the consistency in components, database systems, and network boundaries. Each component has a transaction property that points out the transactional semantics of the component. This allows transactional content to be automatically managed by MTS. The MTS user avoids complex service events, allowing users to focus on completing business features. Since the running component under MTS can make full use of the transaction service, the user can write the program as a separate state. MTS processing complicated events at the same time, resource pool, content management, and other system levels. The transaction system works with the database server and other types of resource management, ensuring that both transactions are powerful, consistent, appropriate separation, and once completed, change is durable.
The application is assigned as a component of ActiveX, called a package. The parcel defines the error separation and trust boundary.
Transaction Management Service Actuator:
The Transaction Management Service Actuator is a dynamic connection library (DDL) that provides runtime services for the transaction management service component. These services include thread management and content management. These dynamic connection libraries are loaded into the host process of the application component and executed in the background.
Service process:
The service process is the host system process performed by the application component, and provides services for dozens, Cheng Hundred, thousands of customers. You can configure multiple service processes on a computer. Each service process reflects a discrete trust boundary and error insulation.
Other process environments can also make the application components run on it. This allows you to assign applications to suit different distribution, performance, and error insulation requirements. For example, you can configure the MTS component directly to the Microsoft SQL server or on the Microsoft Network Information Server (IIS). You can also configure them directly to the customer process.
Resource manager:
Resource manager is a system service that manages durable data. Server applications use resource managers to maintain the durability of the application, such as convenient inventory directory records, expired orders, and accept accounts. Resource managers work together to ensure the highestness and discrete of the application. Microsoft SQL Server, Durable Message Queue and Transactional File Systems are examples of resource managers.
Minimizes ensure that all updates in a special transaction can be completed (and persistent) or abandoned and returned to the original state. Consistency means that a transaction is the correct conversion of the system state, saving status variables.
Discrete makes it possible to simultaneously know the information and unfinished results of other transactions, so as not to cause instability of the application status. Resource manager applies the unfinished work of the active transaction management program based on the transaction-based synchronization protocol.
Durability means an update to manage resources (such as database records), which can be affected by errors, including communication errors, process errors, and service system errors. The log of transaction management can even allow you to resume durable states after the disk media is expired.
The highestness and discrete collaboration work makes the transaction manager appear immediately. The intermediate state of the transaction manager is invisible to the outside, and the result is produced: or all the work is complete, or there is no completed. This allows us to use the transaction manager as a session when writing an application component, which is a very simplified simplification of the application developer.
MTS supports resource managers to complete OLE transaction management protocols or X / Open XA protocols. There is a toolkit with developing resource managers.
A resource allocator manages non-durable shared data in a process represents application components. Resource distributors are similar to resource managers, but there is no guarantee or durability. MTS offers two resource alligators:
ODBC resource distributor
Share attribute manager
And provide a toolkit to develop resource allocners
ODBC resource alligator:
The ODBC resource distributor uses the standard open data connection interface to manage the data connection pool of the transaction server. The ODBC resource distributor maintains database connection pools, fast, and efficient assignments to object connections. Connecting automatically listed in the transaction handler of the object. Resource distributors can automatically recycle and reuse. The ODBC resource distributor is a dynamic connection library that provides this functionality to the user and the internal body is in the characteristics of the MTS.
Share property managers:
Shared feature managers synchronize for defined applications, process widths, attributes (variables). You can use it to maintain a web page surf counter, a constant data buffer, or provide a high-speed buffer to avoid overheating points of the database. (For example, a unique receiving member).
Microsoft Distributed Transaction Management Coordinator:
Microsoft Distributed Transaction Management Coorders are a system service that coordinates transactions across multiple resource managers. Even if the transaction may span multiple resource managers on a discrete computer, it can also be done as a minimum transaction.
Microsoft Distributed Transaction Management Coorders are earliered as part of the Microsoft SQL Server 6.5 and is included in the MTS. It completes two-stage commitment protocol to ensure transaction results (completed or abandoned) are consistent in all resource managers.
Microsoft distributed transaction management coordinator ensures minimal, whether in errors (node conflicts, network crashes, or resource managers, applications error actions), conditional competition (the transaction manager starts working and one resource manager is giving up) or Availability (a resource manager is equipped with a transaction but does not return) happens.
Microsoft Distributed Transaction Management Coorders support resource managers that meet OLE transaction management or X / Open XA protocols.
in conclusion:
The Microsoft Transaction Management Server will change people to develop business applications. Component Basic Technology, Object-Oriented Technology and Time Verification Techniques for Distributed, Online Transaction Treatments The applications that are arranged by the usual components that are purchased are easier. Economic advantages will produce a new market for commercial components. This situation, in turn, makes problems that have not been solved have been commercially solved.
Microsoft transaction services have been launched in two phases. Initially, a distributed transaction coordinator is issued in April 1996 as part of Microsoft SQL Server Version 3.5. It provides two phases of the distribution of different data repositories.
In November 1996, the Microsoft Transaction Server was released. It provides a reliable, variable scale, distributed execution environment for programming environments and runtime required to run ActiveX components.
Learn more:
Discover the latest Microsoft server transaction management information, to its Web (http://www.microsoft.com/transaction/) site can also refer to << Transaction Processing: Concepts and Technology >> Author: Jim Gray & Andreas Reuter, Morgan Kaufmann Publishing Society, 1993.
The content included in this article represents the latest views on Microsoft companies on the discussion issues as the latest publications. Because Microsoft must respond to the market situation, Microsoft does not commit to explain these content, nor guarantee the accuracy of the content after the date of publication.