Saturday, January 31, 2009

List of Points to consider before building the WCF Callback Service.

 

 

Callback Contract 

  Here is the list of points to consider before building Callback Contract type of Service or Publish and Subscriber model.

    1. Callbacks requires communication over duplex channel .

    2. Requires all clients to implement the callback interface, exposed by the service.

    3. BasicHttpBinding & WSHttpBinding don't support callbacks -- use their Dual versions instead.

    4. Streaming data not supported by callbacks . streaming is not reliable and Callbacks require reliable messaging.

    5. If the service restarts, callbacks are not possible until the client makes a service connection again & subscribes itself for callbacks.

     Thanks

    SreenivasaRagavan.

    Friday, January 30, 2009

    Windows Azure Storage's.

    Windows Azure provides three type of storage Services for persisting and retrieving the data. 

    1) Blob storage.

    2) Table storage.

    3) Queue storage.

                   imageimage

    All storage's are accessible via simple  REST  API.

    Here is the base URI for each storage account. base URI contains only name of the storage account.

    http://storageaccountname.blob.core.windows.net  -

    http://storageaccountname.table.core.windows.net

    http://strorageaccountname.queue.core.windows.net

    image

    Blob : This storage is good for storing big binary large objects like  Movies , Pictures,documents. The maximum blob size currently supported is 50 GB.

    Table: This is structured storage in the form of tables  but this  storage is not  a Relational tables like SQL .  We can use  ADO.NET Data Service API to  create query ,update and delete the entities in tables.

    Table Storage does not enforce any schema.

    Within a storage account, a developer may create named tables. Tables store data as entities. An entity is a collection of named properties and their values, similar to a row. Tables are partitioned to support load balancing across storage nodes. Each table has as its first property a partition key that specifies the partition an entity belongs to. The second property is a row key that identifies an entity within a given partition. The combination of the partition key and the row key forms a primary key that identifies each entity uniquely within the table

    Queue: Reliable and persistent messaging between services, Queue storage can be used for a worker role communicate with a web role. The maximum size for a message is limited to 8 KB

    Please refer the following URL for more Information about  Azure Storage.

    Thanks

    SreenivasaRagavan

    Thursday, January 29, 2009

    Windows Azure application development and deployment

    After playing with Windows  Azure Application development SDK  I decided to show what are the steps involved to complete a simple Windows Azure application in local Fabric development  and moving the sample application to MS  Windows Azure portal  that is  CLOUD environment.

    First let us look at the local development environment setup.

    To setup Azure local environment you need to install the following tools in your local machine.

    1) .NET Framework 3.5 with SP1.

    2)  IIS 7.0 (with ASP.NET and WCF HTTP Activation).

    3) VS.NET 2008 with SP1 ( development IDE).

    4) Windows Azure Software Development Kit (January 2009 CTP)

    5) SQL Server 2005 0r 2008 Express

    6) Windows Azure Tools for Microsoft Visual Studio January 2009 CTP

    Developing a Application on Windows Azure

    Please refer my blog post  http://mstecharchitect.blogspot.com/2009/01/windows-azure-application-development_19.html  developing a application on Windows Azure.

    Once you developed and tested in your local environment  now you can publish the Azure service  on cloud environment. to do that you need to have storage account on MS Azure portal.

    go to this link and sign up for the Azure storage account Sign up for Azure storage account

     

    image

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Once we test our application local fabric development environment now we can publish to cloud .

    Right click on project you created and  select publish  this will launch windows explorer and shows the location where Package and configuration files stored in local machine.

    image

    image

     

    image

    Click deploy button you asked to select  Package  and Configuration settings 

    image

    now click deploy button this will load your package from local fabric environment to CLOUD.

    image

     

    image

    Now click run button to run you cloud service application we just deployed in Staging.

     

    image

     

    image

    Now your application is started. in staging it will provide the URL like

    Web Site URL:
    19dde280-8372-4007-8c4f-00d12c2910a6.cloudapp.net click this url to run your cloud Application.

    Thanks

    Sreenivasaragavan.

    Tuesday, January 27, 2009

    Free Download IE 8.0 RC1

    Hello Developers/ PC users

    The IE Team has published the Release Candidate for Internet Explorer 8.0.

     

    Point your browser to  this link IE 8 RC1  and download IE 8.0 RC1.

    Thanks

    Sreenivasaragavan.

    Wednesday, January 21, 2009

    Peer-2-Peer using WCF NetPeerTCPBinding

     

    Microsoft .NET Framework 3.0 /3.5 comes with new WCF  binding called  netPeerTcpBinding .

    Using WCF NetPeerTCPBinding we can develop a peer-to-peer networking applications that use a TCP-level peer-to-peer mesh infrastructure.

    Example for the Peer-to-Peer Application : IM , File Sharing Application,games etc.

    In Traditional Client Server model we have Single  Server  and 1 to N number of clients making request to the server which is configured in centralized location.

    image

    In Traditional Client/Server application 

     

    image

    In peer-to-peer (P2P) application  each participate (node) acts as both a client and a server to the other participants in the network.

     

    WCF Service Contract :

    image

    image

     

    In peer-to-peer network environment peers rely on name resolution systems to resolve each other's network locations (addresses, protocols, and ports) from names .Peer-to-peer name resolution has been complicated by transient connectivity and shortcomings in the Domain Name System (DNS). [MS-Source]

    The Microsoft® Windows® Peer-to-Peer Networking platform solves this problem with the Peer Name Resolution Protocol (PNRP).

    if you look at the below configuration we set Pnrp mode for the reslover .

    image

     

    Testing the Application with two Peer.

     

    image

    Thanks

    SreenivasaRagavan.

    Tuesday, January 20, 2009

    Hosting WCF Service On Windows Azure.

     

    Here are steps we need to perform in order  to host WCF service in Windows Azure platform.

    1) Create a new Azure web cloud solution  project.

    2) Add WCF service Template to the project.

    3) Define the Service Contract with one or more Operation contract.

    4) Create the Client application  which consumes the WCF service which is hosted on Azure platform.  In this step we are not going to  generate Metadata from WCF service instead  I am going to show you the magic how we can Invoke WCF service with out adding service meta data reference .

     

    Step1 : Create Web Cloud Service project .

    image

    Now right click on SreeniWCFCloudService_WebRole project and add WCF Service template .

    image

    Define the Service Contract and add few Operation Contract as shown

    image

    Implement the above service contract as shown

    image 

     

    image

    Once you see this above screen you have Successfully hosted the service.

     

    image

    Now let's create the WCF client which consumes the WCF Service  hosted in  Windows Azure.

    here WCF hosted in Development Fabric .

     

    Create the Console Application  copy the WCF Service Contract class file to create a proxy .

    image

     

    image

     

    Here we can see the log information which is logged in Azure Service when we call WCF Operation from client  .

    First Two Operations are (Add, SayHi) are success. but  Div Operation Failed with Divide by Zero Exception .

    image .

     

    Thanks

    SreenivasaRagavan.

    Monday, January 19, 2009

    Windows Azure Application Development -Part2

    In my previous Blog  Part-1 I was explaining how to setup a Windows Azure Application Development Fabric  environment. In this Blog I am going to show how to create and  deploy a Azure Web Cloud Service Application using VS.NET 2008 in local Fabric development Environment.

    1) First let's  fire up VS.NET 2008 IDE and create a new project template  selecting could Service project type as show below.

    image

    Once project is created successfully, If you look at the  Solution Explorer  projects files it's look like we have created  a ASP.NET Web application .  apart from that we see some additional files  like   ServiceDefinition.csdef , ServiceConfiguration.cscfg

    image 

    ServiceConfiguration.cscfg is  Cloud Service Configuration file. In this file were the  configuration settings and the number of instances to run for each role as specified.

    ServiceDefinition.csdef  is cloud service definition file . This file contains metadata for the Cloud Service.

    Now open up the Default.aspx  and place one Label ,TextBox and One button (ASP.NET Server controls) in ASP.NET Web Form.

    image

    Now Execute the Cloud Service pressing F5,  and Launch the Local Development Fabric from Task bar ,

    image 

    Hey we are successfully created and deployed our first Windows Azure Web Cloud Service.  if you select the Service Details Node in the Service deployments tree that basically has   Role and Port  information .

    // Service Definition file.

    <?xml version="1.0" encoding="utf-8"?>
    <ServiceDefinition name="SreeniCloudService" xmlns="
    http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
      <WebRole name="WebRole">
        <InputEndpoints>
          <!-- Must use port 80 for http and port 443 for https when running in the cloud -->
          <InputEndpoint name="HttpIn" protocol="http" port="80" />
        </InputEndpoints>
      </WebRole>
    </ServiceDefinition>

    image

    image

    This cloud service is running  at http://127.0.0.1:81 in local development Fabric environment.

    In Could computing environment we can not attach debugger to the application in real time and debug the code , so the only way we can debug the application is logging the Information in event log will help to find the application errors. Here is how we can do this in Cloud Services.

    Now lets add logging information to this cloud service .  I am going to log the Text which is entered in  Name Text box to the Event Log.  To do this  we are going use class called  RoleManager.

    Here is the namespace which has the RoleManager class 

    Microsoft.ServiceHosting.ServiceRuntime

    RoleManager class provides the WriteLog method to write the log.

    image

    Now we are going to add the following code in  Print Button Click event.

    RoleManager.WriteToLog("Information", TextBox1.Text);

    image

    image

    image

    Thanks

    Sreenivasaragavan.

    Sunday, January 18, 2009

    January -2009 CTP of Windows Azure SDK Released!

     

    Today downloaded  the Jan-CTP of Windows Azure SDK and VS.NET 2008 tool . if you like to Taste and Test Windows Azure  extend your hand to launch IE and point to the following URLs.

     

    You can download   VS.NET Tools for Windows Azure Development

     

    Point your IE  here to download  Windows Azure SDK

    Thanks

    SreenivasaRagvan.

    Friday, January 16, 2009

    Windows Azure Application Development -PART 1

     

    Windows® Azure is a cloud services operating system that serves as the development, service hosting and service management environment for the Azure Services Platform. Windows Azure provides developers with on-demand compute and storage to host, scale, and manage Web applications on the Internet through Microsoft® data centers.

    How to setup Windows Azure Development Platform.

    First we need download and Install the  Windows Azure SDK Kit.  This SDK helps developers to Develop ,Deploy and mange Services in  Windows Azure.

    Here is the ULR where you can download Windows Azure SDK CTP 2009 WINDOWS AZURE DEVELOPER SDK .

    After installing the AZURE SDK  it will add new Templates as shown below.

    image

    Windows Azure SDK includes two Development utilities this helps us to develop or simulates Windows Azure application   (Cloud Services) in our local machine.

    1) The Development Fabric- This tool helps us to run and test Windows Azure application locally before deploying into Cloud.

    2) The Development Storage-This simulates the Blob, Queue, and Table Storage services available in the cloud

     

    Fabric -GUI

    image

    This picture shows I have hosted one Web Cloud Service name as  SreeniCloudSvc.

    image

    stay tuned Part-2 I will show you how to develop Application for Windows Azure .

    Thanks

    Sreenivasaragavan.

    Wednesday, January 14, 2009

    HAPPY PONGAL

     

    Wishing everyone a Happy Pongal and Sankranti !!

    Wish you a Happy pongal


    "Pongal is a harvest festival - the Tamil equivalent of Thanksgiving. In an agriculture based civilization the harvest plays an important part. The farmer cultivating his land depends on cattle, timely rain and the Sun. Once a year, he expresses his gratitude to these during the harvest festival. With the end of the wet month of Margazhi (mid December to mid January) the new Tamil month of Thai heralds a series of festivals. The first day of this month is a festival day known as "Pongal Day". Pongal means the "boiling over" of milk and rice during the month of Thai."
    This explanation is found in the website
    www.pongalfestival.org/pongal-festival.html


    Wikipedia describes Pongal as follows:


    "Thai Pongal (Tamil: ) is a harvest festival equivalent to a thanksgiving event celebrated by Tamils across the world. Pongal in Tamil means "boiling over or spill over." The act of boiling over of milk in the clay pot is considered to denote future prosperity for the family. Traditionally celebrated at harvest time, it is a celebration of the prosperity associated with the harvest by thanking the rain, sun and the farm animals that have helped in the harvest. Pongal is celebrated by the Indian state of Tamil Nadu as well as Tamils worldwide, including those in Sri Lanka, Malaysia, Mauritius, South Africa, USA, Canada and Singapore. The festival is at least 1000 years old although some believe that the festival is more than 2000 years old. As per epigraphic evidence, it used to be celebrated as Puthiyeedu during Medieval Chola empire days. It is thought that Puthiyeedu meant the first harvest of the year. People of all relegions celebrate the pongal festival."

     

    7552-001-12-1062 2194552262_d00533b778 pongal08

    Thanks

    SreenivasaRagavan.

    Tuesday, January 13, 2009

    Invoking WCF Service without adding a Service Reference.

     

    Basically via VS.NET IDE we reference the WCF service as shown below. doing this way we need to update the service Reference whenever WCF service Operation or Data Contracts changes.

    image

     

     

     

     

     

     

     

    Here is the way we can Invoke WCF service with out Adding a Service Reference.

     

    image

     

    Thanks

    SreenivasaRagavan.

    Saturday, January 10, 2009

    Windows 7 Beta

     

    Hi Friends ,

    Today i installed Windows 7 beta  in my VM (Virtual Machine) .  I like the performance and GUI . here are some screen shots

     image

    i took this screen shots using new tool which comes with Windows 7 its called Snipping Tool.

    My Desktop:

    image

     

    image

    I sure you waned to try here is the link to download Windows 7 Beta.

    Download Windows 7 Beta

    Thanks

    Sreenivasaragavan.