DEV Community

Cover image for SaaS architecture: Monolithic and Microservices
Hamza Siddiq
Hamza Siddiq

Posted on • Updated on

SaaS architecture: Monolithic and Microservices

What is a web application architecture?

Application Architecture:
An application architecture is the behavior of how different applications interact with each other.
Screen Shot 2021-08-09 at 5.26.06 PM

Software as a Service Architecture:
So with software as a service, it is the behavior of how different web applications interact with each other.

The architecture here also encompasses, the interaction between applications, middleware systems, and database.

large-3

What are the types of SaaS Architectures?

We want to increase efficiency, and so we want to choose an architecture that ensures all our web applications work well with each other. There are thus two architecture types that we can choose, which we'll go over below.

Modules:
But before we do that you need to understand that an application has different components or modules that define it. E.g an an Ecommerce application might have a modules that takes an order, another one to check inventory, another to authorize payment and finally a module to ship the order.
modular-web-design-pages

1. Monolithic Architecture:
In a monolithic architecture, the application modules are build together, and deployed as a single unit.

So in the Ecommerce application example, the developer would build the modules together, and they are linked to each other in such a way, that if we make changes in one part of the application, another part could also change, because of a shared database. So while working on an Ecommerce application, making changes in the module to check inventory would affect the module to authorize payment since they are a single unit.

microservices-and-monolithic-architectures

2. Micoservice Architecture:
In a micro-service architecture, the applications modules are built separately, and then connected to each other.

So with the modules that we had discussed before; each of these modules get built separately, and has their own database. Each of these modules then connect to the other modules. In the Ecommerce application, the module to take an order would get built separately, and the module to check inventory would get built separately. They would then be connected to each other. This way we could work on them independently, and not worry about changes in one module of an application affecting changes in another.

cda4db94-ac16-43ba-82c4-53632154afc7

Which architecture to choose?

Why you should choose Monolithic Architecture

1. Faster to debug and test:
Since a monolithic application is a single application, building and testing it is easier, and faster.
Screen Shot 2021-08-09 at 5.15.05 PM
2.Simple to develop:
Monolithic architecture is the older way of developing web applications, and so many developers might feel more comfortable using it.Developer
3.Simple to deploy:
With a monolithic application you don't have to worry about a lot of files, there is usually just one file or directory.
1*HTP6u-llOnFya0VvhQ-pHw

Why you should choose Microservice Architecture
1. Work better in groups:
The best thing about Microservice architecture are independent modules. You can take a part of the application, and make it a module with an independent database. This way you can work on that module and changes made there would not affect changes in another part of the application. This is great if multiple people are working on different modules, since they would not have to worry about their code affecting that of a different developer.
0*MJ2qIjrP4q56_2h-

2. Flexibility to choose technology:
Another great thing about Microservice architecture is that for each module, a different technology can be used, depending upon the comfort of a developer working on a module, and the needs of the project.full_front_back

3. Time effective:
Since each developer is only worried about their own module, without breaking other parts of an application, development teams can work way faster.
time-management-how-to-create-a-schedule-header@2x

4.Cost effective:
Each module can be scaled independently, which could save a lot of money.1*HmFudfdeSdweh7dzeRQnbQ

And here is a video where I explain the concepts above:
Youtube video

Top comments (0)