Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
5-3-DDAC)
INDIVIDUAL ASSIGNMENT
DESIGNING & DEVLOPING APPLICATIONS ON THE CLOUD
(CT071-3.5-3-DDAC)
ID: TP029908
INTAKE: UC3F1410SE
ACKNOWLEDGEMENT
Firstly, the developer would like to offer his sincere appreciation to the Almighty for allowing him
to reach this far and staying healthy throughout the study period of this subject, DDAC. Secondly,
his lecturer, Dr. Kalai Anand A/L Ratnam for his assistance and supervision since the beginning
of this assignment and introduction to the newly brought up Microsoft Azure Cloud Platform up
to this point of submitting this report. His expertise on the subject of this project has been helpful
and motivating in developing the latter.
The developer would like to extend regards to the entire APU fraternity for allowing students to
access the Microsoft products and get to learn real life based scenarios or problems and how to
provide appropriate solutions in terms of costs savings and efficiency.
It was a great opportunity and exposure for attending different talks and seminars regarding the
Microsoft Azure Cloud Platform. Besides the assignment project it with deeper interest that the
developer feels the need and importance of having such levels of technology and troubleshooting
methods. The developer therefore looks forward to get to learn and implement more solutions,
manage and troubleshoot applications via the cloud platform.
Table of Contents
ACKNOWLEDGEMENT .................................................................................................................................. 2
1.0 Introduction ...................................................................................................................................... 5
2.0 Project Plan............................................................................................................................................. 7
3.0 Design ..................................................................................................................................................... 9
3.1 Cloud Design Process ....................................................................................................................... 10
3.1.1 Repository and Unit of Work Pattern ....................................................................................... 10
3.1.2 Transient Fault Handling Application Block (Retry Pattern) .................................................... 10
3.2 Architectural Diagram ...................................................................................................................... 11
3.3 Design Considerations ...................................................................................................................... 12
3.4 Modelling .......................................................................................................................................... 13
4.0 Implementation.................................................................................................................................... 14
4.1 Publishing Application to Azure....................................................................................................... 14
4.1.1 Azure Booking Service ............................................................................................................... 15
4.1.2 Web Admin ................................................................................................................................ 18
4.1.3 Storage Table, Queue, Blob ...................................................................................................... 21
4.1.4 SQL Database............................................................................................................................. 22
4.2 Application Scaling ........................................................................................................................... 24
4.2.1 Cloud Service ............................................................................................................................. 24
4.2.2 Azure Website ........................................................................................................................... 24
4.3 Testing Cloud Applications ............................................................................................................... 25
4.4 Investigate and Analyze Application (Plan, Collect and Interpret Diagnostics and Instrumental
Data) ....................................................................................................................................................... 25
4.5 Application Development ................................................................................................................ 27
4.5.1 UI Enhancements ...................................................................................................................... 27
4.5.2 Performance Enhancements ..................................................................................................... 27
4.5.3 Azure Active Directory .............................................................................................................. 27
5.0 Deployment Guide ............................................................................................................................... 28
5.1 Connecting Azure Booking Services to Azure Storage and SQL Database ..................................... 28
5.2 Booking ............................................................................................................................................. 28
5.3 Email Notification ............................................................................................................................. 29
6.0 Test Plan & Testing Discussion............................................................................................................. 30
6.1 Booking Test plan ............................................................................................................................. 30
1.0 Introduction
Using the Microsoft’s Azure Cloud Platform, this project together with its documentation has been
developed under the scope of illustrating, designing and considerations to take when developing
web applications and deploying them on the cloud for various reasons. Throughout the project
documentation, details of this project will be further illustrated with appropriate explanations of
both diagram designs, actual project demonstration of the web applications development brought
up and its deployment.
The case study given is based on two of the largest cruise operators in the world, Princess Cruises
and its counterpart Cunard Line. They both carry about 1.5 million passengers annually on about
20 luxury ships. Princess Cruises offers more than 115 cruise itineraries that sail to all seven
continents and call at 350 ports globally. On the other hand, Cunard forces on travel in the Atlantic
Ocean and Mediterranean Sea. Both are owned by Carnival Corporation, which has its
headquarters in Valencia, California.
The customers are to have an option of choosing their own cabin since this was a letdown in the
previous system being used. By outsourcing the IT infrastructure, a platform that will be affordable
and easy to manage has been proposed to be brought up. The platform being proposed here will
not have to contain two data centers separately, instead, through use of Azure account on the cloud,
hosting can be managed easily and across different clients at different times.
According to the plan being brought up for the proposal, the following outlines the requirements
and significant goals expected on the new platform:
Provisioning: The application must be developed and provided under the Microsoft Azure
Platform.
Maintainability: The application must be able to accept upgrades and perform other maintenance
tasks while multiple tenants are using it.
Monitoring: The application must be monitored at all times to ensure no problems arising and if
there is any, identify and troubleshoot them. Each tenant will be monitored how they are using
the application.
Availability: The tenants want the application to be constantly available, perhaps with guarantees
defined in an SLA. The activity of other tenants should not affect the availability of the application.
There is a spike in booking demands at certain times especially during holiday seasons thus
the application should support the extreme fluctuations in its functioning
The application should be able to scale the solution to meet the needs bookings during peak
seasons.
To accelerate set up and deployment of solution.
Manage solutions to keep costs down.
Assurance and reliability through Failover Management.
Segment Tenant Web site Tenants by Host Headers or without SSL communication.
For the execution and collection of customer data while using the solution provided, some
assumptions were considered. For instance, the local database will be held responsible for handling
the customer details when booking transactions are being made. This is to ensure security measures
are considered, under the Finance department.
The users will be able to view different sets of data from the cruise bookings that were done
previously, the number of seats that have already been occupied or booked for a certain cruise as
well as the registrar of the passenger.
The administrative side of the Website will be able to handle the login and registration of users for
the first time accessing the application. This will also enable the administrator to activate or
deactivate one’s account, reset password suppose one forgets his or hers. The admin is also capable
of adding certain users to a particular user groups, to act as back up when administrator is not
available to handle all the other users (customers) accessing the Website.
Upon receiving a booking request, the booking engine will be able to offer the flight requests by
providing for tickets once the payment has been made and confirmed.
3.0 Design
The Carnival Corporation Cruise Website is developed using ASP.NET Web Forms C-sharp (C#).
The development tool used is Visual Studio 2013 (Update 5). The Operating System running the
development tool is Windows 8.1 Professional x64 bit, which later on was upgraded to Windows
10 Pro.
Execute
Retry Policy Action SQL Database
The stability of the application is meant to be given a high priority. For the website to work
continuously with the booking side or engine on the cloud service, the application has to be able
to expect and rectify ‘HTTP’ type of errors.
The steps explained below will show on different ways to handle the transient errors:
Developing a website on ASP.NET platform enables a user friendly URL feature which is issued
by default once one launches a new project. Having a quick user friendly URL enables the
developer work with Route Redirections efficiently, apart from providing good search engine
optimization features on the web application.
In order to simplify the data queries and to also provide an easier way of manipulating search
queries by the use of Language-Integrated Query (LINQ). This eliminates the need to write a
separate store procedure to perform inter-table queries.
Having the Booking engine as part of the application will act as a backend process server that runs
code such as .NET framework. This will not need IIS that is normally used for website publishing.
A “Worker Role” gets rid of the need to have that additional layer of IIS components compared to
the Web Role.
From the use of any database in storing of data, it must be tested on the capacity of data it can
handle at a given time on its operation. For a better testing of the SQL database on Microsoft’s
Azure Cloud Platform, the test data should be done on a real-like world volume on actual running
websites and applications. The Carnival Corporation has a number of cruises booking to handle
on daily basis. Reducing the bottlenecks on the database should cater for ensuring that the database
is able to handle the incoming requests especially during holiday seasons which will be the peak
of bookings done. The response time should not be delayed as the number of users increase when
booking.
Through the Database Initializer provided by the Entity Framework, the developer is to seed data
in to the database whenever the initialization takes place. The database should have the Update
and Add function which will be loading new data in while in use.
3.4 Modelling
A model in this case will refer to the simplified booking and making reservations and overview of
the entire cruise web application. The below diagram shows the relation between the entities;
The model only shows the main interaction between the cruises booked, booking made from the
passenger and confirmation. This is an illustration on what happens while still under the local host.
{} Carnival Cruises
Confirm Booking
Ticket
4.0 Implementation
4.1 Publishing Application to Azure
During the implementation phase, there are two projects that were deployed to Microsoft Azure;
Web administration and its database.
The Azure Management Portal is accessed by using Microsoft Account with an active subscription
which is paid for accordingly. For the first time using, the user is entitled to a free trial version.
Under this account, the developer can access his application, create new ones and deploy others
from different sources (MSDN 2015).
The portal here was used to create and provide a hosting service for the Cloud Services provided
to run the web application.
Through the Visual Studio Tool, the application can be directly uploaded once done. The
developer will deploy by selecting the “Publish” option under “Build”.
Before creation of the project, there is a default Active Directory that exists from the Azure account
management portal once set up. The completion of this set up will provide the domain that is used
as an authentication endpoint for the website.
The settings for Authentication is changed to Organizational Accounts. This is illustrated from the
diagrams below.
The project is the set up to be hosted in the cloud by selecting the wizard option provided under
the “Host in the Cloud” checkbox.
There are options that are to be taken note on; the ‘Region’ where the traffic of the web site will
be located at. Since the developer is based in Malaysia, the region provided here will be
Southeast Asia.
sharing of resources and whenever more than one users are allowed to access the administrative
side for maintenance purposes.
In cases that Azure hosting subscriptions runs out, there is always the virtual machine option that
can allow flexibility in configuring the CPU and memory usage.
To add on, the website can also be configured with an additional monitoring domain to ensure
that it can be accessed from different geographical region(s).
4.5.1 UI Enhancements
Calendar / Date Selector
A jQuery + Bootstrap template that allows easy navigation with flexibility in preselecting dates
A jQuery + Bootstrap template that allows the autocomplete of previously used details such as
emails and usernames or bookings made previously on same account.
5.2 Booking
Figure25: Sample code showing the email notification alert after booking.
The email body is made up of different combined files such as “.htm”, “.txt” and the logo of the
carnival cruises company.
The basic functions of the application that will be tested are as follows:
Google chrome was used to carry out the local test plans.
The URL changes whenever a new page is opened but it still maintains the same format with
different parameters.
The above screenshots shows the auto feature of the website feature “bootstrap” that
automatically adjusts its size depending on the size of the browser or can fit well when using
mobile phone and other smart devices.
To ensure that the email will be working, there should be records in the SQL Database done
through the booking and stored in the Booking table. This table should then point to the Booking
tables that will be linked according to each user selections and respective email addresses.
The functionalities tested under this phase were such as creating new users, edit users, changing
or resetting of passwords, activating or deactivating users.
Provisioning
Microsoft Azure has been set up to provide access to multiple tenants from different applications
that are being hosted on the cloud platform. The application is set to cater for multi-tenancy to
enable this feature. The risks to be faced are also covered when multi-tenancy is activated incase
a part of the website fails.
Maintainability
Through the feature of sharing the application across multiple tenants, the codes in this case are
also shared across different tenants. This shows that the same version of application is being run
by different parties, including when there is an update, it has to be shared across the same too.
Once there is an update to be carried out, the developer or the overall administrator in this case
will have to debug the errors, update and then relaunch to the cloud to ensure safety measures and
minimize chances of the application crashing.
Monitoring
The application will be monitored through integration and insights to the multi-tenancy. Generally,
the Carnival Corporation will set limits on how many booking can be done at a certain time and
considering the storage space provided, maximum limits will monitor until when exceeded, the
administrator will be notified.
Availability
The applications that are hosted through the Azure cloud platform are accessible at any time once
they have been activated online by the developer. This ensures the individual tenants can access
whenever needed and share utilities across different geographical locations. However, depending
on the maximum limit some resources can be used, this might lead to throttling of the storage
capacity provided and queues. The response time can be affected and become slower at times.
Scalability
From the access privileges that has been provided by the Azure account across different tenants
and user groups, the application can be well put into consistent functioning by setting up the
appropriate “application scaling” as explained under chapter 4.
Customizability
The extent to which Azure accounts can be customized to satisfy own needs is limited at the
moment. Once the application has been developed and deployed, adding own codes by the shared
user groups might bring up errors and alter the normal running of the application for other tenants
accessing the same.
7.2 Conclusion
Throughout the development of the solution cruise website application, the entire project has been
successfully completed through combining of different approached in system development and
tools. From the research point of view, designing and developing of applications which will be
hosted on the cloud, comprises of critical considerations. These considerations are both from the
organization’s demands or requirements from the clients and some from the developer’s side; costs,
security, ease of approach and deployment, troubleshooting and end user satisfaction.
Through the use of Microsoft’s Azure Cloud platform in deployment of applications to be hosted
on cloud has many benefits that are easily achieved compared to the previous application hosting
on cloud. The main advantage to be faced here is the breaking down of the whole application into
sub-components that can be uploaded separately into the cloud platform and shared across different
user groups. During the application maintenance or upgrade, this can be done by splitting the
application into two or more instances whereby one can be running while the other one being
upgraded or under maintenance. As the developer will be monitoring the upgrade, the second
instance of the application that is currently running can be monitored to check if the performance
is the same as the one under maintenance.
From the hosting of several applications on the cloud platform, it is critical to observe how the
scaling and monitoring is being set up. Wrong and inappropriate scaling of the applications can
end up increasing the costs being charged and how efficient the application will be delivering its
functions. Lack of satisfaction by the end user or clients will end up having the organization
running at a loss compared to the costs subscribed for the hosting services. This shortcoming can
be addressed by having a proper knowledge on the subject matter as it will lead to make the rightful
choices on what configurations to be made and mode of deployment. The main consideration here
will be saving costs and ensuring efficient application deployment.
Overall working to deliver this project has been a challenging experience at times especially during
troubleshooting whenever unexpected error(s) arising. However, the class tutorials provided by
the lecturer and random consultations from colleague assisted in learning from mistakes too. From
the web application developed for the Carnival Corporation, I have acquired some ideas that the
same project can be modified and extended through merging the same to be a mobile application
for easier portability and wide range of access by end users.
In conclusion of the module itself, I would like to thank my lecturer Dr. Kalai for his efforts in
providing us the Azure accounts with certain amount of paid subscriptions to ensure that the
maximum knowledge out of the entire Azure portal has been gained and extra testing and
management has been done, the tutorial and troubleshooting ideas during the tutorial classes. It is
my utmost expectation to start working more with other cloud hosting services besides the Azure
Cloud platform because with the current rapid changes in technology, most companies and
solutions are provided through the cloud. This is highly driven by the amount of workforce, costs
and physical space saved when using cloud solutions.
8.0 References
Azure Documentation (2014) Get started with Application Insights [Online] Available from:
http://azure.microsoft.com/en-us/documentation/articles/app-insights-getstarted/ [Accessed: 18 July
2015]
Microsoft Developer Network (2014) Connection Resiliency / Retry Logic (EF6 onwards) [Online]
Available from: http://msdn.microsoft.com/en-us/data/dn456835.aspx [Accessed: 10 July 2015]
Scott Guthrie, Mark Simms, Tom Dykstra, Rick Anderson, Mike Wasson (2014) Building Cloud
Apps with Microsoft Azure: Best Practices for DevOps, Data Storage, High Availability, and More
(Developer Reference). Microsoft Press
Tyler Doerksen (2013) Table Storage 2.0 – Queries [Online] Available from:
<http://blog.tylerdoerksen.com/2013/01/03/table-storage-v2-queries/> [Accessed: 12 July 2015]
9.0 Appendix
Appendix A: Username and Password
Web (Local and Individual Account)
Username: momanyi0@hotmail.com
Password: 6623iamwill
URL: https://manage.windowsazure.com/@momanyi0hotmail.onmicrosoft.com
Password: 6623iamwill
Password: Futo0045