15. Microsoft Message Queue (MSMQ)

< BACK  NEXT >
[oR]

Chapter 15. Microsoft Message Queue (MSMQ)

Windows CE devices are typically disconnected most of the time, but many applications still need to interact with enterprise data. Chapter 4 (Property Databases and the Registry) and Chapter 16 (ADOCE) show how data can be stored and retrieved on the device. The data, though, somehow needs to be transferred from the enterprise server onto the Windows CE device in the first place. Further, if data is updated on the Windows CE device, the changes need to be refected back at the enterprise server. For example, a Windows CE application may allow orders to be taken, and these orders need to be transferred to a server database when the device next connects. At the same time, changes in product pricing or specification may need to be downloaded to the device.

Many desktop applications use Distributed COM (DCOM) to interact with components running under Microsoft Transaction Server (MTS or COM+), and these components implement business rule validation and access data stored in databases. However, this architecture does not work when devices are disconnected, so a different solution is required. Chapter 8 showed how HTTP and other TCP/IP protocols can be used to transfer data; however, the details of theupdates need to be stored somewhere. Microsoft Message Queue (MSMQ) solves this problem by allowing applications to store messages, which will be transmitted to a server automatically upon connection. Applications running on the server can then pick up these messages and process them. Each message can contain data in any format the application specifies the format and nature of the data each message contains.

The problem of transferring and storing data does not exist only with mobile Windows CE devices. Embedded devices may be connected to the network most of the time, but in the event of a network failure, the applications need to continue operating without the network connection. For example, consider the situation where a Windows CE embedded device is used in a production line for testing components, and the test information is stored on a server database. If the network connection goes down, the testing application could fail and halt the entire production line. Instead, the testing results need to be stored in a queue and transmitted to the database when a network connection is present. When the network is down, the results remain in the queue waiting for the connection to be reestablished.


< BACK  NEXT >


Windows CE 3. 0 Application Programming
Windows CE 3.0: Application Programming (Prentice Hall Series on Microsoft Technologies)
ISBN: 0130255920
EAN: 2147483647
Year: 2002
Pages: 181

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