We know that in order to deploy an application, we must have either an application server or a web server. But, we’re now in a new era and this is no longer the case. We can now choose to deploy an application without a server.
This affords tremendous advantages, including speed, reliability, scalability, and simplicity.
Enterprise Platform as a Service and Cloud Computing
Cloud Computing and Platform as a Service (PaaS) has been quite a buzz in the IT market, bringing in players like IBM Bluemix, Amazon Web Services, Microsoft Azure, and Google Cloud. These technologies and services are maturing rapidly and seeing broad adoption in the enterprise space.
The concept of deploying Applications without a server is called “serverless architecture.”
So let’s dive in and see an example of how you can substitute a server with PaaS and still get an application up and running to be accessed by the end-user.
N-Tier Architecture
Let’s start by visualizing N-tier architecture as follows:
Figure 1.1
The N-Tier Layers Defined
These layers can be described as follows:
Data Storage Layer: Your Database or ERP System.
DAO Layer: The API for CRUD (create, read, update, and delete) operations. (REST vs CRUD on Stackexchange)
Integration Layer: Here we expose the APIs created in the DAO layer as a service
Presentation Layer: This has the UI code for the desktop, web, or mobile client.
To Each Application its Own Server
Now that we have the basics of the N-Tier architecture, let’s have a look at traditional application deployment.
This is how it looks in the real-world scenario where we run each and every service on a server.
Figure 2.1
Transitioning the Application from Server to Serverless with AWS
Using AWS as an example, we will substitute the above architecture with the serverless one.
Figure 2.1 is massively simplified into the below diagram (Figure 3.1) in the AWS ecosystem.
Figure 3.1
What happened?
Here we have substituted the DB Layer with service provided by Dynamo DB (NoSQL DB). You can also use any RDBMS DB. This database is not deployed using any server…they are used as services.
Now you can create a Lambda function that will have the rule for your CRUD operations. The APIs created by the Lambda functions will then be exposed as a service by the Amazon “API Gateway.”
This service is then called by the code in the presentation layer to show the required data to the end-user. The code in the presentation layer is kept in the S3 Bucket (this can be thought to be like a bucket where you can store data just like Google Drive).
This brings the application to life without a server and exposes its data as a service.
Conclusion
The information here makes it easy to visualize the simplicity, speed, and scalability of deploying on PaaS. It also highlights why enterprises are rapidly making the transition to serverless architecture on AWS.
If you’d like to read more on the bigger picture, here are some great posts:
- DevOps and Continuous Integration in Action – 7-Minute Video Demo
- How to Transition to DevOps
- 6 Questions with a Leading Microservices Engineer
- How DevOps Improves Quality Assurance
This article was contributed to and written by Iftekhar Khan.
[embedit snippet=”after-article-getresponse”]