Upload
ciklum
View
2.372
Download
0
Tags:
Embed Size (px)
Citation preview
Bugaev {@rbugaev} Roman, VRP Inc.
Windows Azure: technology cocktail
“ !Поехали ”
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
Windows Azure: technology cocktail 4
Microsoft CLOUDInfrastructure
From 7 to 17 football fields
Windows Azure: technology cocktail 5
Microsoft CLOUDContainers
Windows Azure: technology cocktail 6
• 1 1
What is Windows Azure
• Cloud computing service from Microsoft• Combination of PaaS and IaaS• New development platform
Windows Azure: technology cocktail 8
• 1 2
Architecture differences
What is the same: - ASP.NET application runs on IIS and Windows Server- Application uses SQL server Development is still done with VSMain 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
Windows Azure: technology cocktail 10
• 1 3
Windows Azure: technology cocktail 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 12
• 1 4
Windows Azure: technology cocktail 13
Developer Experience
• Leverage Existing Skills in .NET, SQL Server, WCF• Use Familiar tools – Visual Studio• RESTful HTTP cloud services, supports PHP, Python• Cloud apps can be developed locally / offline• SDK Cloud Simulator – Dev Fabric, Dev Storage
Windows Azure: technology cocktail 14
• 1 5
Windows Azure: technology cocktail 15
Windows Azure: technology cocktail 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 17
If you don’t know SQL – write in your CV «NoSQL» (Joke)
Windows Azure: technology cocktail 18
Azure Storage Problems
Windows Azure: technology cocktail 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 20
Alternative for Azure Queue
• RabbitMQ (erlang)• Service Bus Queues (app fabric)
Windows Azure: technology cocktail 21
Building a Task Scheduler in Windows Azure
Windows Azure: technology cocktail 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 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 24
Alternative Schedule
• Quartz• BrokeredMessage.ScheduledEnqueueTime
Windows Azure: technology cocktail 25
Node.js Applications
1. native Windows Node.js binaries 2. iisnode module
https://github.com/smarx/noderole
Windows Azure: technology cocktail 26
Caching
• Windows Azure Caching• memcached
Windows Azure: technology cocktail 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
ThX! Q?
Phone: +375 (29) 264-6830 Skype: Bugaev_RomanLinkedin: http://www.linkedin.com/in/rbugaevFacebook: http://www.facebook.com/rbugaev Twitter: @rbugaev