3. Azure
• Windows Azure Platform is thus classified as platform as a
service and forms part of Microsoft's cloud computing
strategy, along with their software as a service offering,
Microsoft Online Services
Windows Azure: technology cocktail 3
9. Architecture differences
What is the same:
- ASP.NET application runs on IIS and Windows Server
- Application uses SQL server Development is still done with VS
Main differences:
- Application consists of parts called roles
- There is no persistent/durable virtual machine
- There is no persistent/durable NTFS file system
- Application runs in multi instance (server) environment
- New API, new configuration files, new type of project
11. Windows Azure Roles
• Web Role
– for web application programming in ASP.NET or PHP
– MVC 3
• Worker Role
– for performing work on behalf of the web role
– may be written in .NET, Ruby, Java
– to improve scalability by increasing parall. and async.
– used for background work
Windows Azure: technology cocktail 11
16. Storage
• Blobs – Large Data Store
• Queues – Background work processing
• Tables – Very Fast / Scalable Storage
• Drives – NTFS Formatted Page Blobs
• SQL Azure – Relational SQL in the Cloud
Windows Azure: technology cocktail 16
17. If you don’t know SQL – write in
your CV «NoSQL» (Joke)
Windows Azure: technology cocktail 17
19. Mongo DB
Running MongoDb on Microsoft Windows Azure with CloudDrive
• http://www.captaincodeman.com/2010/05/24/mongodb-azure-
clouddrive/
Server :
_mongoProcess = new Process(@"mongod.exe");
_mongoProcess.Start();
Client:
var mongo = new Mongo(connectionString);
mongo.Connect();
var db = mongo.GetDatabase("notes");
Windows Azure: technology cocktail 19
20. Alternative for Azure Queue
• RabbitMQ (erlang)
• Service Bus Queues (app fabric)
Windows Azure: technology cocktail 20
21. Building a Task Scheduler in
Windows Azure
Windows Azure: technology cocktail 21
22. Scheduling
public class ScheduledItem : TableServiceEntity
{
public string Message { get; set; }
public DateTime Time { get; set; }
public ScheduledItem(string message, DateTime time)
: base(string.Empty, time.Ticks.ToString("d19") + "_" + Guid.NewGuid().ToString())
{
Message = message;
Time = time;
}
public ScheduledItem()
{
}
}
Windows Azure: technology cocktail 22
23. Managing Concurrency
using (var arl = new AutoRenewLease(leaseBlob))
{
if (arl.HasLease)
{
// inside here, this instance has exclusive access
var ctx = tables.GetDataServiceContext();
foreach (var item in ctx.CreateQuery<ScheduledItem>("ScheduledItems").Where(s =>
s.PartitionKey == string.Empty
&& s.RowKey.CompareTo(DateTime.UtcNow.Ticks.ToString("d19")) <= 0)
.AsTableServiceQuery())
{
q.AddMessage(new CloudQueueMessage(item.Message));
ctx.DeleteObject(item);
ctx.SaveChangesWithRetries();
}
}
}
Windows Azure: technology cocktail 23
24. Alternative Schedule
• Quartz
• BrokeredMessage.ScheduledEnqueueTime
Windows Azure: technology cocktail 24
25. Node.js Applications
1. native Windows Node.js binaries
2. iisnode module
https://github.com/smarx/noderole
Windows Azure: technology cocktail 25
26. Caching
• Windows Azure Caching
• memcached
Windows Azure: technology cocktail 26
27. Invite
Get a Windows Azure Trial Account Try out a free Windows
Azure account for 30 days.
• Go http://bit.ly/azure_invite, select "United States" and
• Enter promo-code: FBPASS
Windows Azure: technology cocktail 27
There are two core roles that server instances play in Windows Azure.The first role is the Web Role. A web role is used for web application programming in ASP.NET or PHPThe second role is the Worker Role. A worker role is used for performing work on behalf of the web role.In addition to the .NET languages, Worker Roles may be written in Ruby or Java.Worker Roles are used to improve scalability by increasing parallelism and asynchronicity.They are often used for background work.
As was hopefully evident, the Azure developer experience leverages what you’re already familiar with.If you’re a .NET developer and your favorite technologies are ASP.NET, Silverlight, Windows Communication Foundation, or SQL Server you’re going to be able to use those same technologies in the cloud.You also continue to use familiar tools including Visual Studio and SQL Server Management Studio.Azure isn’t just for .NET developers, however. Most of the services in the cloud are accessible as RESTful HTTP calls. That means Java developers, PHP developers, Python developers can also use Azure.For .NET developers, the Windows Azure SDK and tools for Visual Studio gives you a cloud simulator. The Development Fabric simulates the hosting environment and Developer Storage along with SQL Express simulate cloud data storage. This means you can develop cloud applications locally, even when offline.
Windows Azure provides hosting and storage and management.The Windows Azure data center infrastructure is called the Fabric and manages instances of your applications. The Fabric detects if something goes wrong and allocates replacement resources if necessary.You can host HTTP-accessed software such as web applications and web services in Windows Azure. You can also host background worker software.Windows Azure also provides non-database storage. This comes in 3 forms: blobs, queues, and data tables. Blobs are similar to files, queues are similar to enterprise queues, and data tables are record-based storage.The Windows Azure management portal allows you to create projects, deploy software, change number of instances, upgrade software, and promote between Staging and Production environments.