Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers Request free information on products written about or advertised in BYTE Submit a press release, or scan recent announcements Talk with BYTE's staff and readers about products and technologies

ArticlesMicrosoft's Efficient Transactions


August 1997 / Cover Story / Web Components / Microsoft's Efficient Transactions

Microsoft Transaction Server (MTS) isn't just about guaranteeing completion of transactions. It's about performance. MTS can offer an immediate increase in processing and memory efficiency to applications. For example, if the third tier of your application requires connection to several SQL databases, MTS's Connection Pool will create those connections just once when it initializes, rather than incurring the repeated overhead of remaking connections.

How? Conventional distributed object systems store all data inside objects and maintain long-lived reference s to them. Under MTS, all the persistent data remains stored in the back-end database and is fetched only fleetingly into middle-tier objects for processing. A new instance of a component is created "just in time" by the first call to one of its methods, which then populates it with data from the database. Once the method calls SetComplete, the instance relinquishes all its state information and is deactivated. It may be reactivated and reused by another process in the future ( actually, every new instance gets assigned a context object that preserves some state--the transaction status and security ID--between activations). This way, many client processes can use the same instance, thus avoiding the proliferation of objects that often plagues object-oriented designs.

On the other hand, should a method need to access the database many times, it can keep re-using the same instance and avoiding the overhead of setting up a new object and connection. This scheme encourages a programming style that's a clever compromise between classical object-orientation and on-line transaction processing (OLTP) techniques.

There are some downsides. In its first release, MTS's multithreading support is restricted to "apartment" threading, where only instances of the same class can run on different threads. Later versions will support "worker" threading, where any instance can run on any thread. And by using ODBC and Distributed Transaction Coordinator (DTC), which ships with Microsoft SQL Server, MTS applications can participate in Extended Architecture (XA) transactions, but X/Open TP monitors can't call components running under MTS. And MTS doesn't support nested transactions (i.e. atomic subtransactions within transactions), though the MTS architects claim these are an unattainable academic mirage and that MTS's fine granularity renders them unnecessary.

In May, Microsoft announced that MTS was to be integrated into Windows NT 4.0, making its transactional abilities available to all applications and file systems.


IIS and MTS Together

illustration_link (25 Kbytes)


Up to the Cover Story section contentsGo to previous article: Microsoft's Efficient TransactionsGo to next article: The CORBA ConnectionSearchSend a comment on this articleSubscribe to BYTE or BYTE on CD-ROM  
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network