• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Do microservices communicate using Rest-clients or Message-Queue?

 
Ranch Hand
Posts: 240
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi experts,
May i know how do the microservices of an application communicate with each other? I saw some examples on internet, it uses some rest clients like RestTemplate/WebCLient/Feign.
It seems these rest-clients are just for practice purpose while real microservices based applications use something else like RabbitMQ etc. May I know your opinion on this?

I would also like to know:
When every microservice has its separate db then how does the linking between the tables of separate DBs like one-to-many, many-to-many work?


Thanks in advance.
 
Ranch Hand
Posts: 37
1
MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Every microservice owns its data and its domain logic. If you are using a synchronous request->response comunication, HTTP or ReST are the most common protocols, if you are communicating within your microservices cluster, other formats might be more useful. If you have a @OneToMany relationship between microservices, your layout probably has room for improvement. Try to avoid "distributed monoliths".
 
Today you are you, that is turer than true. There is no one alive who is youer than you! - Seuss. Tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic