0

I have the following problem which I don't know much about. I have a ServiceA that returns customer data on transactions and a ServiceB that has reports, also my environment uses Power BI from Microsoft. This is a more philosophical question, but I'm kind of stuck.

I use a message broker (Azure Service Bus) to communicate between the services. However, it seems to me that this should be used more for commands. This is where I am a bit lost and why I am asking.

  1. My first question is about the actual communication between services. As far as commands are concerned, it's fine to just use the message broker to call a command and it gets executed. But how should the reading be handled? Both ServiceA and ServiceB have some API so I connect it in some API Gateway or aggregator and return? Because I just can't think of any other way to read this data. Then of course the question is whether Http API or Grpc API.

  2. I might answer the second question. Service A saves a new user and I need to refresh the reports in Power BI. Should I call ServiceB -> Power BI? Or just Power BI?

enter image description here

I've tried searching and really read quite a few articles, but it's pretty much written in generalities everywhere and I'd need some commentary on my solution.

1 Answer 1

2

Its not 100% clear what the problem you are encountering is, but I think the flaw in your setup is having communication between Service A and Service B

It looks like these sit in the same layer of your application, references between them risk loops and confuse the logic.

Instead, have the top layer call both services and assemble the data. This might mean fetching a bit more, or looping though some extra bits. But it will greatly simplify your overall architecture

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.