Win a copy of Get Programming with Java (MEAP only) this week in the Beginning Java forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

How do I keep single responsibility of these 3 microservices?  RSS feed

Ranch Hand
Posts: 1025
  • Mark post as helpful
  • send pies
  • 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?
Amateurs built google. Professionals built the titanic. We can't find the guy that built this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!