Comparing Service Bus for Windows Server with Windows Azure Service Bus
Although symmetry exists between Service Bus for Windows Server and Windows Azure Service Bus in APIs and messaging features, there are differences between the two Service Bus products.
Management
With respect to manageability, in a hosted Platform As A Service (Windows Azure) environment, the PaaS vendor (Microsoft) provides the management. With the Service Bus for Windows Server, the local administrator deploys, secures, scales, and monitors the Service Bus for Windows Server farm.
Claim based security
In both Windows Azure and Windows Server, the Service Bus requires access tokens for authorizing access to its messaging entities.
Because the Windows Azure Access Control Service (ACS) is not available on Windows Server, the Service Bus for Windows Server includes a simple Service Bus Security Token Service (SBSTS) integrated with the Windows security model.
The SBSTS can issue Simple Web Tokens (SWTs) based on Windows identities (stored in the local Windows identity store or in Active Directory).
Address
The addressing schema is fixed in the Windows Azure Service Bus. In other words, all the endpoints have the Service Bus postfix added to the URL.
With the Service Bus for Windows Server, you can use the fully qualified domain name (FQDN) of the hosts, or a mapped DNS entry representing your service.
The stack
The Service Bus for Windows Server is built on
- Microsoft .NET Framework 4.0 PU3
- Windows Server 2008 R2
- SQL Server 2008 R2 and SQL Database
- Windows PowerShell 3.0.
All these platforms must be running on a 64-bit operating system. The storage layer for the system (SQL) can be on dedicated remote server or on one of the compute nodes or in Windows Azure SQL Database. The compute nodes used this stack can be hosted either on-premises or on Windows Azure IAAS.
Intra-Farm Communication Patterns
Because the Service Bus for Windows Server server farm is “highly available”, there is inter-process communication that spans local and remote computers.
The Gateway
The Service Bus gateway process is a stateless service and can communicate with the message broker on local or remote machines within the farm.
The message broker
The Service Bus message broker process on every machine registers with the Windows Fabric service (on the same machine). This registration indicates availability to host Windows Fabric services.
Windows fabric
The Windows Fabric services on every machine communicate with each other to establish a “Highly Available Ring.”
Service Bus Gateway
All incoming requests from clients are first received and processed by the Service Bus Gateway. The protocol heads process the requests and perform the necessary authentication, authorization, and address resolution. The request is then forwarded to the appropriate message broker. In some cases, the client then communicates with the message broker directly for subsequent requests.
Clients can use Net.TCP or REST over HTTP as the protocol for communication with the Service Bus for Windows Server server.
The wire
The wire protocol is proprietary.
BUT
Microsft says:
"AMQP 1.0 is a Standard (with a capital ‘S’)"
"AMQP 1.0 support was added to the Windows Azure Service Bus as a preview feature in October 2012. It is expected to transition to General Availability (GA) in the first half of 2013."
Windows Service Bus will support this 2013 Q2-Q3
Service Bus Message Broker
The message broker is an NT service that hosts the protocol head and one or more message containers. The service registers itself with Windows Fabric and acts as a host for the message container service.
The lifecycle of the NT service is the basis for failover detection and high availability.
Message Container
You can view the message container as a logical collection of runtime (compute) logic that is backed by a persistent store (SQL Database). In the case of failover or for load balancing, the message container is a modular service that moves. Each message container is backed by a store (SQL database) and hosts a set of queues, topics, and subscriptions as determined by a simple round-robin capacity management algorithm. Entities such as queues, topics, and subscriptions placed in a container cannot be moved, and remain with the container and its associated database. All state related to the message container is persisted in the database.
Windows Fabric
This process contains the core logic necessary for high availability, farm and cluster formation, and load balancing across machines in the farm. The messaging broker service on each machine registers with the Windows Fabric process on respective machines. Windows Fabric determines the number of registered instances of the message container service and places them on the various machines in the farm based on a simple load balancing algorithm.