WEB SERVICE vs API vs MICROSERVICE
WEB SERVICE-:
A web service is any piece of software that makes itself available over the internet and uses a standardized XML messaging system. XML is used to encode all communications to a web service. For example, a client invokes a web service by sending an XML message, then waits for a corresponding XML response.
REFRENCE -:
https://medium.com/koderlabs/introduction-to-monolithic-architecture-and-microservices-architecture-b211a5955c63
Monothilic -:
Despite having different components/modules/services, the application is built and deployed as one Application for all platforms (i.e. desktop, mobile and tablet) using RDBMS as a data source
Microservice-:
Microservices are an approach to application development in which a large application is built as a suite of modular services (i.e. loosely coupled modules/components). Each module supports a specific business goal and uses a simple, well-defined interface to communicate with other sets of services.
Instead of sharing a single database as in Monolithic application, each microservice has its own database. A service can use a type of database that is best suited to its needs.
Example-:
Authorization Service — Responsible for authorizing customer.
- Order Service — takes an order and process it.
- Catalog Service — Manage products and check products inventory.
- Cart Service — Manage user cart, this service can utilize Catalog service as a data source.
- Payment Service — Manage and Authorize payments.
- Shipping Service — Ships ordered products.
one more example HNDA
different app(code repo) for admin
different app(code repo) for user interface (student and instructor)
different app(code repo) for backend (common fo admin and user )
Conclusion
Well, both approaches have their pros and cons, but it depends on each scenario or product/project requirements and which tradeoff you choose. As monolithic approach best suits for lightweight applications It is recommended to adopt Monolithic approach first and depending on the needs/requirement gradually shift towards Microservices approach.


Comments
Post a Comment