CS 530 - Advanced Software Engineering

Cloud-Based Software

Reference: Sommerville, Engineering Software Products, Chapter 5

 

The cloud

The cloud is made up of very large number of remote servers that are offered for rent by companies that own these servers. Cloud-based servers are 'virtual servers', which means that they are implemented in software rather than hardware. You can rent as many servers as you need, run your software on these servers and make them available to your customers. Your customers can access these servers from their own computers or other networked devices such as a tablet or a TV. Cloud servers can be started up and shut down as demand changes. You may rent a server and install your own software, or you may pay for access to software products that are available on the cloud.

Cloud infrastructure characteristics:

Benefits of using the cloud for software development:

Virtualization and containers

A virtual server runs on an underlying physical computer and is made up of an operating system plus a set of software packages that provide the server functionality required. A virtual server is a stand-alone system that can run on any hardware in the cloud. This 'run anywhere' characteristic is possible because the virtual server has no external dependencies. Virtual machines (VMs), running on physical server hardware, can be used to implement virtual servers. A hypervisor provides hardware emulation that simulates the operation of the underlying hardware. If you use a virtual machine to implement virtual servers, you have exactly the same hardware platform as a physical server.

If you are running a cloud-based system with many instances of applications or services, these all use the same operating system, you can use a simpler virtualization technology called containers. Using containers accelerates the process of deploying virtual servers on the cloud. Containers are usually megabytes in size whereas VMs are gigabytes. Containers can be started and shut down in a few seconds rather than the few minutes required for a VM. Containers are an operating system virtualization technology that allows independent servers to share a single operating system. They are particularly useful for providing isolated application services where each user sees their own version of an application.

Containers were developed by Google around 2007 but containers became a mainstream technology around 2015. An open-source project called Docker provided a standard means of container management that is fast and easy to use. Docker is a container management system that allows users to define the software to be included in a container as a Docker image. It also includes a run-time system that can create and manage containers using these Docker images.

Docker images are directories that can be archived, shared and run on different Docker hosts. Everything that's needed to run a software system - binaries, libraries, system tools, etc. is included in the directory. A Docker image is a base layer, usually taken from the Docker registry, with your own software and data added as a layer on top of this. The layered model means that updating Docker applications is fast and efficient. Each update to the filesystem is a layer on top of the existing system. To change an application, all you have to do is to ship the changes that you have made to its image, often just a small number of files.

Benefits of containers:

Software as a service

The idea of a service that is rented rather than owned is fundamental to cloud computing.

Increasingly, software products are being delivered as a service, rather than installed on the buyer's computers. If you deliver your software product as a service, you run the software on your servers, which you may rent from a cloud provider. Customers don't have to install software and they access the remote system through a web browser or dedicated mobile app. The payment model for software as a service is usually a subscription model. Users pay a monthly fee to use the software rather than buy it outright.

SaaS design issues

Cloud software architecture

The scalability of a system reflects its ability to adapt automatically to changes in the load on that system. The resilience of a system reflects its ability to continue to deliver critical services in the event of system failure or malicious system use. You achieve scalability in a system by making it possible to add new virtual servers (scaling-out) or increase the power of a system server (scaling-up) in response to increasing load. In cloud-based systems, scaling-out rather than scaling-up is the normal approach used. Your software has to be organized so that individual software components can be replicated and run in parallel. To achieve resilience, you need to be able to restart your software quickly after a hardware or software failure.

An object-oriented approach to software engineering has been that been extensively used for the development of client-server systems built around a shared database. The system itself is, logically, a monolithic system with distribution across multiple servers running large software components. The traditional multi-tier client server architecture is based on this distributed system model. The alternative to a monolithic approach to software organization is a service-oriented approach where the system is decomposed into fine-grain, stateless services. Because it is stateless, each service is independent and can be replicated, distributed and migrated from one server to another. The service-oriented approach is particularly suitable for cloud-based software, with services deployed in containers.

Cloud platforms include general-purpose clouds such as Amazon Web Services or lesser known platforms oriented around a specific application, such as the SAP Cloud Platform. There are also smaller national providers that provide more limited services but who may be more willing to adapt their services to the needs of different customers. There is no 'best' platform and you should choose a cloud provider based on your background and experience, the type of product that you are developing and the expectations of your customers. You need to consider both technical issues and business issues when choosing a cloud platform for your product.

Useful links