Share via


1 – The Tailspin Scenario

patterns & practices Developer Center

On this page: Download:
The Tailspin Company | Tailspin’s Strategy | The Surveys Application | Tailspin’s Goals and Concerns | The Surveys Application Architecture | More Information Download code samples
Download PDF

This chapter introduces a fictitious company named Tailspin. It describes Tailspin’s plans to launch a new online service named Surveys that will enable other companies or individuals to conduct their own online surveys. The chapter also describes why Tailspin wants to host its survey application on Windows Azure. As with any company considering this process, there are many issues to consider and challenges to be met, particularly because this is the first time Tailspin is using the cloud. The chapters that follow this one show how Tailspin architected and built its survey application to run on Windows Azure.

The Tailspin Company

Tailspin is a startup ISV company of approximately 20 employees that specializes in developing solutions using Microsoft technologies. The developers at Tailspin are knowledgeable about various Microsoft products and technologies, including the .NET Framework, ASP.NET MVC, SQL Server, and Visual Studio. These developers are aware of Windows Azure but have not yet developed any complete applications for the platform.

The Surveys application is the first of several innovative online services that Tailspin wants to take to market. As a startup, Tailspin wants to develop and launch these services with a minimal investment in hardware and IT personnel. Tailspin hopes that some of these services will grow rapidly, and the company wants to have the ability to respond quickly to increasing demand. Similarly, it fully expects some of these services to fail, and it does not want to be left with redundant hardware on its hands.

Tailspin’s Strategy

Tailspin is an innovative and agile organization, well placed to exploit new technologies and the business opportunities offered by the cloud. As a startup, Tailspin is willing to take risks and use new technologies when it implements applications. Tailspin’s plan is to embrace the cloud and gain a competitive advantage as an early adopter. It hopes to rapidly gain some experience, and then quickly expand on what it has learned. This strategy can be described as “try, fail fast, learn, and then try again.” Tailspin has decided to start with the Surveys application as its first cloud-based service offering.

The Surveys Application

The Surveys application enables Tailspin’s customers to design a survey, publish the survey, and collect the results of the survey for analysis. A survey is a collection of questions, each of which can be one of several types such as multiple-choice, numeric range, or free text. Customers begin by creating a subscription with the Surveys service, which they use to manage their surveys and to apply branding by using styles and logo images.

Customers can also select a geographic region for their account, so that they can host their surveys as close as possible to the survey audience. In addition, Tailspin enables premium customers to add custom fields to surveys for integration with the customers’ own systems. The Surveys application allows users to try out the application for free, and to sign up for one of several different packages that offer different collections of services for a monthly fee.

Figure 1 illustrates the Surveys application and highlights the three different groups of users who interact with application. All three websites interact with the core services that comprise the Surveys application and provide access to the application’s data storage.

Figure 1 - The Surveys application

Figure 1

The Surveys application

Customers who sign up and become subscribers to the Surveys service (or who are using a free trial) access the Subscriber website that enables them to design their own surveys, apply branding and customization, and collect and analyze the survey results. Depending on the package they select, they have access to different levels of functionality within the Surveys application. Tailspin expects its subscribers to be of various sizes and from all over the world; and they can select a geographic region for their account and surveys.

Hh534482.note(en-us,PandP.10).gifBharath Says:
Bharath
                In the world of Software as a Service (SaaS), subscribers are commonly known as “tenants.” We commonly refer to applications like Tailspin Surveys as “multi-tenant” applications. When we talk about Tailspin’s “customers” we are referring to the subscribers or tenants, and we use this terminology throughout most of this guide.</td>

Tailspin wants to design the service in such a way that most of the administrative and configuration tasks are “self-service” and performed by the subscriber with minimal intervention by Tailspin staff.

The public website enables the people participating in the survey to complete their responses to the survey questions. The survey creator will inform their survey audience of the URL to visit to complete the survey.

The Tailspin website enables staff at Tailspin to manage the application and manage the subscriber accounts. Note that this website is not included in the example application you will see discussed in this guide, which focuses on the public and the subscriber website functionality.

Note

For information about building a Windows Phone 7 client application for the Tailspin Surveys application, see “Developing an Advanced Windows Phone 7.5 App that Connects to the Cloud.

Tailspin’s Goals and Concerns

Tailspin faces several challenges, both as an organization and with the Surveys application in particular. First, subscribers might want to create surveys associated with a product launch or a marketing campaign, or the surveys might be seasonal—perhaps associated with a holiday period. Often, subscribers who use the Surveys application will want to set up these surveys with a very short lead-time. Surveys will usually run for a fixed, short period of time but may have a large number of respondents.

This means that usage of the Surveys application will tend to spike and Tailspin will have very little warning of when these spikes will occur. Tailspin wants to be able to offer the Surveys application to subscribers around the world, and because of the nature of the Surveys application with sudden spikes in demand, it wants to be able to quickly expand or contract its infrastructure in different geographical locations. It doesn’t want to purchase and manage its own hardware, or maintain sufficient capacity to meet peak demand. Neither does Tailspin want to sign long-term contracts with hosting providers for capacity that it will use for only part of the time.

Hh534482.note(en-us,PandP.10).gifBharath Says:
Bharath
                Resource elasticity and geo-distribution are key properties of Windows Azure.</td>

Tailspin wants to be able to maintain its competitive advantage by rapidly rolling out new features for existing services, or gain competitive advantage by being first to market with new products and services.

With the Surveys application, Tailspin wants to offer its subscribers a reliable, customizable, and flexible service for creating and conducting online surveys. It must provide its subscribers with the ability to create surveys using a range of question types, and the ability to brand the surveys using corporate logos and color schemes.

Tailspin wants to be able to offer different packages (at different prices) to subscribers, based on each subscriber’s specific requirements. Tailspin wants to offer its larger subscribers the ability to integrate the Surveys application into that subscriber’s own infrastructure. For example, integration with the subscriber’s own identity infrastructure could provide single sign-on (SSO), or enable multiple users to manage surveys or access billing information. Integration with the subscriber’s own business intelligence (BI) systems could provide for a more sophisticated analysis of survey results. For small subscribers who don’t need, or can’t use, the sophisticated integration features, a basic package might include an authentication system. The range of available packages should also include a free trial to enable subscribers to try the Surveys application before they purchase a subscription.

The subscriber and public websites also have different scalability requirements. It is likely that thousands of users might complete a survey, but only a handful of users from each subscriber will edit existing surveys or create new surveys. Tailspin wants to optimize the resources for each of these scenarios.

The Tailspin business model is to charge subscribers a monthly fee for a service such as the Surveys application and, because of the global market they are operating in, Tailspin wants its prices to be competitive. Tailspin must then pay the actual costs of running the application, so in order to maintain its profit margin Tailspin must tightly control the running costs of the services it offers to subscribers.

Note

In this scenario, Tailspin’s customers (the subscribers) are not Windows Azure customers. Subscribers pay Tailspin, who in turn pays Microsoft for the subscribers’ use of Windows Azure services.

Tailspin wants to ensure that subscribers’ data is kept safe. For example, a subscriber’s data must be private to that subscriber, there must be multiple physical copies of the survey data, and subscribers should not be able to lose data by accidently deleting a survey. In addition, all existing survey data must be preserved whenever Tailspin updates the application.

Finally, Tailspin would like to be able to leverage the existing skills of its developers to build the Surveys application, and minimize any necessary retraining.

The Surveys Application Architecture

To achieve the goals of the Surveys application, Tailspin decided to implement the application as a cloud-based service using Windows Azure. Figure 2 shows a high-level view of this architecture.

Figure 2 - The Surveys application architecture

Figure 2

The Surveys application architecture

The architecture of the Surveys application is straightforward, and one that many other Windows Azure applications use. The core of the application uses Windows Azure web roles, worker roles, and storage. Figure 2 shows the three groups of users who access the application: the application owner, the public, and the subscribers to the Surveys service (in this example, the tenants Adatum and Fabrikam). It also highlights how the application uses Windows Azure SQL Database to provide a mechanism for subscribers to dump their survey results into a relational database so that they can analyze the results in detail.

This guide discusses how Tailspin designed and implemented the Surveys application as a multi-tenant application. It addresses common multi-tenant challenges such as partitioning, extensibility, provisioning, testability, and customization. For example, the guide describes how Tailspin handles the integration of the application’s authentication mechanism with a subscriber’s own security infrastructure by using a “federated identity with multiple partners” model. The guide also covers the reasoning behind the decision to use a hybrid data model that comprises both Windows Azure storage and Windows Azure SQL Database.

Other topics covered in this guide include how the application uses Windows Azure Caching to ensure the responsiveness of the public website for survey respondents, how the application automates the on-boarding and provisioning process, how the application leverages the Windows Azure geographic location feature, and the subscriber billing model that Tailspin adopted for the Surveys application.

Tailspin will build the application using Visual Studio, ASP.NET MVC, and the .NET Framework. The following table will help you to identify the areas of the guide that correspond to the various features of the application and the Windows Azure services it uses.

Chapter

Topic Areas

Relevant Technologies

2 – “Hosting a Multi-Tenant Application on Windows Azure”

Choosing a single or multi-tenant architecture.

Considerations for stability, scalability, authentication and authorization, ALM, SLAs, monitoring, code partitioning, billing, and customization.


3 – “Choosing a Multi-Tenant Data Architecture”

Considerations for Windows Azure storage, SQL Server, and SQL Database.

Using SQL Federations.

Data partitioning strategies.

Data architecture, extensibility, and scalability.

Displaying data in the UI.

Windows Azure storage tables and blobs.

Microsoft SQL Server.

Windows Azure SQL Database.



4 – “Partitioning Multi-Tenant Applications”

Partitioning queues and worker roles.

Prioritizing some tenants.

Accessing the web roles as a tenant.

Session management.

Windows Azure web and worker roles.

Windows Azure storage queues.

ASP.NET MVC.

5 – “Maximizing Availability, Scalability, and Elasticity”

Geo-location and routing.

The delayed write pattern.

Background processes.

Caching static data.

Auto scaling role instances.

Windows Azure worker roles.

Windows Azure storage queues.

Windows Azure Caching.

Windows Azure Traffic Manager.

Enterprise Library Integration Pack for Windows Azure.

6 – “Securing Multi-Tenant Applications”

Authentication and authorization strategies.

Protecting sensitive data.

Protecting session tokens.

Windows Identity Framework.

Claims-based authentication and authorization.

Windows Azure Active Directory.

7 – “Managing and Monitoring Multi-Tenant Applications”

Application lifecycle management, including testing, monitoring, and managing the application.

Automated provisioning and trial subscriptions.

Per tenant customization.

Billing subscribers.

Windows Azure diagnostics.

Windows Azure PowerShell Cmdlets.

Windows Azure Endpoint Protection.

More Information

Overview of Windows Azure features.

Data Storage Offerings on the Windows Azure Platform.

Introducing Windows Azure provides a list of features and services.

For information about building a Windows Phone 7 client application for the Tailspin Surveys application, see the guide “Developing an Advanced Windows Phone 7.5 App that Connects to the Cloud.

The guide “Moving Applications to the Cloud” explores techniques for migrating existing applications to Windows Azure.

The guide “Building Hybrid Applications in the Cloud” describes the scenarios for and usage of many Windows Azure features.

Next Topic | Previous Topic | Home | Community