user11389375
user11389375

Reputation: 69

Are independent (micro)services a paradox?

Ideas about microservices:

I find this these ideas to be contradictory.

Let me give a hypothetical business scenario.

I need a service that executes a workflow that has a step requiring auto-translation.

My business has an auto-translation service. There is a RESTful API where I can POST a source language, target language and text, and it returns a translation. This is a perfect example of a useful standalone service. It is reusable and completely unaware of its consumers.

Should the workflow service that my business needs leverage this service? If so, then my service has a "dependency" on another service.

If you take this reasoning to the exteme, every service in the world would have every functionality in the world.

Now, I know you're thinking we can break this dependency by moving out of resquestion-response (REST) and into messaging. My service publishes a translation request message. A translation response message is published when the translation is complete and my service consumes this message. Ok, but my service has to freeze the workflow and continue when the message arrives. It's still "waiting" even if the waiting is true async waiting (say the workflow state was persisted and the translation message arrives a day later). This is just a delayed request-response.

Upvotes: 0

Views: 55

Answers (1)

Alex Kurkin
Alex Kurkin

Reputation: 1069

For me personally, "independent" is a quality that applies to multiple dimensions. It may not be independent from runtime perspective, but it can be independent from development, deployment, operations and scalability perspectives.

For example, translation service may be independently developed, deployed, operated by another team. At the same time they can scale translation service independently from your business workflow service according to the demand they get. And you can scale business workflow service according to your own demand (of course downstream dependencies come in play here, but that's a whole another topic)

Upvotes: 1

Related Questions