This website has been designed for use with the FireFox browser. Please use FireFox to view this page.
12. “NoDelay” database inserts, with MSMQ & COM+
COM+ / MSMQ Queued components are a means by which methods
written in .NET classes can be executed remotely and asynchronously, through
the use of MSMQ (Microsoft Message Queue). The benefit of this architecture is
that the calling application does not need to wait for a response from the
callee.
Like the “NoDelay” construct in MySQL, but unfortunately
absent in Microsoft database implementations, such as SQL server or Access,
this example permits a calling application to make an asynchronous database
insert. This means that an application can make bulk database inserts without
slowing down the client application, by delegating the task to MSMQ and COM+.
To use the application, type in DSN (Data source name) into
the space provided and an Update or Insert SQL statement. Then press ‘execute’.
The program will return immediately, and the message will be queued for
execution in MSMQ. Then executed against the database by COM+ component
services.
The underlying architecture of COM+, as the name would
suggest is COM, however, through the use of .NET interop, it is possible to
implement the system in .NET, using implicit RCW’s (Runtime Callable Wrappers)