Windows Azure programming patterns for Start-ups
()
About this ebook
Related to Windows Azure programming patterns for Start-ups
Related ebooks
Learning Azure DocumentDB Rating: 0 out of 5 stars0 ratingsLearning AWS Rating: 4 out of 5 stars4/5Building Web Services with Microsoft Azure Rating: 0 out of 5 stars0 ratingsLearning Docker Rating: 5 out of 5 stars5/5Azure for .NET Core Developers: Implementing Microsoft Azure Solutions Using .NET Core Framework Rating: 0 out of 5 stars0 ratingsGetting Started with Knockout.js for .NET Developers Rating: 0 out of 5 stars0 ratingsLearn Microsoft Azure: Step by Step in 7 day for .NET Developers Rating: 0 out of 5 stars0 ratingsMicrosoft Silverlight 5 and Windows Azure Enterprise Integration Rating: 0 out of 5 stars0 ratingsCodeIgniter 1.7 Rating: 0 out of 5 stars0 ratingsNode Web Development, Second Edition Rating: 0 out of 5 stars0 ratingsMastering ServiceStack Rating: 0 out of 5 stars0 ratingsGetting Started with Citrix® Provisioning Services 7.0 Rating: 0 out of 5 stars0 ratingsAmazon EC2 Cookbook Rating: 0 out of 5 stars0 ratingsLearning Microsoft Windows Server 2012 Dynamic Access Control Rating: 0 out of 5 stars0 ratingsHands-On Microservices with Kubernetes: Build, deploy, and manage scalable microservices on Kubernetes Rating: 5 out of 5 stars5/5Programming Windows Workflow Foundation: Practical WF Techniques and Examples using XAML and C# Rating: 0 out of 5 stars0 ratingsCreating ASP.NET Core Web Applications: Proven Approaches to Application Design and Development Rating: 0 out of 5 stars0 ratingsHyper-V 2016 Best Practices Rating: 0 out of 5 stars0 ratingsBuilding VMware Software-Defined Data Centers Rating: 0 out of 5 stars0 ratingsRobust Cloud Integration with Azure Rating: 0 out of 5 stars0 ratingsCitrix XenApp Performance Essentials Rating: 0 out of 5 stars0 ratingsDeveloping Cloud Native Applications in Azure using .NET Core: A Practitioner’s Guide to Design, Develop and Deploy Apps Rating: 0 out of 5 stars0 ratingsSOA Patterns with BizTalk Server 2013 and Microsoft Azure - Second Edition Rating: 0 out of 5 stars0 ratingsMicrosoft Azure Storage Essentials Rating: 0 out of 5 stars0 ratingsModern JavaScript Applications Rating: 0 out of 5 stars0 ratingsLearning Node.js for .NET Developers Rating: 0 out of 5 stars0 ratingsGetting Started with Windows VDI Rating: 0 out of 5 stars0 ratingsGetting Started with Oracle Data Integrator 11g: A Hands-On Tutorial Rating: 5 out of 5 stars5/5Hybrid Cloud Management with Red Hat CloudForms Rating: 0 out of 5 stars0 ratings
Computers For You
Deep Search: How to Explore the Internet More Effectively Rating: 5 out of 5 stars5/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Mastering ChatGPT: 21 Prompts Templates for Effortless Writing Rating: 5 out of 5 stars5/5How to Create Cpn Numbers the Right way: A Step by Step Guide to Creating cpn Numbers Legally Rating: 4 out of 5 stars4/5Network+ Study Guide & Practice Exams Rating: 4 out of 5 stars4/5Procreate for Beginners: Introduction to Procreate for Drawing and Illustrating on the iPad Rating: 0 out of 5 stars0 ratingsThe ChatGPT Millionaire Handbook: Make Money Online With the Power of AI Technology Rating: 0 out of 5 stars0 ratings101 Awesome Builds: Minecraft® Secrets from the World's Greatest Crafters Rating: 4 out of 5 stars4/5Creating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5Ultimate Guide to Mastering Command Blocks!: Minecraft Keys to Unlocking Secret Commands Rating: 5 out of 5 stars5/5AP Computer Science Principles Premium, 2024: 6 Practice Tests + Comprehensive Review + Online Practice Rating: 0 out of 5 stars0 ratingsCompTIA Security+ Practice Questions Rating: 2 out of 5 stars2/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Everybody Lies: Big Data, New Data, and What the Internet Can Tell Us About Who We Really Are Rating: 4 out of 5 stars4/5CompTIA IT Fundamentals (ITF+) Study Guide: Exam FC0-U61 Rating: 0 out of 5 stars0 ratingsChildhood Unplugged: Practical Advice to Get Kids Off Screens and Find Balance Rating: 0 out of 5 stars0 ratingsChatGPT Ultimate User Guide - How to Make Money Online Faster and More Precise Using AI Technology Rating: 0 out of 5 stars0 ratingsPractical Lock Picking: A Physical Penetration Tester's Training Guide Rating: 5 out of 5 stars5/5Elon Musk Rating: 4 out of 5 stars4/5Dark Aeon: Transhumanism and the War Against Humanity Rating: 5 out of 5 stars5/5The Professional Voiceover Handbook: Voiceover training, #1 Rating: 5 out of 5 stars5/5Master Builder Roblox: The Essential Guide Rating: 4 out of 5 stars4/5Hacking: Ultimate Beginner's Guide for Computer Hacking in 2018 and Beyond: Hacking in 2018, #1 Rating: 4 out of 5 stars4/5
Reviews for Windows Azure programming patterns for Start-ups
0 ratings0 reviews
Book preview
Windows Azure programming patterns for Start-ups - Becker Riccardo
Table of Contents
Windows Azure Programming Patterns for Start-ups
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Instant Updates on New Packt Books
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. The Concepts of Windows Azure
Red Dog
Windows Azure announcement
A quick start on Windows Azure
How it works internally
First steps
Creating and deploying a website on Windows Azure
First deployment
Upgrade domains
Fault domains
Fabric Controller
Internals of a node
Deployment steps
Core components of Windows Azure
Compute
Web roles
Worker roles
Virtual machine roles
Database
SQL Database
Data Sync
Storage
Binary Large Object
Table Storage
Queue
Windows Azure drive
Business analytics
Service Bus
Content delivery network
Caching
Virtual network
Windows Azure Connect
Windows Azure Traffic Manager
Windows Azure Active Directory
Marketplace
Summary
2. A Startup Scenario
Introduction
BizSpark
Program roles
Enrolling into the program
Geotopia's goals
Geotopia prototype
TFS in the cloud
Connecting to TFS Preview
Querying Tasks
Summary
3. Create Your Solution
Solution structure
Organizing a solution in VS 2010
Compute and storage emulators
Bing Maps
Adding Silverlight to cloud
Embedding Bing Maps
Setting up TFS preview
Connecting with TFS Preview
Publishing to Windows Azure
Summary
4. Storing Your Data
Storage
What is Windows Azure storage?
Blobs
Table storage
Queues
Inside storage
Storage architecture
Storage availability
Fault domains
Upgrade domains
Replication
Partitioning
Storage metrics
Table storage usage
A closer look at tables
Choose the right key
Keys for scaling
Keys for transactions
Geotopia data model
Adding an entity
Querying
Continuation tokens
Best practices
Table storage summary
Queue usage
A closer look at the queue
Creating a queue
Inserting a message
Retrieving a message
Queue operations
Idempotency
Using blobs
File transfer
Uploading a file
Downloading the file
Storage best practices
Use exponential backoff
Summary
5. SQL Database
Overview
Setting up SQL databases
Guidelines
Best practices
Encryption and security
Encryption demo
Data Sync
Supported datatypes in Data Sync
Securing Data Sync
Authentication
Setting up a Data Sync environment
Summary
6. Key Features Explained
Service Bus
Getting started
Queues
Working with queues
A sample scenario
Preparing the project
Sending messages
Receiving messages
Cross-domain communication
Comparison
Background information
Topics and subscriptions
Preparing the project
Using filters
Windows Azure Caching
Caching capabilities
Setting it up
Caching examples
Adding items to the cache
Session state and output caching
Windows Azure Connect
Setting it up
Enabling a web role with Connect
Managing Connect
Testing connectivity
Other Connect capabilities
Access Control Service
Getting started
Adding an identity provider
Adding a relying party
Application integration
Integrating with Facebook
Using FederatedAuthentication
Displaying information about me
Traffic Manager
Setting it up
Round robin
Performance
Failover
Testing the policies
Failover scenario
Summary
7. The Billing Aspects of Windows Azure
Basic billing details
Compute
Windows Azure SQL databases
Storage
Bandwidth
Content delivery network
Cache
Service Bus
Access Control Service
Pricing
Calculator
Purchase options
Member offers
MSDN subscribers
MPN members
Cloud Essentials
Cloud Accelerate
BizSpark members
How much we use
Bandwidth
What is counted as a transaction
How to reduce the number of transactions
When are transactions billed
Estimate capacity
Implementing your own billing tracker
Enabling analytics
Request logging
Example transactions
Blob capacity
Summary
8. Windows Azure Patterns
Enterprise Library for Windows Azure
EntLib and Azure compatibility
EntLib Integration Pack
Autoscaling
Transient fault handling
Blob configuration
PowerShell Cmdlets
Protected configuration provider
Windows Azure autoscaling
Growth model
Applying WASABi
Key concepts of WASABi
Configure autoscaling
Worker host
Setting rules
Constraint rules
Reactive rules
Throttling
Service information store
Metronome
Data collection
Data points store
Rule evaluation
Conflicting rules
The scaler
The tracker
The stabilizer
Customizing WASABi
Blob configuration
PowerShell cmdlets
Transient fault handling
The Transient Fault Handling Application Block
Applying transient fault handling
The Gatekeeper pattern
The KeyMaster
Summary
9. Application Lifecycle Management
ALM overview
Governance
Development
Operations
ALM tooling
Planning and tracking
Writing, unit testing, debugging, analyzing, and profiling
Build
Defining a Build
Queue build
Review build
Application Lifecycle Management on Windows Azure
Step 1: Team development
Step 2: Build, Unit test, Deploy, UItest flow, and manual test
Step 3: Release drop
Step 4: Operations
Summary
10. Windows Azure Security
Security development lifecycle
Security roles
Security maturity
Security activities
Training
Requirements
Design
Implementation
Verification
Release
SDL in Windows Azure
Requirements
Design
Implementation
Verification
Release
Microsoft Global Foundation Services
Certifications
Privacy
Platform security
Adding more security
Summary
11. What's New in Windows Azure
Overview
Virtual machines
Creating a virtual machine
Connecting to the VM
Setting up a VHD
Virtual network
Creating a virtual network
Management portal
Media services
Setting it up
Using media services
An example displaying the use of media services
Uploading
Converting
Iterating
Downloading
Summary
Index
Windows Azure Programming Patterns for Start-ups
Windows Azure Programming Patterns for Start-ups
Copyright © 2012 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: October 2012
Production Reference: 1161012
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-84968-560-3
www.packtpub.com
Cover Image by Sandeep Babu (<sandyjb@gmail.com>)
Credits
Author
Riccardo Becker
Reviewers
Michael Collier
Neil Mackenzie
Acquisition Editor
Dilip Venkatesh
Lead Technical Editor
Unnati Shah
Technical Editors
Devdutt Kulkarni
Arun Nadar
Rohit Rajgor
Azharuddin Sheikh
Copy Editor
Brandt D'Mello
Project Coordinator
Sai Gamare
Anugya Khurana
Proofreader
Maria Gould
Indexer
Rekha Nair
Graphics
Valentina D'Silva
Production Coordinator
Nitesh Thakur
Cover Work
Nitesh Thakur
About the Author
Riccardo Becker works full-time as a Principal IT Architect for Logica, in the Netherlands. He holds several certifications, and his background in computing goes way back to 1998, when he started working with good old' Visual Basic 5.0 (or was it 6.0?). Ever since, he fulfilled several roles, such as Developer, Lead Developer, Architect, Project Leader, Practice Manager, and recently, he decided to accept the role of Principal IT Architect, in which he focuses on innovation, cutting-edge technology, and specifically on Windows Azure and cloud computing in general.
In 2007, he joined the Microsoft LEAP program, where he got a peek at the move Microsoft was about to make on their road to the cloud. Pat Helland gave him that insight, and since the first release of Windows Azure on PDC 2008, he started to focus on it, keeping track of the progress and the maturity of the platform. In the past few years, he has also done a lot of work on incubation with his employer, raising awareness on cloud computing in general and Windows Azure.
I would like to thank all my colleagues who were counterparts with me on various subjects in the world of Azure. Special thanks to my dear colleague and friend, Raymond Binnendijk en Rémon ter Haar, who helped me out throughout the whole project.
I also would like to thank the folks from Packt Publishing, especially Sai Gamare, who helped me keep on track and on schedule, despite some obstacles and some changes that I made to the original outline.
Special thanks to my employer Logica for all the opportunities that have helped me in realizing this book. It is thanks to the daily job and to getting the opportunity to focus on these subjects that I have come to this point of having enough substance to write this book.
About the Reviewers
Michael Collier is a Windows Azure MVP and serves as a National Architect for a Microsoft SI partner that specializes in Windows Azure. He has nearly 11 years of experience building Microsoft-based applications for a wide range of clients. Michael spends his days serving as a developer or architect, helping clients succeed with the Microsoft development platform. He also enjoys speaking about Windows Azure at local user groups as well as at regional and national conferences. Michael is also the founder of CloudDevelop as well as of the Central Ohio Cloud Computing User Group in Columbus, OH. You can follow Michael on Twitter at www.twitter.com/MichaelCollier and on his blog at www.MichaelSCollier.com.
Neil Mackenzie has been kicking the tires of Windows Azure since PDC 2008. He works for Satory Global, helping companies use the Windows Azure platform. Neil wrote the Microsoft Windows Azure Development Cookbook for Packt Publishing. He is a Microsoft MVP for Windows Azure. Neil tweets occasionally on @mknz.
www.PacktPub.com
Support files, eBooks, discount offers and more
You might want to visit www.PacktPub.com for support files and downloads related to your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.
Why Subscribe?
Fully searchable across every book published by Packt
Copy and paste, print and bookmark content
On demand and accessible via web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.
Instant Updates on New Packt Books
Get notified! Find out when new books are published by following @PacktEnterprise on Twitter, or the Packt Enterprise Facebook page.
Preface
Windows Azure was officially announced at PDC 2008, but looking back, I had a quick look in the kitchen of Windows Azure in 2007 while I was visiting Redmond during the Lead Enterprise Architect Program (LEAP) sessions. Pat Helland, a senior architect at Microsoft, gave a talk on The irresistible forces meet the movable objects.
Pat described the nature of the forces where he pitted big servers and fast CPUs against commodity hardware (ordinary machines you can buy everywhere). Moore's Law, (The number of transistors on circuits doubles every year) is applicable to many hardware components. Though still accurate, it is getting more and more expensive to double CPU speed. Increasing CPU speed is still possible, but at a price. The costs for scaling out a single server are generally higher than scaling up to multiple processors or servers. If we look solely at the speed of the CPU, we can conclude that the growth is flattening. Parallel computing is cheaper than scaling out single servers.
Looking back at the history of Windows Azure, Pat Helland actually stated that there should be something like low-cost, highly-available, high-bandwidth, high-storage, and high computing power-based datacenters, all around the world, that can run both existing and new applications.
Guess what? The concept envisioned was officially announced at PDC 2008! Windows Azure was born, and this very first release of the platform actually contained everything that was envisioned during this talk on LEAP 2007. Lots of cheap hardware runs in datacenters all around the globe that offer massive computing power, storage, and bandwidth. All these components are available like electricity; you start paying from the moment you start using it. Operational expenses (OpEx) instead of capital expenses (CapEx) enable you to experiment more easily, since you do not need to buy hardware but just take it from Windows Azure. When your experiment is successful and you need more computing power or storage to serve all your customers, you can easily scale up.
This book elaborates on different features from the Windows Azure platform. The central theme of the book is a fictitious company, Geotopia. This company decided to build its own social network by leveraging the abilities of the Windows Azure platform.
What this book covers
Chapter 1, The Concepts of Windows Azure, introduces Windows Azure, the cloud offering from Microsoft. It describes the author's first contact with thecloud
in general and how Microsoft decided to put a great amount of effort into realizing Windows Azure.
Chapter 2, A Startup Scenario, shows how a brand new, ambitious company just opened its doors. Geotopia consists of enthusiastic developers and architects who jointly created a new view on social networking. It is not a basic user interface where plain text dominates but a compelling map interface, offering users the ability to treat it as their social canvas and drop video and images, and create messages based on their location or on the location of their interest. Users can recommend locations, shops, or other points of interest by adding comments or multimedia and tell their friends about it. This chapter describes the requirements for Geotopia.
Chapter3, Create Your Solution, teaches us how to create an organized Windows Azure solution with Visual Studio 2010. Both a web and a worker role are created together, with a Silverlight client acting as the Geotopia canvas, based on Bing Maps technology. We will also learn to run cloud projects locally on our own machine and debug them. As the last step, the initial solution is actually deployed to Windows Azure.
Chapter4, Storing Your Data, is a deep dive into the storage fundamentals of Windows Azure. It outlines the architecture of Windows Azure Storage and its underlying architecture. You will also learn how to operate the different Storage offerings, such as blobs, queues, and tables.
Chapter5, SQL Database, digs deeper into the scalable cloud database service that Microsoft offers and is a part of the Windows Azure platform. The chapter shows how to set up a SQL database and outlines best practices and guidelines. You will also learn how to fully leverage the power of Data Sync.
Chapter6, Key Features Explained, outlines different features from the platform (previously known as AppFabric). You will learn how to make use of Service Bus and how to enable messaging between your applications. Also, key features such as Caching, Windows Azure Connect, Access Control Service, and Windows Azure Traffic Manager are explained in detail, as is how you can benefit from them.
Chapter7, The Billing Aspects of Windows Azure, describes in great detail all the different billing aspects of Windows Azure. You will learn how the different components of the platform are charged and how you can get a good grip on the Windows Azure costs.
Chapter8, Windows Azure Patterns, provides a step-by-step walkthrough on how to make use of the Enterprise Library Integration Pack in your cloud services. It not only provides great detail on autoscaling and how to achieve this, but also drills down on transient fault handling and how to implement a gatekeeper pattern to enhance security in your cloud service.
Chapter9, Application Lifecycle Management, briefly explains Application Lifecycle Management in general and some specifics with respect to ALM on the Windows Azure Platform.
Chapter10, Windows Azure Security, explains how the Security Development Lifecycle (SDL) is applicable for Windows Azure projects. The chapter also depicts some typical security features on the platform.
Chapter11, What's New in Windows Azure, contains a brief overview of new features of Windows Azure, released in June 2012.
What you need for this book
In order to run the code snippets given in the book, you will need:
Visual Studio 2010.
Windows Azure SDK, the latest version.
Access to Bing Maps and a valid account key. This can be retrieved from http://www.bingmapsportal.com.
Who this book is for
This book is for developers and architects who are experienced with Microsoft .NET technology and web technology in general, but may or may not be experienced with the latest version(s) of the .NET framework. Some general knowledge on cloud computing is preferred, but not mandatory.
Conventions
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: you need to run the following command: set-executionpolicy remotesigned
A block of code is set as follows:
While(true)
{
CloudQueueMessage message = queue.GetMessage();
if(message != null)
{
//process it
Process(message);
Queue.DeleteMessage(message);
}
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: By selecting a geotopic and clicking on Play this story, consecutive topics that are related to the selected ones will also be played chronologically.
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <feedback@packtpub.com>, and mention the book title through the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website, or added to any list of existing errata, under the Errata section of that title.
Piracy
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <copyright@packtpub.com> with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
Questions
You can contact us at <questions@packtpub.com> if you are having a problem with any aspect of the book, and we will do our best to address it.
Chapter 1. The Concepts of Windows Azure
The irresistible forces meet the movable objects.
—Pat Helland
In this chapter, we will provide an overview of Windows Azure and also briefly explain the history of the platform, why it was created, and why it is interesting and applicable for startup companies. We will also explore the evolution of Windows Azure from its early days back in 2008 right to where it is today. The internals of Windows Azure and the way Microsoft datacenters work will also be explained from a user experience perspective.