Azure ServiceBus Topic using REST API – Part 3

יום ראשון, מרץ 11, 2012

In the last two posts we showed how to use the Azure ServiceBus service bus REST API to send a message to a topic. In this post we will see how to listen on a topic and receive a message. There are two options: 1. Receive a message and delete it from the topic. Receive and Delete public static T ReceiveAndDeleteMessage<T>(string serviceNamespace, string topicName,     string subscriptionName, string token) where T : class {     var address = string.Format("https://{0}.{1}/{2}/subscriptions/{3}/messages/head?timeout=10",         serviceNamespace, sbHostName, topicName, subscriptionName);     WebClient webClient = new WebClient();     webClient.Headers = token;     byte response = webClient.UploadData(address, "DELETE", new byte);    ...

Azure ServiceBus Topic using REST API – Part 2

יום חמישי, מרץ 8, 2012

In the last post I described why to use REST API when working with Azure service bus and demonstrated how to create a topic and subscription. In this post we will actually send a message to the topic. When sending a http request with a message to a topic we have to provide two special headers 1. Authorization header with the token we received from ACS 2.  BrokerProperties with Json serialization of metadata of metadata about our message. To do that let us create a special class that will help us represent and serialize the metadata. Broker Properties /// <summary> /// Container for general...

Azure ServiceBus Topic using REST API – Part 1

יום ראשון, פברואר 26, 2012

To use Service Bus, we must ensure that our firewall allows outgoing TCP communication on TCP ports 9350 to 9354. This is not a very strong request yet some customers cannot touch their firewall policy and so their firewall blocks all interaction with the service bus. In such scenarios (any many others) AppFabric REST API is the only alternative to work with the service bus. When working with the REST API we have to construct Http request to the service bus resource we want to work with. Unfortunately the REST API documentation is not accurate. In this post I...
one comment

Windows Azure–Prices are going down

יום שלישי, דצמבר 13, 2011

Microsoft announced a price update for several Azure services. Many customers asked about the pricing policy of the new features in service bus (e.g. Queues and Topics). This announcement provide a clear answer. No more connection package. From now on a simple Time and Payload model. Reduced price for data transfers: $0.12 per GB for outbound data transfers for Zone 1 (Europe and North America) $0.19 per GB for outbound data transfers for...
no comments

Why Windows Server AppFabric Monitoring does not work

יום רביעי, נובמבר 30, 2011

I wanted to demonstrate how Windows Server AppFabric Monitoring works for WCF services, but when I called my services I did not see any recording of any WCF call. Why?  It took me some time to find the problem. To make the story short. AppFabric monitoring relies on SQL Agent. WCF event are written to a database that is set when we configure AppFabric Hosting Service. This information is written to the "ApplicationServerMonitoringConnectionString" connection string in the root web.config of the server When the system is working properly, WCF events are written...
one comment

Securing AppFabric Service bus with ACS

יום רביעי, נובמבר 23, 2011

I was working with a customer that wanted to use AppFabric Topics to push notifications to clients. as We all know anyone who wants to listen or send messages using service bus has to authenticate first. Traditionally authentication to the service bus was done by presenting a secret key before a connection was established.It is reasonable to put the secret key in a software package deployed on a server (Some can argue with that and say it is a security violation) but providing the key to numerous clients? This is a true security breach. So How can we...

Using AppFabric Azure Topics

יום חמישי, נובמבר 17, 2011

Recently the AppFabric team released real pub-sub capabilities with the new queues and topics features. Queues are simple. AppFabric provides a queue for durable messaging between senders and receivers. Topics are interesting because they allows to create different subscriptions so different clients can receive only the messages they need. To demonstrate how to use topics I created two helper classes: Senders and Receiver that will send and receive messages using AppFabric Topics. Sender /// <summary>     /// Send messages to AppFabric Topic     /// </summary>     /// <typeparam name="T"></typeparam>     public class...

Convert SAML token to SWT token using ACS

יום רביעי, נובמבר 16, 2011

In Claim based applications we use token to provide the application (Relying party) with details (a collection of claims) about the the authenticated identity. In web sites and WCF SOAP services SAML tokens are used as a container for the claims. SAML is a standard that describe how token and claims are constructed and how they are cryptographically protected using digital signature and encryption. SAML tokens are powerful yet they are large. The size of the token is not a real issue in ASP.Net web sites as well as in SOAP WCF services but for REST web services...
no comments

Workflow in the Cloud

יום שלישי, יולי 26, 2011

One of the major missing parts in windows azure was the support for workflow. You could install a workflow on a web role but when multiple instances of the web role try to persist and load the same workflow instance an exception is thrown. Workflow was designed to run by a single host that persist its state to a single database. This concept does not fit to the cloud that uses multiple computing instances by design. Azure AppFabric provides the solution. A whole new host was developed especially for the cloud. We as developers do not have to...
no comments

Windows Azure AppFabric June CTP was released

יום רביעי, יוני 22, 2011

As I wrote in my last post AppFabric is about to release a whole new exciting set of important capabilities. Windows azure AppFabric will be the new generation of middle-tier infrastructure. Well it is here. The CTP was released. This CTP release consists: (from the team blog) AppFabric Developer Tools - Enhancements to Visual Studio that enable to visually design and build end-to-end applications on the Windows Azure platform. AppFabric Application Manager – Powerful, yet easy way to host and manage n-tier applications that span web, middle and data-tier through...
no comments