Unfortunately I wasn’t able to go and speak in Visual Studio Live @ Las Vegas as it was scheduled, due to an illness that made it impossible for me to travel, and stay in bed for a few days.
But even if I wasn’t there I would like to share with you some of the points on this topic “Tips and Tricks on Architecting Windows Azure for Costs”.
Tips & Tricks On Architecting Windows Azure For Costs The Key points to achieve this are:
- Cloud pricing isn’t more complex than on-premises, it’s just different
- Every component has it’s own characteristics, adjust them to your needs
- Always remember that Requirements impact costs, choose the ones that are really important
- Always remember that Developers and the way things are developed impact costs, so plan, learn and then code.
- Windows Azure pricing model can improve code quality, because you pay what you use and very early can discover where things are going out of plan
- But don’t over-analyze! Don’t just block because things have impacts, because even today the same things are impacting you, the difference is that normally you don’t see them that quickly and transparently, so “GO FOR IT”, you’ll find it’s really worth it.
In some next posts I’ll go in-depth into each one of those.
Special thanks for Maarten Balliauw for providing a presentation he did previously that I could work on.
Unfortunately I wasn’t able to go and speak in Visual Studio Live @ Las Vegas as it was scheduled, due to an illness that made it impossible for me to travel, and stay in bed for a few days.
But even if I wasn’t there I would like to share with you some of the points on this topic “Architecture Best Practices in Windows Azure”.
Here are 10 key Architecture Best Practices in Windows Azure:
- Architect for Scale
- Plan for Disaster Recovery
- Secure your Communications
- Pick the right Compute size
- Partition your Data
- Instrument your Solution
- Federate your Identity
- Use Asynchronous and Reduce Coupling
- Reduce Latency
- Make Internal Communication Secure
In some next entries I’ll go in-depth into each one of those.
With last week’s Windows Azure Outage I’ve learned some lessons and I already talked about some in the previous posts, in this one I’ll focus on Data Recovery, since one of the important part of the outage is that we get scared of losing our data. Fortunately this didn’t happened in this one, and why was that? Have you thought about it?
So why wasn’t any data loss in this outage? Let’s dig into this one.
Normally our data is either placed inside Windows Azure Storage or even SQL Azure, and so Windows Azure has in-place for both of them one automatic process that for each content we place in these two options we get 3 replicas and they are placed in different parts of the Data Center, or in the Windows Azure Storage case 1 of the replicas is placed in a different Data Center in the same Region. This was very important to avoid data loss, since what happened was that in this “Leap Year bug outage” we didn’t have the complete Data Centers shutting down and so there were parts that still continued working maintaining our data. Of course this replication strategy doesn’t work for all problems since if all the Data Center crashes at the same time there might be data loss, but that isn’t the most normal outage, and so this way they are solving the biggest problems.
Also the fact that Microsoft has at least 2 Data Centers in the same region reduces a lot the possibilities of having some data loss.
But what if all the Data Center had went completely destroyed for some reason. Would I continue to have my Data?
And the answer is “it depends”. In the case of Windows Azure Storage the answer would be no, because we would have a replica in the other Data Center in the same region so we would be able to get back into action, it would take just a bit more time. If we were talking about the other services the answer would be different because the replicas in SQL Azure is placed inside the same Data Center and so if everything goes down, and also the machines goes down we could lose everything, but what’s the odds of that? Not two high.
If you don’t like your odds with this the best thing you could do was implementing a Data Recovery strategy, like replicating all your data to another Data Center inside your app, like for example with SQL Azure, we could use SQL Azure Data Sync to sync the database to another one in a different Data Center and even Region, or even use the SQL Azure Import/Export capability to have some “backups” (this isn’t a really backup since we don’t have the actual transaction log, but will be enough since it has all the Schema and Data in a particular time providing us a way to “restore” our data to a previous state) being placed in a Windows Azure Blob Storage Container, or even copied to one of our On-Premises machines or any other machine.
Another option would be to had the service available in several different geographies and fallback to the other ones in case of a outage like this, but of course this has costs, and maybe in some cases it would be enough to just point it to a static site inside Windows Azure Storage, or in other cases point into another deployment you have elsewhere in order not to stop working. It always depends on the business requirements we are talking in this case.
So with this I think one thing we should never forget is Data Recovery since thinking about this in the architecture phase will help a lot your business when something like this happens, and not even only in situations like this since there are also some that happen even without outages, like because of some bad update that was pushed, or any other issue.
I hope this helps you also understand how to plan and have measures in place to avoid data loss. Also I’ll continue to blog about some other lessons learned here.
As you might already know, Windows Azure had an Outage last week, and this generated a lot of “fuzz” around it, as well as when the same happened to Amazon last year, or even other providers. Based on these outages, lots of people are now saying that Cloud Computing shouldn’t be an option because it sometimes fails, because it has outages and so on. This isn’t really a very correct approach to the issue, since when we have everything inside our own Data Center, sometimes bad things happen also, from someone doing an update in the network and that crashes it, machines that just “die” from one moment to the other, and a lot more.
What these outages remind us is that even when going to the Cloud, and Windows Azure for example, we need to continue to analyze the impacts that an outage in our solution might have in our business, because Cloud Computing provides us a better platform and a way for us to be more secure, since they already have some Disaster Recovery and Data Replication mechanisms, but they also provide SLA’s and if we need more than those we need to really work on it and architect for it right from the start. And this isn’t a Cloud Computing fault, it’s really a requirement that our business has, and will have inside or outside or our own Data Center.
When we are dealing with something that is inside out own Data Center what we do is Redundancy. Let’s talk on a real-world example not IT related. Airplanes don’t need so many engines to fly, but they have them because if 50% fails, the other 50% will still get the airplane to reach to the desired destination without problems, and of course the level of redundancy depends on the reliability of the engines, and also the impact of that failure. Since airplanes don’t work very well without engines working, this is critical so sometimes you see 50% Redundancy and some other 75% Redundancy, like it happened in the earlier days. So we need to do the same with our solutions when building the on Windows Azure, and that is understand the impacts that an outage has for the business and then plan Redundancy and Disaster Recovery based on those, but we have some things that we can count on already, that is how Windows Azure takes care of Storage, SQL Azure, Compute and so on, since it provides us SLA’s that will provide us a level of security already very good. Also in case of Storage, provide us 3 replicas of everything that is placed inside the Storage account, being it Tables, Queues or even Blobs, and also Geo-Replicates 1 copy into another Data Center in the same region. What this does is that when for example a Data Center goes down, like it happened last week with Windows Azure, normally isn’t all the Data Center, and so some part will continue to be available, and as soon as the platform identifies that some part of the Data Center is down, the same platform will take the primary replica and place it as the original one, and them everything works again, but if for some reason all the Data Center goes down, it will continue to have a replica in the other Data Center of the same Region.
If we talk about SQL Azure, the same thing happen as the Storage, just the Geo-Replication isn’t there, so if all the Data Center goes down, there’s no Geo-Replica fallback process and so we need to plan for it.
So based on all this we should really look at Redundancy and Disaster Recovery as a very important part of our Architecture and System design, but we also need to take into account that this means costs, and so we need to get the right approach for the customer, because there’s no solution “One fits all” for this.
In some next posts I’ll talk about some approaches to designing Windows Azure for Redundancy and Disaster Recovery.
Also you can leave a comment and say what you’d like to hear about and I’ll do my best to write about it.
During this last week some friends asked me more about what are the Affinity Groups in Windows Azure, and their benefits since for some people this is nothing more than a way to logically group both Compute and Storage.
In order to explain this we need to dig a little deep in terms of how Windows Azure Data Centers are created. Basically Windows Azure Data Centers are built using “Containers” that inside are full of clusters and racks. Each of those Containers have specific services, like for example, Compute and Storage, SQL Azure, Service Bus, Access Control Service, and so on. Those containers are spread across the data center and each time we subscribe/deploy a service the Fabric Controller (which chooses based on our solution configuration where the services should be deployed) can place our services spread across the data center.
Now one thing that can happen is we need to be very careful in where we create the several services, because if we place the Hosted Service in North Central US and then the Storage Account in South Central US, this won’t be very good both in terms of Latency or Costs, since we’ll get charged whenever we get out of the Data Center. But even if we choose the same Data Center, nothing tells us that the services will be close together, since one can be placed in one end of the Data Center and the other in the other end, and so this will remote the costs and make the latency better, but it would be great to go a little further like placing them in the same Container, or even in the same Cluster. The answer for this is Affinity Groups.
Basically Affinity Groups is a way to tell the Fabric Controller that those two elements, Compute and Storage, should always be together and close to one another, and what this does is when the Fabric Controller is searching for the best suited Container to deploy those services will be looking for one where it can deploy both in the same Cluster, making them as close as possible, and reducing the latency, and increasing the performance.
So in summary, Affinity Groups provide us:
- Aggregation, since it aggregates our Compute and Storage services and provide the Fabric Controller the information needed for them to be kept in the same Data Center, and even more, in the same Cluster.
- Reducing the Latency, because by providing information to the Fabric Controller that they should be kept together, allow us to get a lot better latency when accessing the Storage from the Compute Nodes, which makes difference in a highly available environment.
- Lowering costs, as by using them we don’t have the possibility of getting one service in one Data Center and the other in another Data Center if for some reason we choose the wrong way, or even because we choose for both one of the “Anywhere” options in the.
Based on this, don’t forget to use Affinity Groups right from the start, since it’s not possible after having deployed both the Compute or Storage to change them into an Affinity Group.
To finalize, and since now you can be thinking that this would be very interesting for other services also, no other services are able to take advantage of this Affinity, since neither of them share the same Container.
Hope this helped and see you in the CLOUD.
Last week I presented two session both in Lisbon and Porto one about Visual Studio Lightswitch and other about Hosted TFS.
Here are the presentations:
Visual Studio LightSwitch 2011 - ALM Days
Hosted TFS
This is a very interesting 5-day event on Microsoft Technologies that will be held in Orlando, and has tons of great sessions and speakers around topics like, Windows Azure, SQL Server, WCF, WF, Server AppFabric, MEF, Silverlight, WPF, Visual Studio, Team Foundation Server, ALM, VS11, HTML5, CSS3, ASP.NET MVC, Orchard, Windows Phone 7, JQuery and more.
Seems to be a really great event, that I’d recommend to anyone that wants a really powerful way to fast learn the topics, from beginners to advanced.
Check out more here.
I was on Twitter and suddenly some remember that it would be interesting to write some Best Practices about using Windows Azure. Here are some of the ones I remembered:
- Get out of the way when you can. Send client directly to blob storage for static content
- Use Shared Access Signatures to provide direct access to ACLed content. Can be time-bound and revoked on demand. Also important will be using a Shared Access Policy in order to remove information like end date from url
- Serve public blobs from the edge with the Windows Azure CDN. You have fewer hops, and be closer to the customer.
- If you're using #CDN don't forget to Manage the Content Expiration. The Default is 72 hours
- If you're using CDN use versioned urls to allow immediate refresh. Really important to avoid caching problems
- Cache hot data in memory to avoid slower data-tier access. Ex. Session State, immutable reference data. Using the Caching ties will help you reduce latency and in some cases also costs
- Consider using more smaller compute instances instead of few large one. Most times you'll get better performance
- Partition Data based on the indexing needs. Use #SQLAzure for highly indexed data, and #Storage for the rest. Really consider doing Hybrid Partitioning
- Shard your #SQLAzure data across databases to increase the workload.
- Don't forget to do the basic performance tuning to applications. Measure, optimize & create a baseline for performance
- Don't forget to enable compression for additional dynamic content types in Web Apps
- You can't update Apps with a different number of endpoints, so prepare for that upfront, leave some backdoors opened
- In #Azure #AppFabric Caching Prefer to cache more smaller objects then few larger ones, increases your performance
- Consider VMRole only when you need something installed that takes long time or is a non-automated install
- Use Startup Tasks preferably in background unless you need a specific order in their launch
- Use Asynchronous Work Pattern and Queues instead of using a Synchronous approach on your Roles
- For devices don't connect directly to #SQLAzure, proxy those in your #Azure Compute (of course #SOA approach)
- If you use Startup Tasks don't forget to log everything. Ex. command >> %~dp0log.txt 2>> %~dp0err.txt
- Don’t forget to use “/y” in everything to avoid confirmation messages. Ex. “copy /y source destination”
- For Startup Tasks use local storage since it’s a guaranteed space, and if there’s not enough space it won’t run.
- If you need to run a startup task that needs the IIS pool to exist, then you should use OnStart() in elevated Role – This isn’t a problem since running a Role in Elevated mode doesn’t affect how the Web Application will run on IIS
- Process that needs to be monitored you should use a ProgramEntryPoint or NetFxEntryPoint instead of Startup Tasks
- Define NetworkTrafficRules in order to better protected internal access to your roles
- If you’re using Traffic Manager build a AppHealth page Monitor that checks if everything is OK in your Application
- When using Table Storage use the SaveChangesOptions.Batch to improve performance and save transactions
- Choosing your VMSize is important, choose accordingly to your Speed, Memory, IO and Network needs.
- Use Retry Logic for #SQLAzure connection and for #AppFabric Service Bus, Cache and Storage. Use Transient Fault Handling Framework for SQL Azure, Windows Azure Storage, Windows Azure AppFabric Service Bus and Cache.
- Don't use owner for #AppFabric Service Bus. Create your own login and provide them the appropriate permissions. Check this post by Neil Mackenzie.
- Don't use the #SQLAzure login that you created on the Management Portal in the connection String. Create your own. This is because you need to work in the least privileges and you don’t want to use the SA for that.
- When using Queues instead of using GetMessage use GetMessages(count), this will help you save transactions and improve performance of your solution
- If you're using Workers that are Queue based (Pooling Mechanism), use a back off mechanism when no messages are found in the queue. This will help reduce the number of transactions that are done and improve your solution performance
- If you're using Workers that are Queue based (Pooling Mechanism), you should consider using notifications to resume the back off mechanism. #AppFabric Service Bus will be perfect for this, but don't forget to do the cost calculation to your scenario.
- Perform your Application Scaling process considering all options, Scale Up, Out and Down, don't forget Down.
Last Updated 2011-10-21.
Satya Nadella - President of Server and Tools Business @ Microsoft
Connected Devices and Continuous Services
- Design Point
- Elastic resources
- Composable services
- data as a namespace
- Expose data as a first class namespace for other developers to use
- identity & access
- continuous delivery
- This design point was the base for building Windows Azure and the Windows Server 8
Scenario: Building a Metro-Style Application with Jason Zander – Corporate VP, Visual Studio @ Microsoft
- Visual Studio 2010 & Windows Azure Tools for Visual Studio – September
- Managed Service Configurations
- Allow you to create several configurations for the same cloud service, like Staging, QA, Production, and so on.
- Advanced Diagnostics, including profiling is now available on Windows Azure
- Visual Studio 11 has now the Productivity tools included in the base and not has an extension
- Now available to search for Copy & Paste code, even small sections of the code
- Visual Studio 11
- Designer for DirectX also available with supports for effects, alpha blending, and more.
- Diagnostics of DirectX viewing that gives you the frames that were rendered
- Diagnostics from DirectX views included with call stack
Announcements:
- Visual Studio 2011 Developer Preview
- Windows Azure SDK 1.5
- Windows Azure Toolkit for Windows 8
App Platform and Application LifeCycle Management (ALM)
- Application Platform – Scott Guthrie – Corporate VP, Server & Tools Business @ Microsoft
- ASP.NET MVC 4
- new Style for the default site, and with security and more elements already wired up.
- DOM Explorer also available for Web Apps
- HTML Inspector is now available inside Visual Studio
- Live Design to enable the Page Inspector as a different Pane that allows you to view the Page Inspector and the code side by side.
- Bundeling and Minification
- we reference a folder and it bundles on the server side all the contents of the folder and send it to the customer as a single and minified file
- Async and away language capabilities available on C# and VB.NET
- Enhances greatly the performance both in .NET 4.5 and Windows Server 8
- There’s a new Mobile ASP.NET MVC template to create a new Mobile app, and also we can start using a already build ASP.NET MVC 4 project and mobile enhance it using:
- jQuery.Mobile.MVC NuGet Package
- jQuery.Mobile will shipped as now part of the ASP.NET and Visual Studio from now on.
- This also adds a new file called _Layout.Mobile.cshtml
- Will override the layout when the site is called by a mobile device
- Supports iPhone, Windows Phone or Android
- .NET 4.5 and Windows Server 8 support WebSockets deeply
- WebSocket API in .NET 4.5 that allows us to connect to WebSocket from everywhere.
- Deployment
- Add Windows Azure Deployment Project is now available in every project type and will add immediately the Cloud Service project, configure and them deploy it to Windows Azure.
- ALM – Jason Zander – Corporate VP, Visual Studio @ Microsoft
- Hosted TFS Preview – Visual Studio Team Foundation Server in Windows Azure
- SaaS – Software as a Service
- Visual Studio 11 and ALM is using SCRUM Template
- Easily add user stories, make the sprint planning, create tasks, Task Board in order to manage the stand up meetings
- Works directly in Visual Studio 2010 with a specific patch
Announcements
- Windows Server 8
- High availability & management
- Virtualization & cloud
- Built on top of a high availability platform
- Taken some parts of Windows Azure into this version
- App Platform
- Identity & secure access
- Note: There is a huge symmetry between Windows Azure and Windows Server
- Capabilities – Bryon Surace – Senior Project Manager @ Microsoft
- Storage
- New File Services Manager
- Storage Spaces
- You don’t need a Phd in Storage, just connect the disks
- Networking
- Multiple High-Speed NICS, previously available only on HPC
- Virtualization
- Hyper-V supports now using a virtual disk from a file share
- Now in Windows Server 8 we can move a disk from one machine to a remote file share without stopping anything.
Announcement
- Windows Server 8 Developer Preview is already available for download
- Windows Azure
- High cadence of releases
- Current features
- Compute
- Database
- Storage
- Virtual machines
- CDN
- Caching
- Virtual Network
- Service Bus
- Marketplace
- Business Intelligence
- Access Control
- Key services
- Database Platform
- Reporting
- SQL Azure
- SQL Server
- Windows Azure Storage
- SQL Data Sync
- Data Marketplace
- eBay uses Bing Translator DataSet from Data Marketplace to translate the texts
- Access Control Service
Scenario: Build a Metro-Style application with Identity & Access Control using Windows Azure ACS – John Shewchuk – Technical Fellow @ Microsoft
- How to Build the Margie’s Travel app with ACS
- Using ACS and Windows 8 Security APIs
- All of this code is available on the Windows Azure Toolkit for Windows 8
Windows Azure Announcements
- Windows Azure Service Bus September release
- Windows Azure Geo-Replication now enabled by default in Windows Azure Storage
- Windows Azure Marketplace Expansion
- Additional 25 Countries available
- New Bing Data
- Hybrid Scenario – Jeff Sandquist (Senior Director, Channel Nine @ Microsoft) and Dan Fernandez (Senior Director @ Microsoft)
- Using Service Bus Messaging
- Topics ( Reliable Messaging )
Connected Devices and Continuous Services
- Opportunity
- Windows Azure
- Windows Server 8
- Visual Studio 11
Personal Notes
This was a very interesting Keynote that showed up some very cool things, like Visual Studio 11 that looks very interesting, and very slick, Windows Server 8 that is really a Server OS that leverages the elasticity that we love in the cloud, and that can help a lot make our businesses better, but the things that really impressed me was the scale up and Hyper-V capabilities of it and that it was built to leverage and use the Windows Azure and Cloud lessons that we’ve learned and bring them into our company.
Of course if you know me I’m a more Windows Azure guy and so Windows Azure was really very impressive also, and mainly the geo-replication of Windows Azure Storage is huge, because we now have the capability of having our storage replicated in more than one Windows Data Center, and this is done automatically without any need of change. This is huge in terms of disaster recovery and security of your data, since in the end of the day we don’t want to lose anything. Also the usage of Windows Azure AppFabric Service Bus Messaging is very interesting and will enable us to make more reliable solutions that is very important. So I’d say, great job Microsoft and continue to invest on those and that leveraging between Windows Azure and Windows Server 8 is very interesting and I’ll dig more in order to see exactly how it will work.
Finally the new capability that Windows Azure brings to allow that any project can be changed into a Cloud project with a single selection in the context menu is very good since it allows us to really start taking more Windows Azure into account.
Steven Sinofsky’s - Windows Division President @ Microsoft
The World of Computing is changing
- Form factor and User interaction models
- Touch is important, and not only for small devices
- Connectivity is very important
Windows 8
- Makes Windows 7 even better. Everything that runs in Windows 7 runs in Windows 8
- Reimagines Windows from chipset to experience
- Ex. SoC – System on a Chip – Support ARM
- Ex. Full new User Experience – New Touch first experiences
- How
- Windows 8 Experience
- Metro Style Platform and Tools
- Hardware
- Cloud-based services
- Everything available on ARM and x86
- Delivering fundamental performance gains
- Windows 7 SP1– About 404 MB / 32 processes
- Windows 8 today - About 281 / 29 processes
1. Windows 8 Experience (Julia Larson Green – Corporate Vice President @ Microsoft)
- Metro Style Experience
- Touch First
- Start Screen similar to Windows Phone 7
- Composed by tiles that represent the applications
- Represents the unification of the project launching and notifications
- Customizable Start Screen
- Internet Explorer 10 with Metro Style
- Fast ad fluid
- Immersive and full screen
- enables you to write apps that can get the most attention from the users
- Touch first with full keyboard and mouse
- Web Apps working together
2. Windows 8 Platform and tools
- Windows 8 Platform
- App Development
- XAML with C, C++, C#, VB.NET
- HTML5 and JavaScript
- Windows Runtime APIs (WinRT APIs)
- Bases / Fundamentals of the operating system - Windows Kernel Services
- Windows 8 Tools
- Visual Studio 2011
- Support JavaScript, VB.NET, C#, C++
- Store Menu in Visual Studio
- Creates a package and releases the app for the Windows Marketplace
- Possibility to allow trial licenses and so on
- Windows Marketplace will certify and validate the apps, similar to the Windows Phone 7 Marketplace validation process, to validate your app.
- The requirements and tools to check the compliance will be available for developers to validate them prior to the marketplace validation
- New App Package
- WinRT APIs available to all languages
- Blend
- Now support XAML and CSS and JavaScript
- Preview integrated in Blend
- WinRT Controls available for the several languages and runtimes
- Existing Win32 Apps will also be listed in the Windows Marketplace
- Existing Silverlight Apps still work in Windows Marketplace
- Migrating existing the Silverlight apps to Windows 8, are normally just:
- change Namespaces
- change the Networking API
- add App Launchers instead of Browser launch
- Everything else just works
- Developer and Platform Tools
- New APIs and tools to build Metro style apps
- Rapid and scalable development of Metro Style apps
- Choice of world class development tools and languages
- XAML, C#, VB.NET, HTML5, CSS, JavaScript, C, C++ both on ARM/x86/x64
- Business Opportunity is the world of Windows 8 Customers
3. Hardware (Michael Angiulo – Corporate VP in Windows Planning and Ecosystems)
- Windows 8 supports a hard range of systems for and hardware, from big servers to small pcs)
- Booting in 8 seconds without any Boot Screen
- Taken Defender and enhance it with Spyware, and so on, even in securing in booting from USB drives
- New state called “Connected Standby session” that allows a better system power management, with using only the power when it’s needed and when shutting down it will give the system to save state and after that just drop to almost.
- Big partnership with Intel for SoC and some low power hardware
- Windows 8 is all built using hardware acceleration for graphics, and so every app that has “metro style” will be hardware accelerated.
- Display resolutions
- 1024x600 to 1920x1080
- if you have lower resolution you won’t be able to have the apps side by side.
- Completely full windows experience with 1366x768 without no compromise
- Sensors
- Accelerometer
- Gyro
- Magnetometer
- NOTE: Sensor Fusion API. Single API combines all the information from the 3 sensors in 3 lines of code. It’s part of the WinRT APIs so is shared by all languages.
- NFC – Near field communications – for interacting with objects or other machines.
- USSD it’s a protocol very important to avoid roaming but still have connectivity
- Samsung Windows Developer Preview PC given
- New Windows Task Manager
- Apps can be suspended it they aren’t being seen, and so they don’t use CPU and enhance
- New Performance tab with all information about the resource usage
- App History
- Startup
- Users
- DetailsView with all processes
- Control Panel
- New feature – Reset and Refresh
- Refresh = Only the PC Settings will be reset not the files and apps
- Reset = Take the system to the new state, and lose all the apps
- Windows Assessment Console
- Allows you to test the several tests to analyze your app to prepare it to be packaged
- New Metro-Style Remote Desktop
- Capability to use Touch even on a remote machine
- Live Preview of the machines we are being remoted into
- Hyper-V running on Windows 8
- Enhanced Hyper-V manager
- ability to grab and open a vhd or iso and mounted in Windows without any other software
- New Windows Explorer Ribbon based
- Ability to have 1 background that fully spans to several monitors
- New options for Multiple Monitors
- Possibility to have the same elements on both start bars
- Possibility to have only the elements that are in a specific monitor appear in the monitor start bar
- Full use of the Keyboard and mouse even on the Start Menu, with the full power of running commands
- IE 10
- Fullscreen and immersive, so no chrome on it.
- All the keyboard shortcuts used in IE are available also in the IE in Windows 8 version
- Magnifier was enhanced to support the Metro-style and even more accessible.
- Includes Ink input
- Not using only a pen and a stylus
- Sync PC Settings
- If you sign up with your liveid every settings that you have will be roamed. All powered by Windows Live
4. Cloud based services for Windows 8 (Chris Jones – Senior VP for Windows Live @ Microsoft)
- every live app was redesigned for the new metro-style
- Metro-Style mail that is built using HTML5 and JavaScript using the WinRT APIs
- All my mail accounts managed in one single place and roamed using Windows Live
- Metro-Style Calendar also using HTML5 and JavaScript using the WinRT APIs
- All my calendars and all other calendars that were shared with me
- Metro-Style People/Contacts Manager also using HTML5 and JavaScript using the WinRT APIs
- Combining all my contacts like from Exchange, Facebook, LinkedIn and so on. (Just like in Windows Phone 7)
- Metro-Style Photos also using HTML5 and JavaScript using the WinRT APIs
- Combining all my photos from SkyDrive, Facebook, Flickr, …
- Connect to devices through Windows Live
- Access to other machines through Windows Live for sharing Files and access to other machine resources
All the apps presented were build by 17 teams of volunteers during the summer as interns.
Path to RTM
- Windows 8 Developer Preview
- Including Visual Studio 11 Express, Expression Blend 5, SDK, Apps Developer Pre-Release
- Next milestone is Beta, Then RC. Then RTM. Then FA
- Updates along the way
- Learning more
Still today it here http://dev.windows.com we’ll be able to Download Windows 8 Developer Preview for x86 and x64 bits version. 2 options that are with VS Express 11 or only with the samples apps. No Activation needed, and also no support. 
From what I’ve seen Windows 8 appears very cool, and the development ecosystems sounds great both with XAML and C#/VB/C/C++ and HTML5 and JavaScript. Currently needing to watch some more sessions about the subject to really understand more the WinRT APIs, and their connection and integration with .NET.
From the Windows 8 business ecosystem view, also very interesting to view the Windows Marketplace/Store being created and making us able to better market our apps.
From the User Experience perspective, Windows 8 looks like being very interesting and fully touch focused, but still allowing us to use Keyboard and Mouse even on the more Touch focused areas, and after that having also the Desktop mode to when we’re developing have a better User Experience with our Keyboard, Mouse, and other devices.
Bottom line: Windows 8 appears really, really cool and opens up a huge opportunity for both developing apps and sharing them across several devices, and market those. So, good job Microsoft. Having said that, I still need to see more about those development aspects to be even more impressed.
For those of you interested in a good book about Microsoft Windows Azure Development you should really read the “Microsoft Windows Azure Development Cookbook” in http://www.packtpub.com/microsoft-windows-azure-development-cookbook/book.
Currently I’m still reading but I’ll post a review about it as soon as I finish my reading.
Currently one very important space is the development of Applications for Connected Devices like Windows Phones, Windows Slates and so on.
One important elements is that we are currently going more and more to Wireless, and so it’s important to understand the current state of the art on Wireless.
According to AT&T “We will deliver as much data over our network in the first 5 weeks of 2015 as we did all year in 2010”.
Also currently there are several identified congestion factors that are affecting Wireless, like:
- More subscribers with smartphones consuming data, uploading and downloading photos and videos
- Spectrum + cell towers + antennas + home users
- Mobile Operator bandwidth caps
- Latency of all communications between the server and the destination device, passing by the Cell Towers, Backhaul network, internet, firewalls and so on
And so having this is mint, it’s really important to understand that we as developers cannot continue thinking that we’re going to continue developing our apps and services the same way, without thinking about these network related topics, because this will affect greatly the User Experience of our Solutions. And one important note is that UX is not only related to the User Interface (UI), like some developers try to think, it’s more then that. It’s really about having a great experience while using our applications.
So in order to do great applications for connected devices, and support millions of those devices, we need to think about scale.
Some examples of how we can scale our applications are:
- Making Database that almost nobody touches, since we really shouldn’t let every single device connect and work on our databases, instead we should really be doing multi-tier application to abstract those devices from the Database, and by doing that we are reducing the stress of our databases and at the same time enabling the possibility of scaling the services that really give us access to our data
- Place thousands of Web Servers on commodity hardware, by scaling out their app
- Replicate Data
- Scale horizontally
- Use NoSQL databases at the edge
- Shard our data using small tables for fast access
- Place Load-Balancing at every tier
- Use Hundreds of terabytes of data in an in-RAM distributed cache (For example Facebook uses MemCache and has something like 300 TB of data in memcache)
- Use pre-compile elements, since compiling slow (For example Facebook uses PHP because they think that is very productive for them, but it didn’t work very well in terms of compiling, so they made a team to create a PHP to C++ compiler in order to get more performance)
- use MapReduce pattern for parallel analysis of “Big Data”
Some of the apps that are doing this are, Bing, Facebook, Twitter, Google, Zynga, and so on.
So how in order to achieve that kind of scale we have Windows Azure. But what should we do to take the best out of Windows Azure for Connected Devices?
- Scale-out. This is easy in Windows Azure, because we can define the number of instance we want of a particular role
- SQL Azure should be never touched by the Devices. Instead we should use:
- In terms of Outbound Data - Worker roles that replicate outbound data from SQL Azure to NoSQL Azure Table Storage
- In terms of inbound Data - Worker Role move inbound data from Azure queues to SQL Azure
- Use Distributed caching, that in Windows Azure is handled by AppFabric Caching
- Do wireless efficient Services. For example using Web Roles that expose REST + JSON WCF Services is very interesting, because it saves message size, and by doing so saves time and money
- Also important is making our devices cache data and work on it offline. Not every thing should be made “live” and on top of “live” data. Don’t stress the wireless connection
I hope this helps you think better about your Connected Device Apps.
Simon Davies @ Microsoft
- Not all applications, services and data will mode to or be created in Windows Azure
- Technology Fit – Windows Azure Service / Programming Model
- Data – some data will remain on premise
- Economics – not worth moving some applications
- Timing – cannot move everything at once
- SaaS – some applications will be provided by SaaS vendors
- What capabilities does Windows Azure provide to help migrate and connect?
Rules/Considerations about Windows Azure Applications
- Windows Azure apps is built from one or more roles
- A Windows Azure apps runs multiple IDENTICAL STATELESS instances of each role
- Stateless
- This is true but you can always use the Role File System is needed, what happens is that it won’t be permanent since if the machine fails the state in that machine won’t be maintained.
- A Windows Azure apps behaves correctly when any role fails
Roles
- Web Role : the role is a web app hosted in IIS on Microsoft’s Windows Image
- Worker Role: the role is an app hosted on Microsoft’s Windows Machine
- VM Role: The role is a pre-loaded app hosted on YOUR Windows Image
- don’t forget that it’s not a persistent VM, is transient
- Types of usage:
- Web Role
- Worker Role
- Admin Web or Worker Role (same roles as previously but with some more Startup Tasks that allows you to customize the Microsoft’s Windows Image)
- VM Role
Why VM Role?
- Long running application installations
- Error-prone application installations
- Application installations require manual interaction
How to Build a VM Role?
- Take a Windows Server 2008 R2 Enterprise Image
- Make it your BASE.VHD
- Boot from the machine
- Customize your machine
- Install your packages
- Install your apps
- …
- Install the Windows Azure Integration components
- Run the “sysprep /generalize” command in order to generalize it and you’ll get an Diff.VHD
- generalize the name of the machine
- …
- Upload both Base and Diff to the Blob Storage
- “csupload add-vmimage –literalpath <base vhd path> –location <Chosen Data Center>” command compresses the VM and uploads
- Add a VM Role in Visual Studio and choose the VHD in the Blob Storage
Example Application Scenarios
- Stateless ASP.NET Web Application or Service
- Stateful ASP.NET application (either use or instance state)
- Highly parallel HPC application
- Windows Client Apps
- A single instance sever application with local state (eg. Database server)
- May work with additional design
- Virtual Machine Role will not help (over and above web\worker role)
Windows Azure Connectivity
- Data Sync : SQL Azure Data Sync
- Application Layer Connectivity & Messaging: Service Bus
- Security: Federated Identity & Access Control
- Secure Network Connectivity: Windows Azure Connect
Windows Azure Connect
- Secure network connectivity between on-premise and Cloud
- Support standard IP protocols
- Enable Azure Roles for external connectivity via service model
- Enable computers for connectivity by installing connect agent
- Only available in Windows Vista SP1, Windows 7, Windows Server 2008, Windows Server 2008 R2
- Network policy managed thought portal
- Automatic setup of secure IPv6 network between connected role instances and external computers
- Tunnel firewalls/NAT’s thought hosted SSL-based relay service
- Secure via end-to-end IPSec
- Domain-joints
Identity Federation
- WIF – Windows Identity Foundation
- Windows Access Control
Service BUS
- Extend reach of applications securely though the cloud
- Enabled multi-tenant apps to integrate with tenants on-premise services
- Securely integrate partners outside of organization boundaries
- Extend reach of on-premises web services layer
- Usage Patterns
- Connectivity
- Service Remoting
- Cloud Eventing
- Protocol Tunneling
- Messaging
- Load Leveling
- Multicast Messaging
- …
Simon Davies ( World Wide Technical Support Professional @ Microsoft )
Windows Azure Overview
- Is “An Operating System for the Data Center”
- Treat the data center as a machine
- Compute
- Virtualized compute environment based o Windows Server
- Storage
- Durable (Automatically Managed by Microsoft. Always have 3 copies for Disaster Recovery purposes)
- Scalable
- High Availability
- Network
- Automated network provision and management
- On Premise Connectivity
- Global Content Delivery Network (CDN)
- Management
- Automated
- Model Driven Management as a Service
- Resources
- Management
- Provisioning
- Monitoring
- Allows Developers to think their app and data only
Windows Azure In Depth
- Modeling Cloud Applications
- A could app is typically made up of different components
- Front End
- Middle Tier
- Backend storage
- Multiple instances of each for scalability and availability
- Windows Azure Service
- Windows Azure Hosts “Services”
- A service is
- An isolated boundary
- A set of component roles, each within endpoints
- At runtime numbered, identical instances of each role are created, each instance is a Virtual Machine
- All of this specified declaratively in the service model and configured at runtime using a service configuration
- What is a role?
- Definition
- Role Name
- Role Type
- VM Size
- Network Endpoints
- Code
- Web/Worker: Hosted DLL and other executable
- VM Role: VHD
- Configuration
- Number of instances
- Number of update and fault domains
- Example:
- Front-End Role
- Definition
- Type: Web
- VM Size: Small
- Endpoints: External 1
- Configuration
- Instances:2
- Update Domains: 2
- Fault Domains: 2
- Service Model Files
- Service Definition in in ServiceDefinition.csdef (Definition Part of the Role)
- Service Configuration is in ServiceConfiguration.cscfg (Configuration Part of the Role)
- CSPack, program that exists in the SDK, will zips a service binary into a package (Code Part of the Role)
- Compute Runtime Environment
- Fabric Controller talks to the Fabric Agent in order to configure and run the App
- Fabric Agent runs inside the Host OS and talks with the Windows Azure Agend in order to manage their configurations
- Each instance runs inside a Guest OS managed by the Host OS and is composed by
- Windows Azure Agent
- Windows Azure Compute
- YOUR APP
- Service Isolation
- Your Services are isolated from other services
- The Fabric Controller
- The “kernel” of the cloud operating system
- Manages datacenter hardware
- Manages Windows Azure Services
- Some of the main responsibilities
- Datacenter resource allocation
- Datacenter resource provisioning
- Managing Availability
- Upgrade Domains
- Default and Max Fault Domain is 5
- Vertical concept
- Fault Domains
- Provisioning a role instance
- 3 VHDs are created
- Guest OS Image (D:\)
- Resource VHD (C:\)
- Role VHD (E:\ or the next available letter) = contains the package we deployed
- Fabric Controller Security
- The VM is the security boundary upon which Windows Azure security is based
- the host OS and FC agent are trusted
- The guest agent is untrusted
- Updating the OS
- Initiated by Windows Azure Team
- Goal: update all machines as quickly as possible
- Constraint: must not violate the SLA and so we need at least 2 instances in order not to have a outage of the service
Luis Alves Martins (Architect Evangelist @ Microsoft Portugal)
How do we Start?
- Think BIG / Globally
- Multi-Language
- Multi-Currency
- …
- Start SMALL
- Start building things step by step, instead of trying to conquer all at once
- Think only on the Application and Data instead of all of those and also Hardware, Hardware Management, and so on.
How to Get Windows Azure?
- Microsoft BizSpark Program (Startup with less than 3 years)
- MSDN Subscriptions (Microsoft Partner Benefit)
- Windows Azure Subscriptions
- Windows Azure Pay-as-you-Go
Why Azure?
- Cost
- Agility
- Risk Mitigation
- Expertise
- Join the expertise that you already have about developing solutions and Managing Data and connect that with the Expertise by Microsoft on Managing Data Centers
- Symmetry
| Cloud | SQL Azure | Windows Azure |
| On-Premise | SQL Server | Microsoft Windows Server 2008 or greater |
- Platform Continuum
- The same code in Traditional DataCenters, Public or Private Windows Server, Windows Azure, Azure Appliance
- This can happen if we have some considerations prior to beginning the development
- It’s a natural Evolution, not Revolution
- Step forward in terms of:
- Costs
- Economy of Scale
- Don’t think about the Machines and the Hardware
- …
Business Model
- Without any change:
- Customer pays for the software
- Customer buys its own Windows Azure Account
- Provide SaaS
- Customer pays for the solution that already includes the Windows Azure costs
Windows Azure Internals Interesting facts
Pricing is easy (Example)
- Compute = 42,52 €/month (1 role – no Licensing fees)
- Data = 7,085 €/GB/month (SQL)
- Transfer = 0,1064 €/GB/month
How to Start with Azure?
Today someone asked me about Windows Azure AppFabric Caching, and how it works and so I thought it would be interesting to do a blog post about it, with the Questions and Answers for everyone to see and comment and even ask more, to complete it.
Question: What are the Cache Sizes available in the Windows Azure AppFabric Caching Service?
Answer: 128 MB, 256MB, 512MB, 1GB, 2GB, 4GB
Question: What happens when provisioning Windows Azure AppFabric Caching in the Portal?
Answer: When you do the provisioning of the Caching Service, you define the Cache Size you want to use, and so that Cache Size is Reserved for you in the Internal Cluster of Cache Machines that are associated with the Service.
Question: Is Windows Azure AppFabric Caching Cache Size Always Available?
Answer: Yes, the complete size is always Reserved for you only.
Question: Is Windows Azure AppFabric Caching Cache Size all stored in the same Machine?
Answer: No. Caching Service has a Distributed Architecture and so it spreads your cache size across several machines.
Question: Security is very important and it’s important to understand how does Windows Azure AppFabric Caching Service works in terms of Security? How can we define the security of the Data?
Answer: Windows Azure AppFabric Caching Service is highly integrated with the Windows Azure AppFabric Access Control Service (ACS), and so that is the way to define the security that will be used to access the cache.
Question: What about the Princing? What is the pricing associated with Windows Azure AppFabric Caching Service?
Answer: The Price depends on the Caching Size you choose.
- 128 MB cache for $45.00/month
- 256 MB cache for $55.00/month
- 512 MB cache for $75.00/month
- 1 GB cache for $110.00month
- 2 GB cache for $180.00/month
- 4 GB cache for $325.00/month
But you have it free until August 1st, 2011. More about this check here.
If you have any more questions just ask away and I’ll try to answer them.
Wade Wegner ( Technical Evangelist @ Windows Azure Team )
Why Phone + Cloud?
- The cloud levels the playing field
- The cloud provides larger pool of resources from which to pull
- The cloud provides a way to reach across device platforms
Why Windows Phone 7 and Windows Azure?
- Because Windows Azure is PaaS. you build, Windows Azure runs it
- Automatic OS patching
- Scalable
- Utility billing model
- Additional services
- Access Control Services (Provides Identity Federations)
- Traffic Manager (Provides an easy way to manage the location from which Data Center the app is served)
- Caching ( Provides a Caching Service that allows us to easily create cache in our apps)
- CDN (Content Delivery Network)
- …
- Common Development tools
- Visual Studio
- Languages
- Emulators for development
- Demo Source Code: http://www.wadewegner.com/
What was shown in the Demo
- Identity
- Identity Options
- Create your own (eg. username + password, token, …)
- Custom Model
- ASP.NET Membership Providers
- Use a single existing identity system (eg. Live Id, Facebook, Twitter, …)
- Outsource identity management (eg. Access Control Service)
- More information about this:
- Authenticating Users in a Windows Phone 7 App via ACS, OData and Windows Azure - http://bit.ly/wp7acs
- Storage
- Storage Options
- SQL Azure
- Relational Database
- Highly available
- Managed for you as a Service
- Pattern
- WebRole that exposes an OData Service
- Create a Web role with an OData Service that will expose your SQL Azure data to your clients
- Windows Azure Tables
- Non-relational structured Storage
- Massive scale-out
- OData
- Pattern
- Using Public Blobs
- Client sends data to the Web Role
- Web Role stores data in blobs
- Client fetches public blobs directly
- Shared Access Signatures (SAS)
- Client gets Shared Access Signature from the Web Role
- Client inserts the SAS in the URI and stores data in blobs
- Client fetches public blobs and even private containers as long as the SAS allows it
- Windows Azure Blobs
- Big files
- REST
- Pattern:
- Proxy Calls
- Client sends data to the Web role
- Web role stores data in Blobs
- Services
- Web Role vs Worker Role
- Web Role has IIS
- Worker role does not
- think about it as being a DLL with a Main()
- Both implement the RoleEntryPoint
- Scaling Work in Windows Azure
- Traditionally
- Web role receives message
- Web role enqueues work
- Worker role pools queue
- Worker role sends notifications
- Interesting because it splits the IIS and Services parts allowing you to scale them independently
- Multitenancy
- You can have more than one application running in your role instance
- based on the Sites tag in the ServiceDefinition.csdef
- Content Delivery Network (CDN)
- Currently at least 24 nodes that will cache data locally in order to provide the data faster
- Traffic Manager
- Intelligently routes the request to the most appropriate Data Center according to the policies defined in it
- Communications
- Two primary communication models
- Phone-initiated
- Options
- Http-based, request/response
- Can be based on pooling of User Initiated requests
- Frameworks choises (WCF, OData, WebRequest, …)
- Wire Formats (SOAP, JSON, POX, …)
- Cloud-initiated
- Push Notifications
- Single connection between phone and Microsoft Push Notification Service
- The cloud cannot connect directly to the phone, just passing by the Microsoft Push Notification
- There’s no warranty of delivery
- Bandwidth and battery friendly
- There kinds of push notifications
- Raw – send a message to an app
- Toast – send a message to the user
- Tile – Update an image, title or count
- How does this works?
- Phone opens a channel in the Microsoft Push Notifications Service
- Phone sends the URL to the cloud
- Cloud pushes notifications via URL
- Microsoft Push Notification Service notifies the phone
Important Best Practice: DO NOT STORE SECRETS ON YOUR PHONE
What is there to make this easier?
- Announcing: Windows Azure Toolkit for Windows Phone 7 (v1.1.0)
- Make it easier for phone developers to use Windows Azure
- Toolkit includes:
- Client libraries
- Sample apps
- Source code
- Documentations
- Available on http://watoolkitwp7.codeplex.com
- The phone will only communicate with a Service over HTTPs if
- The cert is installed on the device
- The cert is signed by a Trusted Authority
- In order to use the self signed certs you need to install it on the phone
David Robinson (Senior Lead Program Manager)
SQL Azure Relational Database
- Based on SQL Server 2008 R2 engine
- Use same tools and data access frameworks
- Six global datacenters
- High Availability & Redundancy
- Reads are completed at the primary
- Writes are replicated to a quorum of secondaries
SQL Azure Roadmap
- MIX08
- Introduced SQL Server Data Services (ACE type)
- MIX09
- Introduce SQL Data Services (Real Relational Database)
- MIX10
- New Features announced
- 50 GB Database
- PHP Support
- MARS support
- OData Endpoint Preview
- Geo Spatial Data Types
ASP.NET MVC 3
- Razor view Engine which provides a very streamlined syntax for writing clean and concise views.
- Improved support for Dependency Injection
- Global Action Filters
- jQuery based Unobtrusive Ajax and Client Validation
- ViewBag property for dynamic access to ViewData
- Support for view engine selection in the New Project and Add View dialog
Extending the Reach of Data
- This is achieved using ODATA protocol
- Cloud Data Services
- Windows Azure Tables
- SQL Azure
- Windows Azure MarketPlace DataMarket
- Powering Web/AJAX Experiences
- Consuming ODATA via jQuery & JSON
- Powering Windows Phone 7
- ODATA libraries available for Windows Phone 7
- Powering Interoperability on Other platforms
Why does Performance matters?
- More responsive applications
- Faster page load times
- Higher interactivity – new type of applications
- Better User Experience – more $$$$
SQL Azure Data Sync
- Sync within the Cloud
- Read scale-out via multiple copies
- reporting
- web site reference data
- Read-write scale-out via multiple copies:
- Same or different data centers
- Key features
- No-Code sync configuration
- Easily define data to be synchronized and locations
- Choose how often data is synchronized
- Full Data Synchronization Capabilities
- Two-way sync of same data, as well as one-way sync
- Conflict Handling
- Detect and resolve conflicts caused by the same data being changed in multiple locations
- Logging and Monitoring
- Administration capabilities for tracking usage
- Scale
- Service scales as resources requirements grow
- Currently there are 2 CTPs available
- CTP 1 publicly available
- CTP 2 invitation only
- CTP 3 will be available by the end of the summer and will be feature complete
Geo Available Applications
- Windows Azure Traffic Manager
- This will help handle geo-locating SQL Azure Databases
- This will manage the traffic
- SQL Azure Data Sync
- Syncs the SQL Azure Databases between regions
CY11 Investment Themes
- Managed Services
- Data Protection / Recovery
- Local Backup/Point in Time Restore: to recover from user/apps errors
- Geo Backup/Disaster Recovery from data center/geographical disasters
- New Data Movement Capabilities
- DB Import/Export of data and schema between SQL Azure and SQL Server
- Migration Support to SQL Azure from Sybase, in addition to existing support for Access, MySQL and Oracle
- Enhanced Management Experiences
- Enhanced portal based experiences
- Multiple DB administrators per subscriptions to support enterprise scenarios
- Scale on Demand
- Scale-out with Federations
- Scale to virtually unlimited size to host very large databases across multiple servers
- Better support for multi-tenant applications with numerous tenants
- Scale-up and Scale-down Databases
- Scale beyond 50GB and less than 1GB
- Performance Predictability
- Reserve compute capacity with Resource SLA
- Enhanced multi-tenancy support
- API level support for multiple DB server per subscription, provisioning & de-provisioning
- Faster Innovation
- Rich Insights with Reporting as a Service
- Ability to author rich reports, host in Azure and view in on-premise or cloud apps
- Spanning Apps with Sync Service
- Synchronize data between SQL Azure DBs between SQL Azure & SQL Server
- Rich Developer Experiences
- Professional Devs: VS “Juneau”
- Department Devs: LightSwitch
- Java Devs: supported JDBC driver
- International Devs: Localized Azure Portal
- Data Market Enhancements
- International rollout
- Enhanced Content Management
- Integration with Denali, Office and CRM
Resources
Haridas (Software Developer Lead)
- Windows Azure Storage
- What is it?
- Scalable, Durable, Highly Available Cloud Storage System
- Pay for what you use
- Abstractions
- Blobs – Provides a simple interface for storing named files along with metadata for the file
- Drives – Provides durable NTFS volumes for Windows Azure Applications to use – based on Page Blobs
- Tables – Provides structured storage. A Table is a set of entities which contains a set of properties
- Queues – Provides reliable storage and delivery of messages for an Application
- Data Storage Concepts
- Based on the Account
- Container for Blobs (Blob Storage)
- https://<account>.blob.windows.net/<container>
- Table for Entities (Table Storage)
- https://<account>.table.windows.net/<table>
- Queue for Messages (Queue Storage)
- https://<account>.queue.windows.net/<queue>
- Blobs
- Provides a highly scalable, durable and available file system in the cloud
- An account can create many containers
- No limit on number of blobs in a container
- Limit of 100TB per account
- Associate metadata with Blobs
- Upload / Download Blobs
- Allows range reads
- Conditional operations – If-Match, Id-Not-Modified-Since, …
- Sharing – Public containers, Shared Access Signatures (SAS)
- SAS – pre-authenticated url
- Storage client uses by default a timeout of 90 seconds. This can be changed using the BlobRequestOptions class to set the timeout to be according to the type of blob you’re uploading
- Types of Blobs
- Block Blobs
- Targeted at streaming workloads
- Each Blob consists of a sequence of blocks
- 2 phase commit: Blocks are uploaded and them separately committed
- Efficient continuation and retry
- Send multiple out of order blocks in parallel and decide the block order during commit
- Random range reads possible
- Size limit is 200GB per blob
- What to do?
- File has variable sized blocks
- Upload blocks in Parallel using PutBlock
- Retry failed blocks
- Commit blob using PutBlockList
- Page Blobs
- Targeted at random write workloads
- Each blob consist of an array of pages
- Size limit 1TB per blob
- Page
- Each page range write is committed on PUT
- Page is 512 byte in size
- Write boundary aligned at multiple of 512 byte
- Range reads possible
- Pages that do not have data are zeroed out
- How?
- Write 5K bytes – PutPage
- Clear starting at a particular offset – ClearPage
- Overwrite bytes – PutPage
- Truncate Blob – SetMaxBlobSize
- Sharing
- Every blob request must be signed with the account owner’s key
- Share your files options
- The container must be public – read-only rights whenever you make a container public
- Shared Access Signatures (SAS) – share pre-authenticated URLs with users
- You decided who you’d like to share it with
- You can give variable permition
- Delete Blob
- Write Blob
- Read or Listing Blob
- Two ways to do that
- Everything embedded using the URL and doing that signing it with your owner key
- Create an access policy that will contain all the parameters that normally are in the url
- Advantage is that this will make it possible to change the policy after giving the URL so someone.
- SAS
- Use container level access as it allows access to be easily revoked
- Snapshots
- Point in time read-only copy of blob
- Every snapshot creates a new read only point in time copy
- Charged only for unique blocks or pages (ex. reuse blocks or pages)
- For reuse, use WritePages or PutBlock & PutBlock
- Restore snapshots using copy blob
- Remember to cleanup your snapshots
- Best Practices
- Use parallel blocks upload count to reduce latency when uploading photo
- Client Library uses a default of 90 seconds timeout – use size based timeout
- Snapshots – For block or page reuse, issue block and page uploads in place of UploadXXX methods in Storage Client
- Shared Access Signatures
- Use container level policy as it allows revoking permissions
- Share SAS Url using Https
- Create new container for blobs like log files that have retention period
- Delete logs after 1 month – create new containers every month
- Container recreation
- Garbage Collection can take time until which time container with same name cannot be created (this might make that you cannot create a new container immediately with exactly the same name after deleting the previous one)
- Use unique names for containers
- Drive
- Provides a durable NTFS volume for Windows Azure Applications
- Use existing NTFS APIs
- Easy migration path to the cloud
- Durability and survival of data on application failover or hardware failure
- All flushed and un-buffered writes to drive are made durable
- A Windows Azure Drive is a Page Blob
- Mounts Page Blob as an NTFS drive
- Mounted by one VM at a time for read/write
- A VM can dynamically mount up to 16 drives
- Drives can be up to 1TB
- Tables
- Provides Structured Storage
- Massively Scalable and Durable Tables
- Billions of entities (rows) and TBs of data
- A storage account can contain many tables
- No limit on number of entities (aka rows) in each table
- Provides flexible schema
- Familiar and Easy to use API
- WCF Data Services – .NET classes and LINQ
- REST (OData Protocol) – with any platform and language
- Best Practices
- Use the context.SaveChangesWithRetries(SaveChangesOptions.Batch)
- SaveChangesOptions.Batch gives you transactional semantics to the operation
- Transactions on entities are only allowed if the partition key is the same
- CloudTableQuery<> handles ContinuationToken
- Use clustered index in queries for performance (PartitionKey)
- Limit large scans and expect continuation tokens for queries that scan
- Split “OR” on keys as individual queries
- Entity Group Transactions – Batch to reduce costs and get transaction
- Do not reuse DataServiceContext across multiple logical operations
- Discard DataServiceContext on failures
- AddObject/AttachTo can Throw exceptions if entity is already being tracked
- Point query throws an exception if resource does not exist. Use IgnoreResourceNotFoundException property
- Queue
- Queue are highly scalable, available and provide reliable message delivery
- Simple, asynchronous work dispatch
- A storage account can create any number of queues
- 8K message size limit and default expiry of 7 days
- Programming semantics ensures that a message can be processed at least once
- Get message to make the message invisible
- Delete message to remove the message
- Access is provided via REST
- Best Practices
- Make message processing idempotent
- Do not rely on order – invisibility time can result in out of order
- Messages > 8K => use blobs or tables to store and message contains the blob or table entity key
- Use message count to dynamically increase/decrease workers. Example:
- Retain one instance that polls once every X time period
- One instance polling every second result in 2.678.400 calls which cost around $2.67
- Spawn more instances when you detect backlog
- Use dequeue count to detect
- Visibility expiry time needs to increase
- Poison messages
- Partitioning & Scalability
- Know the scalability Targets
- Single Blob Partition
- Single Queue/Table Partition
- up to 500 transactions (entities or messages) per second
- Storage account
- SLA – 99,9% availability
- Capacity – Up to 100 TBs
- Transactions – Up to 5000 entities per second
- Bandwidth – Up to 3 gigabits per second
- Scale above the limits
- Partition between multiple storage accounts and partitions
- When limit is hit, app may see ‘503 server busy’. Apps should implement exponential back-off
- Storage Partition – How to Scale?
- Every data object has a partition key
- Different for each data type (blobs, tables, queues)
- Partition Key is unit of scale
- A partition can be served by a single server
- System load balances partitions based on traffic
- Controls entity locality
- Systems load balances
- Load balancing can take a few minutes to kick in
- Can take a couple of seconds for partition to be available on a different server
- Server busy
- Use exponential back-off on “Server Busy”
- Our system load balances to meet your traffic needs
- Single partition limits have been reached
- Automatic Load Balancing
- Assignment
- Process:
- When a request is made the Load Balancer delivers it to one of the Front-Ends and it’s delivered to the appropriate Back-Ends that is serving that partition
- Each server has multiple partitions and the loads can be different
- If the Master System recognizes that a single service has to many request, then it will offload those partitions and reassign then to the systems that have less load
- Partition Keys in each abstraction
- Blobs
- “Container Name + Blob Name” is the partition key
- Every blob and its snapshot are in a single partition
- Tables
- “Table Name” + Partition Key is the partition
- Entities with same partition key value are served from the same partition
- Queues
- Queue Name is the Partition Key
- All messages for a single queue belong to the same partition
- Interesting Tools to understand what’s happening with the Storage
James Conard (Sr. Director – @jamescon)
What is the Windows Azure Platform?
- Provide the best and most comprehensive Platform as a Service offering for building, deploying, and running cloud applications
- Open & Flexible
- Using several technologies and not only the .NET Framework
- Leverage Existing Investments
- Use the known technologies and ways to develop that exist already in the market in order to reduce the difficulty of entering in the cloud
- Ready for next Generation apps
- Prepare for the next types of apps like mobile, and high available
Windows Azure Core Services
- Compute
- Scalable environment for running code
- Enables .NET, C++, PHP, Ruby, Python
- By default .NET Framework is installed but you can deploy the technology you’d like and use it
- Automate Service Management
- Abstract you from managing the infrastructure where your apps is running on
- Storage
- Scalable and highly available cloud storage
- Blobs, Tables, Queues, Drives
- REST APIs and several client libraries
- Database
- SQL Relational Database (SQL Azure)
- Use the same knowledge that exist in using SQL Server and make them available in the cloud
- Familiar programming model & Tools
Windows Azure Platform Roadmap
- October 2008
- Announced the Windows Azure Platform
- First CTP of Windows Azure Platform
- March 2009
- Announced SQL Azure Relational DB
- November 2009
- Updates Windows Azure CTP
- Announced VMRole, Project Sydney and Windows Azure Platform pricing and SLAs
- Enable FullTrust & PHP, Java etc.
- Project Dallas CTP
- February 2010
- Windows Azure Platform generally available
- June 2010
- Windows Azure Update
- .NET Framework 4
- OS versioning
- SQL Azure Update
- 50 GB databases
- Spatial data Support
- DAC support
- November 2010 – Big Release
- New Windows Azure Platform Management Portal
- Multiple Service Administrators (co-Admins)
- Remote Desktop
- Full IIS
- Web Roles previously using Hosted Web Core
- Only supported a single HTTP or HTTPs endpoing
- Web Roles now supporting Full IIS 7.0/7.5
- Enables new scenarios
- Multiple IIS websites
- Multiple virtual machines
- Configure IIS extensions
- Web Deploy for Rapid development
- Windows Server 2008 R2 & IIS 7.5
- Elevated Privileges
- Windows Azure Connect (CTP)
- Windows Azure Virtual Machine Role (Beta)
- Extra Small Instances
- Startup Tasks & Admin Mode
- Enables short, unattended setups on role startup
- Silent MSIs, COM components, Registry Keys, Configuring Windows Server Roles, etc
- Configuration Sample for startup tasks in the ServiceConfiguration.cscfg
- <WebRole name=”test”>
- <Startup>
- <Task commandline=”<commandToBeRunned>” executingContext=”limited|elevated” taskType=”simple|foreground|background”/>
- </Startup>
- </WebRole>
Windows Azure Content Delivery Network (CDN)
- Enabled from Windows Azure Platform Portal
- Integrated with Storage (Blob Storage)
- Recent Enhancements
- Delivery from Windows Azure Compute instances
- Https support
- CTP of Smooth Streaming – End of April 2011
Windows Azure AppFabric Access Control Service v 2.0 (ACS)
- Provides AuthN support using multiple identity providers
- Easily integrate Live ID, Facebook, Yahoo, Google and Active Directory
- Support for WS-Federation, WS-Trust, OpenID 2.0, OAuth 2.0
- Familiar & Consistent .NET Programming Model
- Use existing Windows Identity Foundations SDK & Assemblies
- REST-based Service Management API
- Integrate into your existing apps and control panels
- Now Available
- No charge during promotion period ending January 1st, 2012
- Low cost after the promotion: $1.99 per 100.000 transactions
Windows Azure AppFabric Caching
- Distributed in-memory cache for Windows Azure apps
- Integrated directly with the cache using .NET client library
- Session State Provider for Windows Azure applications
- Caching provided as a building block service
- Configure an AppFabric Namespace
- Choose your cache size
- Write code against that service
- Familiar & Consistent APIs
- Same APIs as Windows Service AppFabric
- Available commercially by the end of April
- In the CTP only the Data Center of South Central US has the Caching Service
- supported cache sizes: 128 MB, 256MB
- After the end of April (commercial Availability) you’ll have it available in every data center with supported cache sizes from 128MB to 4GB
Cloud Data Services
- SQL Azure Reporting (Currently in a Private CTP)
- SQL Server Reporting provided as a Service
- Reports authored using existing tools (BIDS) and deployed to SQL Azure Reporting
- SQL Azure Data Sync
- Data synchronization provided as a Service
- Sync to/from SQL Azure Database
- Sync between SQL Server and SQL Azure
- Windows Azure DataMarket
- Information marketplace for ISVs and IWs that provide trusted public domain & premium commercial data
- Now commercially available
- Firstly announced as codename “Dallas”
Performance Matters
- The new Windows Azure Traffic Manager solved this problem
- Load Balancing across multiple Hosted Services
- Now Available in CTP
- Three scenarios that are currently in the CTP
- Performance
- Directs the user to the best / closest deployment
- Fault Tolerance
- Redirect Traffic to another deployment based on availability
- Round Robin
- Traffic routed to deployments based on a fixed ration
- Also allow to keep a status of all your apps in order to understand how to rout the traffic
Windows Azure Platform Access
- Windows Azure Pass
- Free 30-Day access to the platform
- Includes:
- Compute: 3 small instances
- Storage: 3 GB + 250K transactions
- Data Transfer: 3GB in & 3GB out
- Database: 2x1GB Web Edition
- Signup: http://windowsazurepass.com
- Enter code: MIXABC
- Introductory Trial
- Available through September 30th, 2011
- Includes:
- Compute: 750 extra small hours + 25 small
- Storage: 20GB + 50K transactions
- Data Transfer: 20GB in & 20 GB out
- Database: 1 GB Web Edition (90 Days)
- Sign-up: http://windowsazure.com
- Note: Requires Credit Card Information but allows you to access CTP services
- Ultimate
- Compute: 1.500 hours of small instances
- Storage: 30 GB
- Transactions: 2M
- Bandwidth: 35 GB in / 35 GB out
- Databases: 5 GB Web Edition
- Premium
- Compute: 1.500 hours of extra-small instances
- Storage: 25 GB
- Transactions: 1M
- Bandwidth: 30 GB in / 30 GB out
- Databases: 1 GB Web Edition
- Professional
- Compute: 750 hours of extra-small instances
- Storage: 20 GB
- Transactions: 250K
- Bandwidth: 25 GB in / 25 GB out
- Databases: 1 GB Web Edition
Resources
Interesting topics
- You can select which OSFamily you want to use by editing the ServiceConfiguration.cscfg file with the values:
- 1 – Windows Server 2008
- 2 – Windows Server 2008 R2
- Currently ASP.NET MVC 3 isn’t available on Windows Azure and so you need to install it using a Startup Task
- Release of some Extensions for ACS 2.0 that allow ACS to be plugged directly in Umbraco allowing it to configured without going to the Management Portal
More Posts
Next page »