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

ArticlesInterceptors Add Object Functionality


December 1997 / Features / COM+: The Next Generation / Interceptors Add Object Functionality

In COM today, the COM library is not directly involved when a client calls a method in a COM object. Instead, the call goes directly from the client to the object. In COM+, this is no longer true. All COM+ method calls pass through the COM+ library, although Microsoft promises that the overhead this incurs will be negligible (see the figure "Two COM+ Method Calls" ). Since COM+ is i nvolved in every method call, it's now possible to insert other objects in that path. A COM+ object that is automatically invoked during access of another COM+ object is called an interceptor .

One or more interceptors can lie in wait along the path (as shown in the figure ). For example, an interceptor might perform a security check on the client, then cause the method call to fail if the necessary permissions aren't in p lace. Doing this allows keeping the authorization logic separate from the business logic in the component the client is using.

Interceptors could also be used to manage the state of the destination object. An interceptor might stand in for the object itself, allowing a client to believe the object still exists when it has actually deactivated. Doing this allows building much more scalable applications, and it is very similar to what the Microsoft Transaction Server (MTS) does today. In fact, Microsoft plans to restruct ure MTS using interceptors when COM+ is available. An interceptor could even perform load balancing, transparently distributing method calls to various equivalent objects in turn.

By placing specific attributes in the client code, the client can determine which interceptors load when using a particular COM+ object. But, despite their convenience, interceptors suffer from one potential drawback: performance. Having to traverse a sequence of interceptors on every method call to an object is bound to slow things down.

Microsoft's expectation is that interceptors will primarily be for system-level functions: for the most part, a few highly optimized COM+ objects will be the most commonly used choices. Still, there are likely to be many situations where the convenience and flexibility of interceptors outweigh the performance hit they bring.


Two COM+ Method Calls

illustration_l ink (17 Kbytes)

Interceptors in the path can check client security, stand in for the object, or perform other tasks, but they increase the call's overhead.


Up to the Features section contentsGo to previous article: Interceptors Add Object FunctionalityGo to next article: 1997 Editors' Choice AwardsSearchSend 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