The .NET Service bus is a powerful and useful feature from Windows Azure Cloud Computing. The .NET Service bus is designed to address the connectivity issues in advanced communication scenarios. The main issue it addresses is Internet connectivity. This post explains how it addresses these issues in real world.
Internet Connectivity Challenge
Often when you are connecting the service, it is located behind the firewall
and behind the load balancer. Its address is dynamic and can be resolved only on local network.
When you are having the service callbacks to the client, the connectivity challenges are shown in above figure. This leads to scalability, availability and security issues.
The solution to Internet Connectivity challenges is – Instead of connecting client directly to the service we can use a relay service.
Solution Relay Services
The Relay service is a service residing in the cloud whose job is to assist the connectivity and relaying the calls to the service. Relay Service solution require both the client and the service intranets to allow connections to the cloud.
Relay Service Operation
1. Both service and client must establish the connections and authenticate against the relay service.
2. When Client calls the relay service, the relay service forwards the call to the service.
It seems straight forward in figure but there is considerable amount of network programming and security issues and more are there to address.
No programming is required to establish the solution. The .NET Service Bus is a ready-made relay service hosted and managed at Microsoft Data Center. It is a single place to manage the credentials of the client and services.
The main difference between connecting to a regular WCF Service and relay service revolves around hosting.
The .NET Service Bus supports the WCF programming model by offering dedicated bindings and behaviors. It also supports core WCF features like reliable messaging,message security and transport security.
The .NET Service Bus also supports two additional programming models Message queuing and Message routing.
In the next post I am going to explain about building a Relay Service using .NET Service bus.