Web Services and Microservices
What are Web Services?
Web services provide a way of exposing functionality of the application via API over HTTP. It provides a common format to communicate for systems built in different web frameworks. Depending on the usage they can be oriented around business and consist of multiple services or can be a single monolithic API allowing access to the application.
Generally, they are used to expose application utility to external parties
What are Micro Services?
Microservice is a deployable and scalable unit of the application which is modeled around a business domain. It is essentially a method of breaking large apps into modules and independently handling (deploying and scaling) them. This is essentially done to isolate failures in large applications.
They are oriented around a business domain. For eg. In an e-commerce backend like Amazon, the microservices could be an Account component, Recommendations component, Products Catalog component, Customer Handling component, Billing and Checkout component etc. Generally, they are used to organize components internally.
What is the core difference?
Both web services and microservices conceptually divide the application into multiple services utilizing SOA concepts. The core difference between the two is related to deployment and scaling. While web services are an old concept, microservices are relatively new. Microservices in addition to providing an API like web services also provides isolation from failure and scalability and deployment. This is why it is becoming increasingly popular in larger backends like Amazon where individual microservices can be scaled/deployed/versioned (handled) as per requirement.