Modern Application Development

The Serverless architecture presents an excellent way to build web apps and mobile applications quickly. It removes the burden of managing the entire infrastructure from your development team and lets them focus on developing the core functionalities required to implement your business logic.

Serverless Mobile and Web Application Development

All modern web or mobile apps are composed of various components, each taking care of a specific set of operations. Some of them are specific to the business logic of the company that develops them. The others cover standard functionalities such as app management, generic server communication, account validation, etc.
For instance, consider the example of an application that helps a company pay its bills. The components of such an app can be broken down into specific and standard parts as given below:

  • Specific services: payees, reporting, administration;
  • Standard features: authentication, registration, payment.

The application activates any components when it receives trigger actions or sends/receives data. These triggers and data exchanges can result from external or internal systems.
Each microservice is an independent combination of components that interacts with other parts only when necessary. For example, when the app requests the authentication of a user account via an API, the authentication microservice gets activated and handles the request.

Differences Between Traditional and Serverless Architecture for Application Development

In the traditional approach, the entire application is built as a single monolith and the development team codes both specific and standard features from scratch. As a result, the application behaves as a single unit handling all requests and responses as part of its functioning.

The application is hosted on servers either on-premise or in the cloud. The IT operations of the company that owns the application will be responsible for the provisioning, maintenance, and security of these servers (physical or virtual). They also have to take care of managing the data storage and security requirements. Thus, the entire cost and the accountability of managing the servers will fall on the company.

A Serverless architecture differs from this traditional approach in many aspects::

  • Hosting: In Serverless, the hosting is entirely managed by the Cloud Service Provider.
  • Coding: In Serverless, the development team doesn't need to write an entire application from scratch. They only develop the unique components that implement their specific business logic. This code is written in a Function that triggers events, notifies other applications, or writes information in the data storage component.
  • Server management: There is no need for server management in the Serverless architecture. Standard components are provided by Cloud Service Providers, moving away from the burden of developing and administering them.

The Benefits of Serverless Architecture for Application Development

Adopting a serverless approach for building web or mobile applications present the following benefits:

  • Improved application performance: The components are executed only on specific trigger action and can provide faster responses, unlike a traditional approach where the single extensive application is running at all times.
  • Reduced Cost of Ownership: The company's provision, maintenance, and patching of servers are offloaded to the Cloud Service Provider, promising a reduction in the application's total cost of ownership.
  • Better scalability: Each component can scale up and down automatically and instantly. The cloud provider's responsibility is to allocate the necessary capacity in case of a spike in usage. On the other hand, the application costs nothing when it doesn't run.
  • Optimized data storage: Data storage is reduced to the minimum required for monitoring and archiving purposes.
  • Faster development: The development team creates new services quicker by only focusing on the business logic and the custom code.
  • Easy deployment of new features: Implementing new services is facilitated because there is no need to stop the application for testing them.

An example: the BBC Website Renovation

The BBC website is a huge web app serving millions of people around the world. It has an extensive repository of content in more than 44 different languages and offers around 200 different types of pages ranging from programs, articles, games to food recipes. They also offer specific services such as iPlayer, Sounds, News, and Sport.

While the BBC website was initially implemented as a single application, meeting the huge traffic demands it gets and all the various types of services provided made it very difficult to manage. And so BBC took the effort to recreate BBC online into adopting advanced technology like Serverless architecture and moving it to the cloud.

This involved:
·      Breaking down of each service into its own component,
·      Removing duplication,
·      And taking a "build first, optimize later" approach.
They made use of the AWS serverless services like Lambda to create the new BBC.
This approachhas proven to bring better performance optimization, scalable app development,and cost reduction on the whole.

More on: https://www.bbc.co.uk/blogs/internet/entries/8673fe2a-e876-45fc-9a5f-203c049c9f9c