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.
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.
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.
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.
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.
1. Faster to debug and test:
Since a monolithic application is a single application, building and testing it is easier, and faster.
2.Simple to develop:
Monolithic architecture is the older way of developing web applications, and so many developers might feel more comfortable using it.
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.
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.
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.
And here is a video where I explain the concepts above: