Thursday, July 28, 2011

Windows Azure Design Patterns, Part 1: Architectural Symbols

Today I am beginning a new article series on Windows Azure design patterns, which has been an interest of mine since Windows Azure debuted in 2008. Design patterns are usually expressed in a design pattern language which may also be accompanied by a symbology. In this first article we’ll describe the symbology we’ll be using in this series to represent Windows Azure design patterns in architectural diagrams, also used on my AzureDesignPatterns.com web site and in my upcoming book, The Windows Azure Handbook, Volume 2: Architecture.

We’ll explain the symbology progressively, but let’s start with an example to give you an idea of what we’re talking about. This diagram shows a hosted service with a web role and a worker role that uses a SQL Azure database. Now let’s take a look at the basic elements of the symbology, and by the end of the article we’ll look at a more complex example.

A symbology is warranted because Windows Azure brings a number of concepts, artifacts, terms, and patterns that aren’t in our traditional vocabulary of enterprise architecture diagramming. Some good goals for a symbology are these:

1. Symbols should be simple enough they can be easily drawn by hand legibly on a whiteboard.
2. Symbols should be available to use in productivity tools such as Visio or PowerPoint.
3. Symbols should mesh well with established diagram conventions and traditional symbols.
4. Symbols should serve several levels of granularity, from high-level views down to detailed.
5. Pattern categories such as compute or data should be easy to pick out. We can use color for this. While we shouldn’t depend on color exclusively to communicate (it isn’t always available, and some people are color-blind), it is nevertheless very effective for reinforcement.

Service and Project Symbols
At a very high level, we might just want to reference we are using a particular service:
If we’re focusing on deployment details, showing the management projects (hosted service project, , storage account, AppFabric namespace) may be necessary. Use these file folder-derived symbols for that.
Compute Symbols
Windows Azure Compute gets a lot of attention in architectural diagrams. The service model is pattern-rich, and the other platform services often play a supporting role to hosted services. We’ll color-code compute symbols green. A hosted service consists of one or more roles, each of which contains instances. We can show a role like this, indicating the number of instances in the upper right--in this case 2 or more to maintain high availability--and show the minimum number of instances with discrete symbols. For each instance we have a symbol reflecting what is running in the role, and below it the VM size.
If our diagram is complex or we are short on space, we can condense the above notation to this:
We can use different instance symbols to distinguish a web role from a worker role from a VM role.
Web roles can host web sites (accessed by people) as well as web services (accessed by programs). It’s useful in architectural diagrams to make this distinction even though it makes no difference to Windows Azure. We can use a circle symbol for web sites and a triangular symbol for web services. When a web site and a web service are combined in a single web role, which is common in ASP.NET-WCF projects, we can superimpose the two.
Roles may have endpoints. We can show an input (public) endpoint with a load balancer like this. We also want to show our clients, which might be interactive users or programmatic clients. As we start to show the larger solution it becomes important to mark the data center boundary so it’s clear what is and isn’t in the cloud.
Storage Symbols
We’ll color code data patterns blue. Starting with blob storage, we can show a blob, multiple blobs, or a container of blobs like this. We might also want to relate storage artifacts to a storage account.
If we want more granularity, we can expand to this notation where we can show the count and/or size of blobs in a container, separated into categories. The example below shows the count of image, video, and XML blobs in a container named “media” whose total size is about 20GB.
Queues and messages can be shown in a similar way, with simple representations
or with expanded detail. This shows an order queue whose message payloads come in two types, web orders and phone orders.
Finally, we can take the same approach with table storage: simple representations
or expanded detail, which shows a table’s entity properties, partition key, and row key.
Relational Data Symbols
Keeping with our blue color-coding for data, these symbols represent SQL Azure relational database tables, databases, and virtual database servers.
To show the tables a database contains, we can go to this expanded notation. Alternatively, you can use an established data dictionary notation of your preference.
For SQL Azure reporting, we have these symbols to represent a report definition and a report endpoint.
For SQL Azure Data Sync, we need symbols for a sync group and to show that a database has a 1-way or 2-way sync connection.
We can show OData endpoints for the SQL Azure OData Service or a DataMarket subscription like this:
Communication & Networking Symbols
Communication and networking patterns are color-coded red. The AppFabric Service Bus symbols include service bus connection, service bus queue, message, message buffer, and service namespace.
For Windows Azure Connect virtual networks there are symbols for a virtual network, for a role group member, and for a machine group member.
Security Symbols
For security, we need symbols for the key actors: identity providers (IPs), relying party applications (RPs), and various directories (such as AD) and security token services (STSs)--including some well-known STSs such as the Access Control Service and ADFS. Security symbols are color-coded purple-gray.
To show that a communication channel or a data store is secure, we can annotate it with a lock symbol.

Combining these symbols, here’s how we can show an application (RP) accessing domain identity via ADFS. The Windows Azure web role is the relying party. The user is redirected to ADFS for an AD domain sign-in and upon valid authentication is redirected back to the cloud application with a security token.
A Software-as-a-Service Example
Let’s put all of this together and show what a moderately complex solution looks like using this symbology. Below you see Onboarded.com, a Windows Azure-hosted SaaS solution. This is a single deployment in the cloud that serves multiple corporate clients, with separate databases and Active Directory integration for each tenant. A “T” marks the areas of the diagram that are unique to each tenant.
Hopefully this diagram is easy and intuitive to digest at this point. In the cloud we have a web role and a worker role, both of which make use of Windows Azure storage, SQL Azure databases, and the AppFabric Service Bus (each with tenant-specific resources). The web role contains both a web site and a web service. Both corporate and field users can access this solution, signing in with their domain credentials which are verified through a Service Bus connection to an on-premise AD integration service.

You can download the icons here. Note, this is a work in progress so you can expect the set to grow and see refinement over time. You can use them freely, but I'd appreciate a reference to me, my Windows Azure book series, or my AzureDesignPatterns.com web site.

In our next installment, we’ll start to look at individual patterns topically, starting with compute.

Tuesday, July 12, 2011

Introducing the Windows Azure Cost Modeler

I’m pleased to introduce the Windows Azure Cost Modeler, a free online tool from Neudesic for estimating Windows Azure operational costs that can handle advanced scenarios.

Why another pricing calculator, when we already have several? There’s Microsoft’s new Windows Azure Pricing Calculator (nicely done), the Windows Azure TCO Calculator, and Neudesic’s original Azure ROI Calculator. These tools are great but they focus on the every-month-is-the-same scenario; unless your load will be constant month after month you’ll find yourself having to make some of the calculations yourself.

With the cost modeler, you can easily explore fluctuating-load scenarios such as these:
• Seasonal businesses that run a larger configuration during their busy season
• On-off processing where solutions are not constantly deployed year-round
• Configurations that increase or decrease over time to match projected changes in load
• Hosted services that are not deployed every day of the month (such as weekdays only)

The Windows Azure Cost Modeler user interface is shown above. It includes a standard pricing calculator (middle section). It can track multiple configurations, represented as color-colored profile cards (top). Profile cards can be arranged in a storyboard sequence to define a timeline (bottom), one for each month. What we’ve strived for is flexibility in modeling while keeping the interface simple.

Profiles
A profile is a monthly pricing configuration that you can assign a name and color to. Profiles are arranged at the top of the tool. The pricing calculator shows the details of the currently selected profile and allows you to make changes.

Buttons at the top right of the pricing calculator allow you to clear the current profile (resetting its inputs to 0), create a new profile, remove the current profile, or remove all profiles.

Pricing Calculator
The pricing calculator has similar inputs to the other Windows Azure pricing calculators and includes all platform services which have been commercially released, including Windows Azure Compute, Windows Azure Storage, Content Delivery Network, SQL Azure Database, AppFabric Access Control Service, AppFabric Caching, and AppFabric Service Bus. You can specify values using the sliders or you can directly edit the numbers.

In the Windows Azure Compute area of the calculator you specify the number of instances you want for each VM size. There is also an input for the number of hours deployed per month, which is handy if you don’t deploy your compute instances for every hour of the month. For example, if you only require your instances to be deployed for the first day of the month you would set hours/month to 24.

The Windows Azure Storage & CDN area is where you specify data size and number of transactions for Windows Azure Storage. If you’re using the Content Delivery Network, also estimate your data transfers.

For SQL Azure Database, select the number of databases for each of the available sizes.

In the Data Transfer area, specify the amount of egress (outbound data transfers). There is no input for ingress because inbound data transfers are now free in Windows Azure.

The AppFabric area is where you specify consumption of AppFabric Services. For Access Control Service, enter the number of transactions. For Caching, choose one of the six available cache sizes. For Service Bus, define the number of connections. The Service Bus price calculation will automatically select the best combination of connection packs.

The Estimated Charges panel shows the charges, itemized by service and totaled, with monthly and annual columns. By default amounts are rounded up to the nearest dollar; if you prefer to see the full amounts including cents, clear the “Round up to nearest dollar” checkbox.

At the top left of the Estimated Charges panel is a U.S. flag, indicating the rates are for North America and calculations are shown in U.S. dollars. The tool does not yet support other currencies, nor the slightly different rates in Asian data centers, but this is coming.

At the top right of the Estimate Charges panel is a help button, which will display the rates and also offer to send you to Azure.com to verify the rate information is still current.

Timeline
Once you’ve defined your profiles you can add them to the timeline at bottom. To add a profile to the timeline, select the profile you want and click the Add to Timeline button. The profile card appears in the timeline.

If you’ve added a profile card one or more times to the timeline and then need to make changes to the original profile, you can update the profiles in the timeline by clicking the Apply button at the top of the pricing calculator.

To remove a card, click the Remove button at the top right of the timeline. The selected card will be deleted. To remove all cards, click the Remove All button.

Scenario Examples
Here a few examples of how you can model scenarios in cost modeler.

Example: Ramping Up
In this scenario, a business wants to model their first year of Windows Azure costs. They will use a free trial offer for one month, then work on a Proof-of-Concept for two months, and then go into production. In the modeler, we create 3 profiles named Free, POC, and Production and add 1-Free, 2-POC, and 9-Production cards to the timeline to model Year 1 operational expenses.

Example: Seasonal Business
In this scenario, a tax preparation service has a very seasonal business where March-May are the busy season where a lot of computing power is needed and the rest of the year is the off season where very little compute power is needed. In the modeler, we create a Peak and Off Peak profile and arrange them in the timeline to show the year has 2-Off Peak, 3-On Peak, and 7-Off Peak.

Example: End of Month Bursting
In this scenario, a solution runs in the cloud only on the last day of each month to perform month-end batch processing and reporting tasks. If it is also the end of the quarter another day is needed to run end-of-quarter processing. If it is also the end of the year a third day is needed to run end-of-year processing.

We can define 3 profiles, one each for end of month (1 day of processing), end of quarter (2 days of processing), and end of year (3 days of processing). The correct profile for each calendar month is then very easy to assign: each quarter repeats the sequence EndMonth +EndMonth +EndQuarter except the final quarter which is EndMonth + EndMonth + EndYear.

Summary
We hope you find Windows Azure Cost Modeler (http://azurecostmodeler.com) and Neudesic’s other tools and services helpful. If you have any feedback about how we can improve our offerings, please contact me through this blog.

For a deeper analysis of whether Windows Azure makes sense for you, I urge you to take advantage of a Cloud Computing Assessment.

Friday, July 1, 2011

Announcing Free Ingress for all Windows Azure Customers starting July 1st, 2011

Microsoft has announced a change in Windows Azure pricing--inbound communication is now free! In the past, Microsoft has sometimes waived ingress charges during off-peak times, but this is now the case all the time. For those with large amounts of uploading to do, this is welcome news.

"Today we’re pleased to announce a change in pricing for the Windows Azure platform that will provide significant cost savings for customers whose cloud applications experience substantial inbound traffic, and customers interested in migrating large quantities of existing data to the cloud. For billing periods that begin on or after July 1, 2011, all inbound data transfers for both peak and off-peak times will be free."

Read the announcement