How to teach cloud computing – The Windows Azure Platform – Step 2
Let’s walk through the PowerPoint together |
Notice there is an overview slide deck to kick things off. I’m going to be code-focused in these posts so I am not going to spend a lot of time on background teachings. But I will summarize parts of the deck below that have resonated with my audiences. You can find it under “Presentations.” But of course I will need to add my own twist. |
Slide 2 (Slide 1 skipped)
Is interesting because it shows you continuum of how we’ve moved from on premise to hosted to cloud. At the end of the day it is about saving money. There are some good points here that make sense. |
Developers like the cloud because of high level services taking care of coding headaches |
|
The cloud is good because it is so easily scalable and available |
|
Decision makers like the cloud because it is “pay as you go” |
|
Hosted servers are good because you save from buying hardware, compared to on-premise |
|
Hosted does not have as much automation and high level services compared to cloud so you end up having to write more plumbing code. |
Slide 3
Defines the entirety of the Windows Azure Platform. This is a great slide because it shows the main pillars in a simple way. We will focus on Windows Azure and the parts known as “Compute” and “Storage.” I have already blogged extensively about integrating with SQL Azure. |
Slide 5 - 9
How the data center works. Note the Fabric Agent. |
The fabric controller: |
Owns all the data center hardware |
|
Uses the inventory to host services |
|
Similar to what a per machine operating system does with applications |
|
Provisions the hardware as necessary |
|
Maintains the health of the hardware |
|
Deploys applications to free resources |
|
Maintains the health of those applications |
PDC has a great talk about this here by Frederick Smith: |
There some great things this fabric controller must do. Here is a list of tasks YOU (the developer) do not have to do. |
Worry about having enough machines on hand - Resource allocation |
|
Algorithmicly define how machines are chosen to host services |
|
Responding to hardware failures which will always occur |
|
Procure additional hardware if necessary |
|
IP addresses must be acquired |
|
Applications configured |
|
DNS setup |
|
Load balancers must be programmed |
|
Locate appropriate machines |
|
Update the software/settings as necessary |
|
Only bring down a subset of the service at a time |
|
Maintaining service health |
|
Logging infrastructure is provided to diagnose issues |
Slide 10 - Understanding Web Roles and Worker Roles
This is important to realize the difference about what is public facing and what is not. | |
The slide illustrates that web roles are hosted in IIS. You can note that PHP is supported. Note that web roles are hosted in IIS 7 w/ Windows Server 2008 x64. | |
Worker roles do processing and can run native code if necessary. Worker roles can listen to TCP Ports. |
Slide 11
Provides a sample architecture for a auction/bidding application. Notice that we have 102 web facing interfaces, 2 of them for administrative purposes. But we also have a number of worker roles doing what they do best, “work.” |
Resizing Images |
|
Processing auctions |
|
Performing notifications |
Also notice the web apps listen at different ports, depending on whether you are administrator. |
Slide 12
Addresses storage options. Very important topic. Here are some additional points you can make. |
Blobs, tables, and queues hosted in the cloud, close to your computation |
|
Authenticated access and triple replication to help keep your data safe |
|
Easy access to data with simple REST interfaces, available remotely and from the data center |
|
All access to storage services takes place through the storage account. The storage account is the highest level of the namespace for accessing each of the fundamental services. It is also the basis for authentication. |
|
The Blob service provides storage for entities, such as binary files and text files |
|
Containers and blobs support user-defined metadata in the form of name-value pairs specified as headers on a request operation. |
|
The Queue service provides reliable, persistent messaging within and between services. The REST API for the Queue service exposes two resources: queues and messages |
|
When a message is read from the queue, the consumer is expected to process the message and then delete it. After the message is read, it is made invisible to other consumers for a specified interval. If the message has not yet been deleted at the time the interval expires, its visibility is restored, so that another consumer may process it. |
Storage Explorer |
The REST APIs allow you to access the Blob, Queue, and Table objects |
Slide 13
Is here to emphasize the importance of partition keys and how they can lead to more storage instances. This is an animated slide. |
Slide 15
Is all about pricing. |
Compute |
|
Storage |
|
Transactions |
|
Data Transfer |
Slide 16 – SQL Azure
Is about SQL Azure, MS’s relational offering in the cloud. |
Microsoft SQL Azure delivers on Microsoft’s SQL Server® Data Platform vision of extending the Data Platform capabilities in cloud as web-based services. | |
SQL Azure enables a rich set of services for relational database, reporting, and analytics and data synchronization with mobile users, remote offices and business partners. | |
Consider it as a subset of SQL Server 2008 On-Premise. Some features are absent from the cloud version. | |
Here is where you can learn about Similarities and Differences between SQL Azure and On-Premise SQL Server. |
Easy provisioning and deployment |
|
High availability/scalability |
|
Pay as you go |
|
SLAs and Fault Tolerance |
|
Global presence |
|
Same code as you’ve always written |
More examples of leveraging existing skills. There are some caveats, however. For example, not 100% of the stored procedure capabilities are available in SQL Azure relative to on-premise SQL Server. |
No physical admin required |
|
Transact-SQL (T-SQL) support |
|
Integrate existing toolsets |
|
It is just a connection string |
|
Creating, accessing and manipulating tables, views, indexes, roles, stored procedures, triggers, and functions |
|
Execute complex queries and joins across multiple tables |
|
Insert, Update, and Delete |
But that is not all. You also get key stuff like: |
Constraints |
|
Transactions |
|
Temp tables |
|
Basic functions (aggregates, math, string, date/time) |
Many familiar programming models are supported, which gives you the ability to connect up to SQL Azure from PHP. |
Support for tracking billable metrics in real time and for historical analysis |
|
Managed ADO.NET data access |
|
Native ODBC |
|
Support for PHP |
Full support for SQL Server 2008 R2. |
These databases all live in a Microsoft Data Center. This means I can use all the great tooling with SQL Server Management Studio right out of the box. |
How about an early preview of upcoming features
OData is an emerging standard you can explore here. |
The Open Data Protocol (OData) is an emerging standard for querying and updating data over the Web. |
|
OData is a REST-based protocol whose core focus is to maximize the interoperability between data services and clients that wish to access that data. |
|
It is thus being used to expose data from a variety of sources, from relational databases and file systems to content management systems and traditional websites. |
|
In addition, clients across many platforms, ranging from ASP.NET, PHP, and Java websites to Microsoft Excel and applications on mobile devices, are finding it easy to access those vast data stores through OData as well. |
SQL Azure Data Sync
Enables synchronization between an on-premise SQL Server database and SQL Azure. |
Process of synchronizing with the cloud |
|
Tuned for SQL Azure and a stand-alone utility for SQL Server that enables synchronization between an on-premise SQL Server database and SQL Azure |
|
Use the Visual Studio plug-in that demonstrates how to add offline capabilities to applications which synchronize with SQL Azure by using a local SQL Server Compact database |
Project Houston
SQL Server Management Studio (SSMS) is a tool you get when you install Microsoft SQL Server 2008 R2. There may be scenarios However, there are scenarios that may require a web based approach to database management tasks. That is where project “Houston” comes into play. |
Project “Houston” provides a web-based database management tool for basic database management tasks like authoring and executing queries, designing and editing a database schema, and editing table data. |
|
Navigation pane with object search functionality |
|
Information cube with basic database usage statistics and resource links |
|
Table designer and table data editor |
|
Aided view designer |
|
Aided stored procedure designer |
|
T-SQL editor |
How SQL Azure Works in the Data Center
To target a specific instance of SQL Azure, you simply modify the connection string. Think of SQL Azure running on a pool of servers that can be accessed with a mere change to a connection string |
The Level of Abstraction in SQL Azure Simplifies Coding
There are 3 distinct layers of abstraction that make programming against a relational database easy. |
Layer 1 : Client Layer | |
The client layer can reside on-premise in your datacenter or be hosted in Windows Azure | |
Because SQL Azure provides the same tabular data stream (TDS) interface as SQL Server, you can use familiar tools and libraries to build client applications for data that is in the cloud |
Layer 2 : Services Layer | |
The services layer functions as a gateway between the client layer and the platform layer, where the data resides. The services layer provides three functions: provisioning, billing and metering, and connection routing. |
Layer 3 : Platform Layer | |
The platform layer includes the physical servers and services that support the services layer. The platform layer consists of many instances of SQL Server, each of which is managed by the SQL Azure fabric. |
Notice how you can switch your “Single Primary” if “Replica 1” fails. We are on replica 2 as our Single Primary. |
Reliability
SQL Azure is very reliable because you are really running 3 instances behind the scenes. To the developer it is really just one logical server. But underneath the covers, there are really 3 machines running behind this logical server. |
Notice that the internal SQL Azure systems keep the systems balanced across various machines. |
Note a few things
Client connects through HTTP, with support for REST |
|
Typically you would use ADO.NET, just as you did with on-premise SQL Server |
|
You just edit web.config to change your connection string |
Everything is the same as before (w/ On-Premise SQL Server)
The point of this diagram is that SQL Azure is just as easy to use whether you are working with traditional application code (thick client/on-premise) as it is to use through a web based interface running in Windows Azure. |
At PDC Eric Smith and Chuck Lenzmeier provided us this view. Half the picture is automated. The deployment and operating of the SQL Azure database is fully automated. |
See How to teach cloud computing – The Windows Azure Platform – Step 3 for continuation