INTRODUCING THE WINDOWS AZURE PLATFORM AN EARLY LOOK AT WINDOWS AZURE, SQL AZURE, AND .NET SERVICES DAVID CHAPPELL AUGUST 2009 SPONSORED BY MICROSOFT CORPORATION CONTENTS An Overview of the Windows Azure Platform ....................................................................................... 3 Windows Azure ........................................................................................................................................ 4 SQL Azure ................................................................................................................................................. 6 .NET Services............................................................................................................................................ 8 A Closer Look at the Technologies ......................................................................................................... 9 Windows Azure ........................................................................................................................................ 9 Running Applications .......................................................................................................................... 9 Accessing Data .................................................................................................................................. 11 SQL Azure ............................................................................................................................................... 13 SQL Azure Database .......................................................................................................................... 13 “Huron” Data Sync ............................................................................................................................ 16 .NET Services.......................................................................................................................................... 17 Access Control Service ....................................................................................................................... 17 Service Bus ........................................................................................................................................ 19 Conclusions ......................................................................................................................................... 21 About the Author ................................................................................................................................ 21 2 AN OVERVIEW OF THE WINDOWS AZURE PLATFORM Using computers in the cloud can make lots of sense. Rather than buying and maintaining your own machines, why not exploit the acres of Internet-accessible servers on offer today? For some applications, their code and data might both live in the cloud, where somebody else manages and maintains the systems they use. Alternatively, applications that run inside an organization—on-premises applications—might store data in the cloud or rely on other cloud infrastructure services. Applications that run on desktops and mobile devices can use services in the cloud to synchronize information across many systems or in other ways. However it’s done, exploiting the cloud’s capabilities can improve our world. But whether an application runs in the cloud, uses services provided by the cloud, or both, some kind of application platform is required. Viewed broadly, an application platform can be thought of as anything that provides developer-accessible services for creating applications. In the local, on-premises Windows world, for example, this includes technologies such as the .NET Framework, SQL Server, and more. To let applications exploit the cloud, cloud application platforms must also exist. And because there are a variety of ways for applications to use cloud services, different kinds of cloud platforms are useful in different situations. Microsoft’s Windows Azure platform (originally known as the Azure Services Platform) is a group of cloud technologies, each providing a specific set of services to application developers. As Figure 1 shows, the Windows Azure platform can be used both by applications running in the cloud and by applications running on local systems. Figure 1: The Windows Azure platform supports applications, data, and infrastructure in the cloud. The components of the Windows Azure platform include: Windows Azure: Provides a Windows-based environment for running applications and storing data on servers in Microsoft data centers. 3 SQL Azure: Provides data services in the cloud based on SQL Server. .NET Services: Offers distributed infrastructure services to cloud-based and local applications. Each component of the Windows Azure platform has its own role to play. This overview describes al three of its members, first at a high level, then in a bit more detail. While none of them are yet final—details and more might change before their initial release—it’s not too early to start understanding this new set of platform technologies. WINDOWS AZURE At a high level, Windows Azure is simple to understand: It’s a platform for running Windows applications and storing their data in the cloud. Figure 2 shows its main components. Figure 2: Windows Azure provides Windows-based compute and storage services for cloud applications. As the figure suggests, Windows Azure runs on a large number of machines, all located in Microsoft data centers and accessible via the Internet. A common Windows Azure fabric knits this plethora of processing power into a unified whole. Windows Azure compute and storage services are built on top of this fabric. The Windows Azure compute service is based, of course, on Windows. For the initial availability of this service, a Community Technology Preview (CTP) made public in the fal of 2008, Microsoft al owed Windows Azure to run only applications built on the .NET Framework. Today, however, Windows Azure also supports unmanaged code, letting developers run applications that aren’t built on the .NET Framework. In either case, those applications are written in ordinary Windows languages—C#, Visual Basic, C++, and others—using Visual Studio 2008 or another development tool. Developers can create 4 Web applications using technologies such as ASP.NET and Windows Communication Foundation (WCF), applications that run as independent background processes, or applications that combine the two. Both Windows Azure applications and on-premises applications can access the Windows Azure storage service, and both do it in the same way: using a RESTful approach. The underlying data store is not Microsoft SQL Server, however. In fact, Windows Azure storage isn’t a relational system, and its query language isn’t SQL. Because it’s primarily designed to support applications built on Windows Azure, it provides simpler, more scalable kinds of storage. Accordingly, it al ows storing binary large objects (blobs), provides queues for communication between components of Windows Azure applications, and even offers a form of tables with a simple query language. (For Windows Azure applications that do need traditional relational storage, however, the Windows Azure platform provides SQL Azure Database, described later.) Running applications and storing their data in the cloud can have clear benefits. Rather than buying, instal ing, and operating its own systems, for example, an organization can rely on a cloud provider to do this for them. Also, customers pay just for the computing and storage they use, rather than maintaining a large set of servers only for peak loads. And if they’re written correctly, applications can scale easily, taking advantage of the enormous data centers that cloud providers offer. Yet achieving these benefits requires effective management. In Windows Azure, each application has a configuration file, as shown in Figure 2. By changing the information in this file manually or programmatical y, an application’s owner can control various aspects of its behavior, such as setting the number of instances that Windows Azure should run. The Windows Azure fabric monitors the application to maintain this desired state. To let its customers create, configure, and monitor applications, Windows Azure provides a browser-accessible portal. A customer provides a Windows Live ID, then chooses whether to create a hosting account for running applications, a storage account for storing data, or both. An application is free to charge its customers in any way it likes: subscriptions, per-use fees, or anything else. Windows Azure is a general platform that can be used in various scenarios. Here are a few examples, al based on what the CTP version al ows: A start-up creating a new Web site—the next Facebook, say—could build its application on Windows Azure. Because this platform supports both Web-facing services and background processes, the application can provide an interactive user interface as well as executing work for users asynchronously. Rather than spending time and money worrying about infrastructure, the start-up can instead focus solely on creating code that provides value to its users and investors. The company can also start smal , incurring low costs while its application has only a few users. If their application catches on and usage increases, Windows Azure can scale the application as needed. An ISV creating a software-as-a-service (SaaS) version of an existing on-premises Windows application might choose to build it on Windows Azure. Because Windows Azure mostly provides a standard Windows environment, moving the application’s business logic to this cloud platform won’t typical y pose many problems. And once again, building on an existing platform lets the ISV focus on their business logic—the thing that makes them money—rather than spending time on infrastructure. 5 An enterprise creating an application for its customers might choose to build it on Windows Azure. Because Windows Azure supports .NET, developers with the right skil s aren’t difficult to find, nor are they prohibitively expensive. Running the application in Microsoft’s data centers frees the enterprise from the responsibility and expense of managing its own servers, turning capital expenses into operating expenses. And especial y if the application has spikes in usage—maybe it’s an on-line flower store that must handle the Mother’s Day rush—letting Microsoft maintain the large server base required for this can make economic sense. Running applications in the cloud is one of the most important aspects of cloud computing. With Windows Azure, Microsoft provides a platform for doing this, along with a way to store application data. As interest in cloud computing continues to grow, expect to see more Windows applications created for this new world. SQL AZURE One of the most attractive ways of using Internet-accessible servers is to handle data. The goal of SQL Azure is to address this area, offering a set of cloud-based services for storing and working with many kinds of information. While Microsoft says that SQL Azure wil eventual y include a range of data-oriented capabilities, including reporting, data analytics, and others, the first SQL Azure components to appear are SQL Azure Database and “Huron” Data Sync. Figure 3 il ustrates this. Figure 3: SQL Azure provides data-oriented facilities in the cloud. SQL Azure Database (formerly known as SQL Data Services) provides a database management system (DBMS) in the cloud. This technology lets on-premises and cloud applications store relational and other types of data on Microsoft servers in Microsoft data centers. As with other cloud technologies, an organization pays only for what it uses, increasing and decreasing usage (and cost) as the organization’s needs change. Using a cloud database also al ows converting what would be capital expenses, such as investments in disks and DBMS software, into operating expenses. 6 Unlike the Windows Azure storage service, SQL Azure Database is built on Microsoft SQL Server. Stil , in its original 2008 CTP release, SQL Azure Database didn’t expose a traditional relational view of data. Based on customer feedback, Microsoft decided to change this. Going forward, SQL Azure Database wil support relational data, offering a SQL Server environment in the cloud, complete with indexes, views, stored procedures, triggers, and more. This data can be accessed using ADO.NET and other Windows data access interfaces. In fact, applications that today access SQL Server local y wil largely work unchanged with data in SQL Azure Database. Customers can also use on-premises software such as SQL Server Reporting Services to work with this cloud-based information. While applications can use SQL Azure Database much as they do a local DBMS, the management requirements are significantly reduced. Rather than worry about mechanics, such as monitoring disk usage and servicing log files, a SQL Azure Database customer can focus on what’s important: the data. Microsoft handles the operational details. And like other components of the Windows Azure platform, using SQL Azure Database is straightforward: Just go to a Web portal and provide the necessary information. The second SQL Azure component announced so far is “Huron” Data Sync. Built on the Microsoft Sync Framework and SQL Azure Database, this technology synchronizes relational data across various on-premises DBMSs. The owners of that data can determine what should be synchronized, how conflicts should be handled, and more. Applications might rely on SQL Azure in a variety of ways. Here are some examples: A Windows Azure application can store its data in SQL Azure Database. While Windows Azure provides its own storage, relational tables aren’t among the options it offers. Since many existing applications use relational storage and many developers know how to work with it, a significant number of Windows Azure applications are likely to rely on SQL Azure Database to work with data in this familiar way. To improve performance, customers can specify that a particular Windows Azure application must run in the same data center in which SQL Azure Database stores that application’s information. An application in a smal business or a department of a big organization might rely on SQL Azure Database. Rather than storing its data in a SQL Server or Access database running on a computer under somebody’s desk, the application can instead take advantage of the reliability and availability of cloud storage. Suppose a manufacturer wishes to make product information available to both its dealer network and directly to customers. Putting this data in SQL Azure Database would al ow it to be accessed by applications running at the dealers and by a customer-facing Web application run by the manufacturer itself. An organization with a customer database replicated across different geographies might use “Huron” Data Sync to keep these replicas in sync. Perhaps each geography needs its own copy of the data for performance or to ensure availability or for some other reason. Automatic synchronization can make this necessary distribution significantly less painful. Whether it’s for supporting a Windows Azure application, making data more accessible, keeping that data synchronized, or other reasons, data services in the cloud can be attractive. As new technologies become 7 available under the SQL Azure umbrel a, organizations wil have the option to use the cloud for more and more data-oriented tasks. .NET SERVICES Running applications and storing data in the cloud are both important aspects of cloud computing. They’re far from the whole story, however. Another option is to provide cloud-based infrastructure services that can be used by either on-premises applications or cloud applications. Fil ing this gap is the goal of .NET Services. Original y known as BizTalk Services, the functions provided by .NET Services address common infrastructure chal enges in creating distributed applications. Figure 4 shows its components. Figure 4: .NET Services provides cloud-based infrastructure that can be used by both cloud and on-premises applications. The components of .NET Services are: Access Control: An increasingly common approach to identity is to have each user supply an application with a token containing some set of claims. The application can then decide what this user is al owed to do based on these claims. Doing this effectively across companies requires identity federation, which lets claims created in one identity scope be accepted in another. It might also require claims transformation, modifying claims when they’re passed between identity scopes. The Access Control service provides a cloud-based implementation of both. Service Bus: Exposing an application’s services on the Internet is harder than most people think. The goal of Service Bus is to make this simpler by letting an application expose Web services endpoints that can be accessed by other applications, whether on-premises or in the cloud. Each exposed endpoint is assigned a URI, which clients can use to locate and access the service. Service Bus also 8 handles the chal enges of dealing with network address translation and getting through firewal s without opening new ports for exposed applications. Here are some examples of how .NET Services might be used: An ISV that provides an application used by customers in many different organizations might use the Access Control service to simplify the application’s development and operation. For example, this .NET Services component could translate the diverse claims used in the various customer organizations, each of which might use a different identity technology internal y, into a consistent set that the ISV’s application could use. Doing this also allows offloading the mechanics of identity federation onto the cloud-based Access Control service, freeing the ISV from running its own on-premises federation software. Suppose an enterprise wished to let software at its trading partners access one of its applications. It could expose this application’s functions through SOAP or RESTful Web services, then register their endpoints with Service Bus. Its trading partners could then use Service Bus to find these endpoints and access the services. Since doing this doesn’t require opening new ports in the organization’s firewal , it reduces the risk of exposing the application. The organization might also use the Access Control service, which is designed to work with Service Bus, to rationalize identity information sent to the application by these partners. As with Windows Azure, a browser-accessible portal is provided to let customers sign up for .NET Services using a Windows Live ID. Microsoft’s goal with .NET Services is clear: providing useful cloud-based infrastructure for distributed applications. A CLOSER LOOK AT THE TECHNOLOGIES Having a broad understanding of the Windows Azure platform is an important first step. Getting a deeper understanding of each technology is also useful, however. This section takes a slightly more in-depth look at each member of the family. WINDOWS AZURE Windows Azure does two main things: It runs applications and it stores their data. Accordingly, this section is divided into two parts, one for each of these areas. How these two things are managed is also important, and so this description looks at this part of the story as well. Running Applications On Windows Azure, an application typical y has multiple instances, each running a copy of all or part of the application’s code. Each of these instances runs in its own virtual machine (VM). These VMs run 64-bit Windows Server 2008, and they’re provided by a hypervisor that’s specifical y designed for use in the cloud. Yet a developer doesn’t supply his own VM image for Windows Azure to run, nor does he need to worry about maintaining a copy of the Windows operating system. Instead, the CTP version lets a developer create applications using Web role instances and/or Worker role instances. Figure 5 shows how this looks. 9 Figure 5: In the CTP version, Windows Azure applications can consist of Web role instances and Worker role instances, with each instance running in its own virtual machine. As its name suggests, each Web role instance accepts incoming HTTP (or HTTPS) requests via Internet Information Services (I S) 7. A Web role can be implemented using ASP.NET, WCF, or another technology that works with IIS. As Figure 5 shows, Windows Azure provides built-in load balancing to spread requests across Web role instances that are part of the same application. A Worker role instance, by contrast, cannot accept requests directly from the outside world—it’s not allowed to have any incoming network connections, and IIS isn’t running in its VM. Instead, it typical y gets its input via a queue in Windows Azure storage. The messages in this queue might come from a Web role instance, an on-premises application, or something else. Wherever its input comes from, a Worker role instance can send output to another queue or to the outside world—outgoing network connections are al owed. And unlike a Web role instance, which is created to handle incoming HTTP requests, a Worker role instance is a batch job. Befitting this generality, a Worker role can be implemented using any Windows technology with a main() method. Whether it runs a Web role instance or a Worker role instance, each VM also contains a Windows Azure agent that al ows the application to interact with the Windows Azure fabric, as Figure 5 shows. The agent exposes a Windows Azure-defined API that lets the instance write to a Windows Azure-maintained log, send alerts to its owner via the Windows Azure fabric, and more. While this might change over time, Windows Azure’s initial CTP release maintains a one-to-one relationship between a VM and a physical processor core. Because of this, the performance of each application can be guaranteed—each Web role instance and Worker role instance has its own dedicated processor core. To increase an application’s performance, its owner can increase the number of running instances specified in the application’s configuration file. The Windows Azure fabric wil then spin up new 10 Document Outline
- Contents
- An Overview of the Windows Azure Platform
- Windows Azure
- SQL Azure
- .NET Services
- A Closer Look at the Technologies
- Windows Azure
- Running Applications
- Accessing Data
- SQL Azure
- SQL Azure Database
- Huron Data Sync
- .NET Services
- Access Control Service
- Service Bus
- Conclusions
- About the Author
Add New Comment