Chapter 10 -- Introduction to Messaging and Asynchronous Communication

[Previous] [Next]

Chapter 10

Messaging has traditionally been an integral part of distributed application programming, especially in larger, mission-critical systems. Messaging offers an extra dimension that you can't achieve using synchronous protocols such as RPC and HTTP. This chapter explains how messaging products such as IBM's MQSeries and Microsoft Message Queuing (MSMQ) enable companies to reap the benefits of messaging without having to hand-roll a sophisticated communication infrastructure.

This chapter explains why and when you should use messaging in a distributed application. It also explains how message queues can add responsiveness and reliability to an online transaction processing (OLTP) application that you can't get by other means. I'll also show you how to write applications that send and receive MSMQ messages using Visual Basic. While I can't show you every aspect of MSMQ programming in a single chapter, my goal is to get you started by showing you the most common techniques for creating applications that send and receive MSMQ messages.

The chapter also explains how MSMQ supports transactional messaging. You must send transacted messages to transactional queues in order to ensure exactly-once delivery. You'll learn two straightforward techniques for sending and receiving transactional messages with MSMQ and Visual Basic: You can leverage MSMQ's internal transactioning mechanism, or you can use a COM+ transaction, which leverages the Distributed Transaction Coordinator (DTC).

After I describe MSMQ, I'll introduce in this chapter the Queued Components service, which is part of COM+ and Windows 2000. The service is an ease-of-use framework that's layered on top of MSMQ. Queued Components provides the benefits of MSMQ without requiring you to deal with all the complexities of MSMQ programming. As you'll see, an understanding of MSMQ is helpful in learning how queued components work.

This chapter also describes the COM+ Events service, which helps you build applications that provide event notifications to other applications. Just as you should know the basics of MSMQ before you learn about queued components, you should understand how to design and configure queued components if you want to make the most of COM+ events.

While this chapter won't provide a complete reference to all these topics, it will explain their architecture and how they fit together, and it will help you decide among MSMQ, Queued Components, and standard COM method calls during the design phase. You'll learn the strengths and limitations of COM+ events, and you'll learn how to determine whether they're appropriate for your application. When you actually write applications that use MSMQ or Queued Components, however, you should consult the documentation in the Platform SDK and possibly other resources to supplement the material in this chapter.



Programming Distributed Applications with COM+ and Microsoft Visual Basic 6.0
Programming Distributed Applications with Com and Microsoft Visual Basic 6.0 (Programming/Visual Basic)
ISBN: 1572319615
EAN: 2147483647
Year: 2000
Pages: 70
Authors: Ted Pattison

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net