New MassTransit Screencast and Sample

One of the more common scenarios I hear about when talking about building a service-oriented architecture has to do with providing a web service to external customers. This is often in the context of providing information from an internal system. The problem comes with how many of these systems are built.

In many situations, a web service is created (perhaps with ASP.NET Web services, an .asmx) which accepts a request from a client, performs some query against the production database, and returns the results. This is a very tightly-coupled way of meeting the requirements. How does one go about reducing coupling? Well, all too often the answer is “just add another web service.” You can see where this is going. The control still follows a chain of web service requests up until the final connection to the database.

The new WebServiceBridge sample in MassTransit demonstrates how to break this coupling using the publish/subscribe architecture. When the external web service receives a request, a message is asynchronously published. A subscription to the requested information is added at the same time. A completely insulated service then handles the request, publishing the response to the bus. The web service request that was pending is completed and the results of the query are returned to the client.

In the sample, this all happens with the least amount of load on the web server by using the asynchronous nature of web methods in ASP.NET. This reduces the load on the web servers, making it easier to handle multiple requests without extensive hardware requirements.

Last night I made a screencast that goes through this new sample and shows how it works. You can download the screencast here (please Save As to conserve bandwidth). Check it out and let me know what you think. Questions and comments are always welcome!

About Chris Patterson

Chris is a senior architect for RelayHealth, the connectivity business of the nation's leading healthcare services company. There he is responsible for the architecture and development of applications and services that accelerate care delivery by connecting patients, providers, pharmacies, and financial institutions. Previously, he led the development of a new content delivery platform for TV Guide, enabling the launch of a new entertainment network seen on thousands of cable television systems. In his spare time, Chris is an active open-source developer and a primary contributor to MassTransit, a distributed application framework for .NET. In 2009, he was awarded the Most Valuable Professional award by Microsoft for his technical community contributions.
This entry was posted in .net. Bookmark the permalink. Follow any comments here with the RSS feed for this post.