How many of us started learning something with the "Hello World" example. We've seen "Hello World" travel from a console application to a GUI. Now it's in the cloud.
While small test programs existed since the development of programmable computers, the tradition of using the phrase "Hello world!" as a test message was influenced by an example program in the seminal book The C Programming Language. The example program from that book prints "hello, world" (without capital letters or exclamation mark), and was inherited from a 1974 Bell Laboratories internal memorandum by Brian Kernighan, Programming in C: A Tutorial, which contains the first known version:
I learned programming from this very book so I will use all lower caps with a comma.
Why do you nee dthe Windows Azure SDK?
The Windows Azure SDK provides developers with a local runtime environment for building and testing Windows Azure applications. This environment is known as the development fabric. The Windows Azure Tools for Microsoft Visual Studio provide developer tools for building Windows Azure applications that includes building, debugging, and project setup and configuration.
What are we going to cover?
Task 1 – Create the Visual Studio Project
Task 2 – Build and Execute the Web Site
Task 1 – Create the Visual Studio Project
Code that got generated
Both these files allow you to control how the web roles and worker roles get deployed.
The ServiceDefinition.csdef file contains the metadata needed by the Windows Azure fabric to understand the requirements of your application, such as which roles are used.
It will also contain configuration settings that apply to all instances.
These configuration settings can be read using the Windows Azure API as you will see in a later exercise.
The ServiceConfiguration.cscfg file lets you set the values for the configuration settings and the number of instances to run for each role.
The Roles node in the Cloud Services project enables you to configure what roles the services include (Web, worker or both) as well as which projects are used for these roles.
Adding configuring roles through the Roles node will update the ServiceDefinition.csdef and ServiceConfiguration.cscfg files.
NOTE: Notice that IIS creates Web Roles based on the ServiceConfiguration files/
As its name suggests, each Web role instance accepts incoming HTTP (or HTTPS) requests via Internet Information Services (IIS) 7.
A Web role can be implemented using ASP.NET, WCF, or another .NET Framework technology that works with IIS.
As the figure above shows, Windows Azure provides built-in load balancing to spread requests across Web role instances that are part of the same application.
A Worker role instance, by contrast, cannot accept requests directly from the outside world—it's not allowed to have any incoming network connections, and IIS isn't running in its VM.
Instead, it gets its input from a Web role instance, typically via a queue in Windows Azure storage.
The result of its work can be written to Windows Azure storage or sent to the outside world—outgoing network connections are allowed.
Unlike a Web role instance, which is created to handle an incoming HTTP request and shut down when that request has been processed, a Worker role instance can run indefinitely—it's a batch job.
Befitting this generality, a Worker role can be implemented using any .NET technology with a main() method (subject to the limits of Windows Azure trust, as described below)
Open the Default.aspx page.
Change the contents of the <title> tag to hello, world. Add the <div> tag Welcome to the world of Cloud Computing, Azure Style
Press F5 to execute the service in Windows Azure. The service will build and then launch the local development fabric. To show the development fabric UI, right-click its icon in the system tray and select Show Development Fabric UI.
TaskBar – Development Fabric
Note the Development Fabric instance shows 1 web role.
That is because that is what our ServiceConfiguration.csfg indicated.
Thank you for submitting this cool story - Trackback from DotNetShoutout
Prerequisite Be sure to complete the following exercise before Exercise 2. Windows Azure Services – Exercise