Windows Azure Management Tool

An excellent release which somehow missed getting its due attention is the Windows azure Management Tool!!

This tool can be used to manage not only your configurations but also enable logging, analyse reports in excel, increase, decrease your role instances , Manage your certificates and monitor your storage including some simple Partition key based querying!!.  And it also allows you to add to the functionality using MEF plugins!!

Here is a brief from its homepage!!..(Straight from the horses mouth:-))

Windows Azure Management Tool (MMC)

The Windows Azure Management Tool was created to manage your hosted services and storage accounts in Windows Azure. This tool provides a host of features:

     

clip_image002

Hosted Services

Upload, deploy, upgrade, and manage your hosted services in Windows Azure

clip_image004

Diagnostics

Configure instrumentation for Windows Azure applications (diagnostics) per source (perf counters, file based, app logs, infrastructure logs, event logs). Transfer the diagnostic data on-demand or scheduled. View / Analyze / Export to Excel and Clear instrumentation results.

clip_image006

Certificates

Upload / manage certificates for Windows Azure applications

clip_image008

Storage Services

Configure Storage Services for Windows Azure applications

clip_image010

Blob Storage

Add / Upload / Download / Remove BLOBs and Containers and connect to multiple storage accounts, including local dev storage

clip_image012

Queues

Add / Purge / Delete Windows Azure Queues

clip_image014

Tables

Query and delete Windows Azure Tables

clip_image016

Extensibility

Create plugins for rich diagnostics data visualization (e.g. add your own visualizer for performance counters). Create plugins for table viewers and editors or add completely new modules! Plugin Engine uses MEF (extensibility framework) to easily add functionality.

clip_image018

PowerShell-based backend

The backend is based on PowerShell cmdlets. If you don’t like our UI, you can still use the underlying cmdlets and script out anything we do

Here are some screenshots of the app at work

image

image

image

We at Cennest definitely look forward to using this tool to keep track of our deployments!!

Cheers!!

Cennest

Monetize your Silverlight Videos!!

Silverlight streaming seems to have caught the fancy of many and a lot of sites are now streaming Silverlight videos.. however very few are making money from doing so!!..

Recently came across an Open Source Silverlight Media player called OpenVideoPlayer which lets you do just that!!..

Dynamically Insert ads into your media files with configurations like Preroll, Mid-roll and Post Roll(which basically mean, before, in between or after a video file plays) . It uses the MAST sequencing engine for sequencing of ads and VAST as the ad-connector.

For those new to the ad monetization world..VAST would dictate the “WHAT” of an ad. Its a flexible XML format which specifies links to the ad creatives and allows click through and tracking..MAST on the other hand dictates the “WHEN” of the ad,its an XML format which specifies WHEN the ad should play and links to the VAST source to indicate which one. You can set multiple trigger conditions to set off an ad!

So using these two you can control which ads are played when and where they are streamed from..you can use Ad-Servers like Atlas or any other.

OK enough “Gyaan” as we say in India:-)…lets have some screenshots to understand what we are talking about..

Here is the Player playing a video

image

And here is the same video with a pre-roll ad..

image  

and the video starts after the ad is done with image

Lets look at what this solution structure looks like..

image

Lets see what’s what here..

  1. OVP.xap:- The Open source Open Video Player. You can download this from here
  2. MASTSequencing.xap:- The Mast Sequencing component(remember..it defines the WHEN!!).
  3. VASTAdHandler:- the VAST component(WHAT!!)

These three are pretty standard and frankly you need to modify these…what you may want to modify are.. the

  1. Index.html:- Which holds the OVP.XAP, configures it with the plugin handlers and  specifies the media source(see feedsource)
    <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%" id="slp" >
    <param name="source" value="OVP.xap"/><param name="minRuntimeVersion" value="2.0.30923.0" /><param name="onerror" value="onSilverlightError" /><param name="background" value="black" /><param name="MaxFrameRate" value="30" />
    <a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"><img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/></a>
    <param name="initparams" value='showstatistics=true, autoplay=true, muted=false, playlistoverlay=true, theme=themes/Default.xaml, smfPlugins=BasicMediaPlugin.xap,plugins=MASTSequencing.xap VASTAdHandler.xap ,
    mast:sourceuri=mast.xml,stretchmode=Fit, stretchmodefullscreen=Fit, 
    feedsource=http%3A//rss.streamos.com/streamos/rss/genfeed.php%3Ffeedid%3D426%26groupname%3Dproducts' />
    </object>

2. MAST.xml:- You can change the VAST location to specify a different ad source. You can also specify the ad timings. For example this one specifies a Pre-Roll and a Mid Roll Ad, so the ad plays before the video and again after 20 seconds. Also notice the Operator= GEQ, which means Greater or Equal , so suppose the user fast forwards the video from 10 to say 30 seconds, the ad will start showing at 30 seconds..

image

While we are still at it…lets also see what the VAST.xml looks like…as per this MAST.xml we are pointing to http://api.atdmt.com/adserv.api/viewad/sa=135109908;sf=VAST_PreRoll_XML_V2;pf=FLV;br=500;strm=1

Here is what it looks like

image

So basically its a list of Ad addresses. What the VASTAdHandler then does is, it goes through each ad and plays the first compatible format ad which in my case happens to be wmv…since i am using a BasicMediaPlayer..

Pretty simple configurations and an excellent Open Source tool…Did i mention that its plugin based so it can be easily extended!!

Keep looking here for more insights into newer abilities!!

Cennest

Silverlight:- Browsing without a Browser??

Wanna navigate to Google.com from your Silverlight application?? Just put the following code

   HtmlPage.Window.Navigate(new Uri("http://www.google.co.in/")

We all know THAT…so what’s this blog all about??.Now lets take this application Out of Browser

image

image

This is what you will get..

image

WHY???:- Because there’s no browser when running out of browser, so you can’t use the DOM and Scripting.Html Bridge is disabled when your application works on Out-Of-Browser mode

So there were pretty much no direct solution to this in SL3. But in SL4 we have a brand new and shiny Web Browser control especially for OOB setting…(infact it doesn’t even work in online mode!!)

So what you need to do is this..

Check if you app is running in OOB mode using

(Application.Current.IsRunningOutOfBrowser

If running out of browser navigate to a page hosting the Web Browser control

image

In code behind navigate to the required url..

this.webBrowser.Navigate(new Uri("http://www.google.co.in/"));

and this is what you get!

image

There’s more:- Not only does this cool control let you browse to sites in an OOB mode, it also listens for events from those sites(something that doesn’t happen so easily in online mode)!!

The navigated page can then pass a value to the browsercontrol via a javascript text like

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
     <script type="text/javascript">
         window.external.notify('hello from google!');
   </script>
</head>
<html>

The Webbrowser has a ScriptNotify event which you can hook onto in your XAML page as

this.Browser.ScriptNotify += new EventHandler<NotifyEventArgs>(Browser_ScriptNotify);

 void Browser_ScriptNotify(object sender, NotifyEventArgs e)
        {
         string value= e.Value;
        }

Another welcome step in the direction of enabling Offline and OOB applications!!!..We recently used this for one of our projects to enable LiveID Authentication from an OOB app…pretty cool!!

Thanks

Cennest!!

Microsoft Strengthens its hold on the Private Cloud

Microsoft seems to have realized that the true utilization of Cloud Computing atleast in the beginning is going to be in Hybrid deployment models.

Keeping in tune with this trend they have empowered data centres and private customers to build Private clouds by announcing new “Windows Azure Platform Appliance”

Below are some extracts from the web

“The appliance is the same Windows Azure platform we run at Microsoft, and includes Windows Azure and SQL Azure on Microsoft-specified hardware. Using it, service providers, governments and large enterprises will be able to get the control they need, while still getting the benefits of scale, multi-tenancy, and low operational costs."

The Windows Azure Platform appliance site describes it as "a turn-key cloud solution on highly standardized, preconfigured hardware. Think of it as hundreds of servers in pre-configured racks of networking, storage, and server hardware that are based on Microsoft-specified reference architecture."

The description continues "The Microsoft Windows Azure platform appliance is different from typical server appliances in that it involves hundreds of servers rather than just one node or a few nodes and It is designed to be extensible–customers can simply add more servers–depending upon the customer’s needs to scale out their platform."

Microsoft seems to have made a very smart move by providing this appliance which is being called “Azure in a box”. This will allow the hybrid models to seamlessly convert to fully online models as the application deployment will be exactly the same. For the interim time period while confidence on the cloud increases Microsoft is doing the patching, the managing and everything but the hosting of the customers’ data

Do note that apart from this Microsoft is continuing to offer Windows Server, Hyper-V, System Center and other server-based components from which these customers can build their own “private clouds” (though these clouds won’t be running Windows Azure; they’ll be based on Windows Server).

More Updates Coming Up!

Cennest

Creating An “Extensible” Consolidated Social Networking Platform in WPF using MEF

One of my recent projects was on Social Networking where we worked with various social networking sites like WL, Facebook, Delicious, Twitter ,Picassa, Flickr etc to bring them to a common platform for a user.

It was a pretty interesting application and i’ll try to demonstrate multiple WPF patterns we implemented in it.

One was the use of Plugin model using the “Managed Extensibility Framework”. The user could upload his photographs to multiple providers at the same time. The challenge given here was “we should be able to add another provider to the system at any time after the application is already deployed”. So at the time of development we develop for Flickr and Picassa but now YouTube is also allowing Photo upload so now we want to support You Tube but without opening up the code!!

We used the Managed Extensibility Framework for this.I’ll explain the core concepts of MEF(mostly picked up from the MEF guidelines document) and show you how we implemented this seemingly tough requirement easily.

What is MEF?

The Managed Extensibility Framework (or MEF for short) simplifies the creation of extensible applications. MEF offers discovery and composition capabilities that you can leverage to load application extensions.

  • MEF provides a standard way for the host application to expose itself and consume external extensions. Extensions, by their nature, can be reused amongst different applications. However, an extension could still be implemented in a way that is application-specific. Extensions themselves can depend on one another and MEF will make sure they are wired together in the correct order (another thing you won’t have to worry about).
  • MEF offers a set of discovery approaches for your application to locate and load available extensions.
  • MEF allows tagging extensions with additonal metadata which facilitates rich querying and filtering

MEF is all about composable parts, which come in two flavours; imports and exports.  An export is something you want to share and an import is the point at which you want to inject an export.

So in our case the “Photo Providers” are our “Exports” and the core Platform Consolidation application  had an “Import” point for them.

MEF needs to a way of knowing about what exports it has at its disposal and what imports require “composing” (or matching up to available exports).  In MEF this is the CompositionContainer which contains a Catalog of exports

So basically your “Catalog” has all the “Exports” Now how you make the Catalog  is very important to how your exports will be identified.

There are multiple Catalog Options available for WPF

Assembly Catalog

To discover all the exports in a given assembly

Directory Catalog

To discover all the exports in all the assemblies in a directory .The DirectoryCatalog will do a one-time scan of the directory and will not automatically refresh when there are changes in the directory.

Aggregate Catalog

When AssemblyCatalog and DirectoryCatalog are not enough individually and a combination of catalogs is needed then an application can use an Aggregate Catalog.An AggregateCatalog combines multiple catalogs into a single catalog.

Type Catalog

To discover all the exports in a specific set of types one would use  the Type Catalog.

Since we wanted a model where we just drop a new dll into the project and the new provider is up and running we went ahead with Directory Catalog.

Here are the 3 steps we did

1. The Imports and Exports need to agree to an Interface. So we made an IPhotoProviderInterface and the Exports i.e the PhotoProviders adhered to it.

2. Marked the Providers with the “Export” attribute for the IPhotoProviderInterface

[Export(typeof(IPhotoProviderInterface))]
public class PicassaProvider :IPhotoProviderInterface
    {
        ...
    }

On Application(Our CompositionContainer)  Startup we wrote code to read a specific directory to look for exports .

2. Create a list of IPhotoProviders which will hold instances of the providers going to be loaded and mark it with the Import Attribute

[Import]
public IEnumerable<IPhotoProviderInterface> PhotoProviders { get; set; }

3. Create a DirectoryCatalog to read the new providers…

private void LoadProviders()
{
  try
  {
      var catalog = new DirectoryPartCatalog(@".\Providers\");
      var container = new CompositionContainer(catalog);

      container.AddPart(this);
      container.Compose();
      foreach (IPhotoProviderInterface sender in PhotoProviders)
      {
          ......
      }
  }
}

From here onwards the Providers were present in the PhotoProviders list….

It was a pretty neat implementation and we got a 100% for extensibility here…MEF looks daunting with all these new keywords but its pretty simple to implement!!

If you are looking to make a scalable and extensible application…we have the expertise and the experience to help you get there….drop us a note at cennesttech@hotmail.com..

Until Next time!

Cennest

Location Based Applications in Silverlight Using Bing Maps!

Going to the headquarters of Microsoft..Redmond is every developers dream…so the first time i happened to go there i was truly overjoyed!!. I tried my best to describe the entire town to my family and friends but pictures were never enough…and then came in Bing Maps…now they can virtually (pun intended:-)) walk the streets of Redmond with me…

Microsoft recently also released BingMap Control for Silverlight!…so now you can make your applications super jazzy by plugging in these controls and even making use of Bing Web Services for advanced features like Geocoding and Reverse Geocoding… I tried my hands on the BingMapSDK and was delighted to find it fairly explanatory(with some help from blogs as well…).

Trying out the basics i decided to try out the following.

1. Adding Pushpins

2. Reverse Geocoding

3. Adding Polygon

4.Adding a Polyline..

Here are some screenshots of my application

image

I Zeroed in on Redmond/Bellevue using the following settings

Mode=”AerialWithLabels”  Center=”47.6126490988388,-122.205053960122″ ZoomLevel=”14″

Added code to add a pushpin on mouse click and reverse geocode the address..

image

Mark different areas using a Polyline

image

Mark a region using a Polygon

image

There is no end to the possibilities which come with these new controls and features…It will definitely be interesting to see how people use this  new level of information;-)

If you are looking to exploit some of these potentials…get in touch and we can do it together!

Till Then!!

Cennest!!

Looking Forward to VS2010!

Few really useful developer friendly features in VS2010

1. Pin your favorite project so that its always available in the recent projects(even after a year!)

image

2. Double click a variable to highlight its usage all over the current page (no more find all references). Do a Ctrl+Shift+DownArrow to move to next reference

image

3. Do a ViewCallHierarchy to find out method dependencies

image

4. Focus on important code by collapsing rest of the code

image

Some more useful features like Datatips and export/import breakpoints to improve collaboration with other team members…more on that soon!!

Look forward to VS2010!

Cennest!!