I want to be able to answer the question, "Do you use microservices?" I have no clue what 'microservices' means in concrete terms. Essentially everything I've read on "What are microservices?" is either a useless pile of terms like 'loosely coupled', 'fine-grained', and 'lightweight', or sounds like it was written by management consultants for business executives and has no real content.
My current understanding is:
- A
monolithic application
is one where everything (except the database) is integrated into a single code base. For example, I wrote a ASP.NET MVC application, with models, views, and controllers. It was a single codebase that ran on top of IIS and connected to MSSQL. - An
API-driven application
is one where the business logic is separated from application logic; an API defines/implements the business logic, and an application interacts with users and executes the business logic by calling the API. For example, I converted my ASP.NET MVC application into A) an API that ran in one container and B) a single-page application (SPA) that ran in a separate container and executed API calls client-side.
At a later point, when I started writing additional applications, each with their own SPA and API, I decided to factor out authentication and authorization into its own API. And then later, I decided to factor out some business logic that was common to each API, but not related to authn/authz, into yet another API. So now each SPA is communicating independently with (at least) three APIs. (Each API is a separate container, and each SPA is a separate container.)
Are these microservices? What are microservices? Each application has a single API, and in most cases I could break these into multiple smaller APIs. So are these monolithic APIs or microservices?