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.
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:
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.
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::
Adopting a serverless approach for building web or mobile applications present the following benefits:
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