Sdílet prostřednictvím


3: The Tailspin Scenario

Retired Content

This content and the technology described is outdated and is no longer being maintained. For more information, see Transient Fault Handling.

patterns & practices Developer Center

On this page:
The Tailspin Company | Tailspin's Strategy | The Surveys Application | Tailspin's Goals and Concerns | The Surveys Application Architecture | More Information

This chapter introduces a fictitious company named Tailspin. It describes Tailspin's plan to use Microsoft Enterprise Library to further develop its flagship online service named Surveys. Surveys is a cloud-based service, hosted on the Microsoft Azure™ technology platform, that enables other companies or individuals to conduct their own online surveys and analyze the results. As with any company planning to update one of its key applications, there are many issues to consider and challenges to meet, particularly because this is the first time the developers at Tailspin have used Enterprise Library. The chapters that follow this one describe the benefits to Tailspin of using Enterprise Library and show, step by step, how Tailspin modified and re-architected the Surveys application to use Enterprise Library.

The Tailspin Company

Tailspin is a startup ISV company of approximately 20 employees that specializes in developing cloud solutions using Microsoft® technologies. The developers at Tailspin are knowledgeable about various Microsoft products and technologies, including Azure, the .NET Framework, ASP.NET MVC, SQL Server®, and Microsoft Visual Studio® development system. These developers are aware of the capabilities of Enterprise Library, but have not yet incorporated it into any of their cloud-based applications.

The Surveys application was the first of several innovative online services that Tailspin took to market. As a startup, Tailspin decided to specialize in cloud-hosted solutions in order to minimize its hardware investments and maximize its ability to reach a global audience. Tailspin hoped that some of these cloud-hosted services would grow rapidly, and the company wanted to have the ability to respond quickly to increasing demand. Similarly, it fully expects some of these cloud-based services to fail, and it does not want to be left with redundant hardware on its hands. The Surveys application has been a major success for Tailspin, with thousands of existing customers around the world, and new customers signing up every day.

Tailspin's Strategy

Tailspin is an innovative and agile organization, well placed to exploit new technologies and the business opportunities offered by the cloud. Tailspin's strategy has been to embrace the cloud and gain a competitive advantage as an early adopter, rapidly gaining some experience, and then quickly expanding on what it has learned. This strategy can be described as "try, fail fast, learn, and then try again." The Surveys application has been a huge commercial success for Tailspin, but its success has revealed some problems with the initial implementation in terms of its flexibility, manageability, and maintainability.

The Surveys Application

The Surveys application enables Tailspin's customers to design a survey, publish it, and collect the results 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 location for their account, so that they can host their surveys as close as possible to the survey audience. 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 (customers, Tailspin administrators, and Surveys participants) who interact with it.

Hh680932.8FE0716EBDD86BF7EC681253001EE9AD(en-us,PandP.50).png

Figure 1

The Surveys application

Customers who have subscribed to the Surveys service (or who are using a free trial) access the Subscriber website, which 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 customers to be of various sizes and from all over the world, and customers can select a geographic location for their account and surveys.

Hh680932.note(en-us,PandP.50).gifBharath Says:
Bharath
                In the world of Software as a Service (SaaS), subscribers are commonly known as "Tenants." We often refer to applications like Tailspin Surveys as "multi-tenant" applications.</td>

Tailspin wants to design the service in such a way that most of the administrative and configuration tasks are "self-service" and can be 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 let their survey audience know what URL to visit to complete the survey.

The Tailspin website enables staff at Tailspin to manage the application and manage the subscriber accounts. All three websites (Subscriber, Public, and Tailspin) interact with the core services that comprise the Surveys application and provide access to the application's data storage.

Tailspin's Goals and Concerns

Tailspin faces several challenges with the current version of the Surveys application. The initial development was done quickly in order to be early to market. This resulted in some compromises during the development process whereby some features were sacrificed, and the design process was tailored to meet tight deadlines, not to optimize maintainability and extensibility. Tailspin sees this next phase in the life of the Surveys application as a consolidation phase that will lay the groundwork for the future development of the application and address the shortcomings of the initial implementation.

Here is how the original application works. First, customers create surveys. These might be associated with product launches or marketing campaigns, or they might be seasonal, perhaps associated with a holiday period. Often, customers who use the survey application set up these surveys with a very short lead time. Surveys usually run for a fixed, short period of time but may have a large number of respondents. This means that the Surveys application experiences bursts of usage, and Tailspin has very little warning of when these bursts occur. Tailspin now offers the Surveys application to customers around the world, and because the nature of the Surveys application includes sudden bursts in demand, it must be able to quickly expand or contract its infrastructure in different geographical locations. Up until now, Tailspin has relied on a process that requires an operator to manually add and remove role instances based on performance data collected from the application or in anticipation of known or planned events. In order to better serve its increasing number of customers and to control its costs, Tailspin would like to automate the scaling process.

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

The subscriber and public websites also have different scalability requirements. 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.

When problems occur in the Surveys application, Tailspin sometimes struggles to resolve them quickly enough to meet its service-level agreements (SLA). Tailspin wants to be able to respond to issues and problems with the Surveys application more effectively by having better diagnostics data that is easily accessible.

Tailspin wants to be able to maintain its competitive advantage by rapidly rolling out new features to existing services or gain competitive advantage by being first to market with new products and services. For the Surveys application, Tailspin wants a platform with a clear, consistent architecture that is easy to extend and enhance.

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 their profit margin Tailspin must tightly control the running costs of the services they offer to their customers.

Note

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

Tailspin wants to ensure that customer's data is kept safe. For example, a customer's data must be private to that customer, there must be multiple physical copies of the survey data, and customers 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.

As the number of subscribers grows, Tailspin wants to improve the resilience of the Surveys application to ensure that it can continue to meet its SLAs. This is particularly important for some of Tailspin's larger customers.

Finally, Tailspin would like to be able to leverage the existing skills of its developers, minimize any retraining necessary to build the Surveys application, and make it easy for developers to leverage the experience they have gained working on the Surveys application in Tailspin's other products.

The Surveys Application Architecture

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

Hh680932.97D837E6A1B8C3F8B55167ADC0FA8983(en-us,PandP.50).png

Figure 2

The Surveys application architecture

The architecture of the Surveys Application is straightforward and one that many other Azure applications use. The core of the application uses 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 subscribers to the Surveys service (in this example, Adatum and Fabrikam). It also highlights how the application uses SQL Azure™ technology platform to provide a mechanism for subscribers to dump their survey results into a relational database to analyze the results in detail.

This guide discusses aspects of the design and implementation in detail and describes how the various web and worker roles that comprise the Surveys application make use of the Enterprise Library application blocks and services.

Some of the specific issues that the guide covers include how Tailspin implemented an autoscaling feature that enables the application to automatically scale up and scale down by adding and removing role instances and how Tailspin improved the resilience of the Surveys application to transient fault conditions.

Tailspin built the Surveys application using the latest available technologies: Visual Studio 2010, ASP.NET MVC 3.0, and .NET Framework 4.

More Information

For information about building a Windows Phone 7 client application for the Tailspin Surveys application, see the book, Windows Phone 7 Developer Guide at https://go.microsoft.com/fwlink/?LinkID=234571**

Next Topic | Previous Topic | Home

Last built: June 7, 2012