Microsoft .Net Services consists of three main components:
They provide a hosting platform where you can develop connected, peer to peer applications that can speak to each other without considering the other complexities such as firewall rules and NAT etc,.
Consider the following diagram:
Company A has a web service which is also consumed by Company B. Certainly with all the firewalls and ‘network zones’, this doesn’t look simple to develop. There are at least 3 ‘network zones’ for the web service to cross and get into the cloud and even after reaching Company B, there are at least 2 ‘network zones’ to cross to reach the systems. Depending on the company’s network architecture, these ‘network zones’ can be complex and developers need to write complex code to overcome the firewall and NAT rules. Company B also has to enable firewall rules for the incoming requests/responses from the web service from Company A and vice versa. Certainly this is a complex process!
Microsoft .Net Services addresses the above common problem with the help of Service Bus, which provides a communication infrastructure that developers can make use of when developing such complex applications/services. Service Bus hides the complexity of the firewall/router/NAT and enables to host the service in the cloud. The client can then connect to the service through the Service Bus. However, the messages exchanged in a Service Bus are always authenticated and trusted. The Access Control block provides a Security Token Service (STS) which provides Identity and Management Service. So, the above diagram would now change to,
How are things accomplished using this Service Bus? Below is a typical message flow that happens in a Service Bus:
- Company A requests a Token by authenticating itself to the STS
- When authenticated, STS issues a token to Company A
- Company A can now initiate a connection to it’s Service
- Company B requests a Token by authenticating itself to STS
- When authenticated, STS issues a token to Company B
- Company B can now exchange messages with Company A.
The messages are authenticated and checked for authorization respectively by the STS. This can be described in a diagram as follows:
In my next post, lets write our first ‘Hello World’ application using Microsoft .Net Services