• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How do I keep single responsibility of these 3 microservices?

 
Ranch Hand
Posts: 2925
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a functionality where there is a call to external API , there is call to database table and there is computation using these two.

Microservice 1: Calls the external API (single responsibility).
Microservice 2: Calls the database table (single responsibility).

Microservice 3: Has to perform computation based on the above 2 so it will have to 1)  call microservice 1 and 2) microservice 2 to get the results and then 3) use this to do computation. In such a case it becomes multi responsibility instead of single responsibility as it is doing 3 things.

How to keep it single responsibility in such case?
reply
    Bookmark Topic Watch Topic
  • New Topic