The Windows Azure Media Services is a tool that helps the developers storing, transferring and streaming different types of media. It is basically based on the Windows Azure unstructured storage, Blob Storage. This service is mainly to help the developer with mainly three things: Upload Media, Encode Video and Deliver and Stream Video.

First of all you have to create a Media Service account on the Windows Azure, to do so go to your Windows Azure account and follow the steps.

Now Congratulations!! Let’s get in depth about the features that you can start using on the Windows Azure portal.

As you can see in the following, the home page of the media services created, normally in any home page whether in the Windows Azure Mobile Services or Windows Azure Media Services, this page helps you with the basics of the development that will help any developers. As you can see Windows Azure Media Services is only to be created using only 2 programing languages, C# and Java.

It also helps you with the development to achieve any of the previously mentioned issues the upload, the streaming or download and encode.

The last thing is you will find a sample project where you can download and go through the basic of the development whether using the C# and the Java development.

In the Dashboard, you will be able to monitor the performance and the tasks queued, delivered and failed of the Windows Azure Media Service Created. Also you can find a link where you can download the Windows Azure Media Service SDK. For your information, to start developing you will need the following 3 SDKs, the Windows Azure SDK, the Windows Azure Media Service SDK and the WCF Data Services 5.0 for OData V3 libraries.

The third tab is to help you scale your running Media Services whether for streaming or Encoding.

You can also upload some content directly to Windows Azure Media Services without the need to code or create any kind of application. You can do so not only from your local computer but from the Windows Azure Storage if previously uploaded to a Windows Azure Storage account.

Advertisements

The Windows Azure Service Bus Notification Hub is finally released and it is generally available to be used in the development. It supports multiple platform push notification like Google, Microsoft and apple push notification. The Notification Hub will easily help the application to reach millions of users through their mobile or windows application by simply sending them a Notification through the Service Bus.

Here are the differences between the Windows Azure Mobile Services and the Notification Hub push notification. This table is taken from Announcing General Availability of Windows Azure Notification Hubs & Support for SQL Server AlwaysOn Availability Group Listeners

Mobile Services

Notification Hubs

MPNS, WNS, APNS, and GCM support

Yes

Yes

Turnkey event-triggered push

Yes

No

Device registration management

No

Yes

Interest tags for routing messages to a subset of users

No

Yes

Templates for formatting messages to user preferences including language

No

Yes

Broadcast to >1 million devices at once within minutes

No

Yes 

With the release of Microsoft Visual Studio 2013 preview, it didn’t support the Windows Azure SDK 2.0. So the new SDK 2.1 is specially designed to extend the Visual Studio 2013 capabilities to support the Windows Azure development. Certainly the Windows Azure SDK 2.1 also is available for the older visual studio 2010 and 2012.

The first part is related to Windows Azure Virtual Machine, is to take the full control over the Windows Azure Virtual Machine over the Windows Azure. You can now start and stop the Virtual Machine created on the Windows Azure that will help you with more control on the Visual Studio. Now the Virtual Machine after the creation the Virtual Machine, the Virtual Machine start costing you money and every minutes it cost you more as long as the Virtual Machine is running. Now you can take control over the Virtual Machine created because when you stop it, it will stop costing you and will give you the chance to save money until you start it again. This feature is available now from Visual studio directly you can start and stop the Virtual Machines.

The second main feature is the introduction of the Windows Azure Express Emulator. Beside when developing a webrole or a workerrole using the Compute emulator (Cloud Services) you can use the express emulator to run it and test it as the express one doesn’t require you to run as administrator to test your project as it uses less resources.

Certainly there are some new updates in the server explorer that can helps you get more details about your cloud services and resources.

To download Windows Azure SDK 2.1:

For the Relay Messaging Service Bus, it goes with the same process like the Brokered Messaging but only in the configuration part.

Now Congratulation you have created your Windows Azure Service Bus Relay Service on the Windows Azure.

You can follow the following instruction to create a Relay Service, however it is a lot easier than the Brokered Messaging. Before starting working on the Relay Service, I recommend that you learn more about what is the Service Bus Relay Messaging, the Brokered Messaging and what are the difference between them.

After introducing the EAI (Enterprise application Integration), and its solution the Windows Azure Service Bus and its different solution, the Brokered Messaging, the Relay Messaging and the difference between them. I went in details with the Brokered Messaging API and here I am into the Relay Service in deeper.

Unlike the Brokered Messaging target to connect multiple clients to an application, the Windows Azure Relay Service is to connect multiple application together from different datacenter, in our case one will be on the Windows Azure and the second one will be the company datacenter. The Relay service is offering to communicate multiple application across multiple datacenters to deliver reliable application.

To work with the Relay Service, this will require you to develop a WCF Service it doesn’t require more than that. All you have to do later on is to define the service bus endpoints in your configuration file and after that create the endpoint programmatically in your application using the normal WCF with defining the Service Bus Environment in it. Certainly you will have to define what type of binding you are willing to work with. Here are the types of the Binding you can work with and the differences between them, the NetTCPRelayBinding, the WSHTTPRelayBinding, the NetOneWayRelayBinding and the NetEventRelayBinding.

For those who have worked with the Windows Azure Mobile Services, after building a new Windows Azure Mobile Services you can download the application or connect it to the application you have already built. For each application you build using this mobile service or for any change of the application domain you will have to add its domain to the Windows Azure Cross-Origin resource sharing known as CORS. The reason you will have to do so is to allow the communication between the different applications, from different platforms with different URLs to communicate with your Windows Azure Mobile Services.

I have faced this error especially when I was developing an application on the local machine. If you have downloaded the application from the portal directly and have run it without any modification it will run smoothly without any errors, the reason it worked smoothly is that if you went to the CORS under the configuration you will find the local host added to the CORS.

If you have added a new project to your solution that you have downloaded from the portal, and just run it. You will find that it will run smoothly but won’t execute any functions that require actions from the Windows Azure Mobile Services. The reason is that your application that runs on your local machine is not using local host but an IP with 127.0.0.1 that you will have to add it manually on your Windows Azure Mobile Services only for the testing after that I think that you will have to remove it before publishing the application.

Now as we have known the Windows Azure Cloud Services whether a webrole, a workerrole and how to communicate between them using Queue storage.

 

If you are going to develop an application on Windows Azure and you want to make the required connection between multiple roles first thing you have to define is your endpoints. For the role you are going to allow the connection to reach you will have to create its endpoint and consider it as input endpoint. To do so you will have to go to the role you created in the cloud project and double click on it to go to its properties. To the Endpoint tab and create a new Endpoint. Choose its type to “Input” and enter the value of the port. The following figure shows you how:

Enter the following 2 libraries:

using
System.Net.Sockets;

using
System.IO;

 

After that in your application just create a new TcpListener to receive the incoming request. Once the Tcp listener accept the incoming traffic from the specified endpoint previously created. To do so, there is an example code.

TcpListener
listener
=
new
TcpListener(RoleEnvironment.CurrentRoleInstance.InstanceEndpoints[“EndpointName”].IPEndpoint);


listener.AcceptTcpClient();

 

After that you can read or write directly from the stream whether a stream reader or a stream writer. Now you have a Worker Role that accepts the communication from the endpoint whether it was from another role or any other application.

Here is a nice video clarifying more how to deal with the inter role communication.