SwitchUpCB responded to "While the cursing isn’t professional it is humorous…" on Medium.
Brandon Bernard Commented
While the cursing isn’t professional it is humorous…
But two things are left very unclear…how is one services need for data/results of another service a circular dependency? That’s like saying a function with input and output f(x) is a circular dependency…. And even if that is explained, there is not real solution provided?
And at the end it touches on the database but the reader is still left very confused on how or why the single database per service recommendation is being followed? Or is it being ignored? And while I can see how one might argue that a DB can be it’s own service (even with a contractual API via Stored Procs or something)…but should it be thought of that way now? Should it? (sarcasm).
SwitchUpCB Response
"""
My articles with cursing perform better than their professional versions.
XD
As for your question, the idea isn't that a service can't depend on one other service, but that it shouldn't depend on a service that also depends on itself. So it's like having a function with input f(x) that invokes y(x), which invokes f(x). So on and so forth until stack overflow.
The solution is similar to how we manage dependencies within a single program. However, instead of the programming language making sure that you don't use an import that ends up importing itself, you should use a (container) orchestrator such as Kubernetes or Nomad with your services.
If you are saying that a container orchestrator won't prevent circular dependencies, you are correct. It won't. That's why microservices is hard and most people don't need them.
"""
Links
- [[🌐-cajuncoding.medium.com-while-the-cursing-isnt-professional-it-is-humorous-but-two-things-are-left-very-unclear-how-is-63]]
- [[🌐-switchupcb.medium.com-my-articles-with-cursing-perform-better-than-their-professional-versions-ce45e7ab280c]]