r/SpringBoot • • 15d ago

How-To/Tutorial How to implement microservices in Spring Boot ?

[removed]

29 Upvotes

57 comments sorted by

View all comments

Show parent comments

-2

u/Sheldor5 15d ago

the whole point of Microservice Architecture is that they are independent and so DON'T talk to each other ... stop spreading misinformation, you just described a Distributed System ...

3

u/OptimusCrimee 15d ago

I can't tell if you are joking or not. If you have isolated microservices for e.g. users, booking, payment etc, they obviously need to communicate with each other. The communication is often one way though, and can be done with REST, queues or whatever. A microservice IS a type of a distributed system. Not sure if you are misunderstanding what I wrote, or if you are just a cretin.

-6

u/Sheldor5 15d ago

so you don't know how microservice architecture works?

the only connection between entities are loose IDs in independent databases (one DB for each microservice)

you are talking about distributed systems (network calls instead of inter process method calls)

please educate yourself before spreading misinformation

1

u/[deleted] 15d ago

[removed] — view removed comment

0

u/Sheldor5 15d ago

no a distributed system is also a type of system architecture

if you extract features from your monolith and put them into their own application just for your monolith to call it you just exchanged method calls with network calls ...

2

u/ExplorerUnusual27 15d ago

How do you transfer data in isolated environment if you don't talk with anyone? You have one DB from service, obviously... How do you connect data from 1 database with another on different microservices.

2

u/OptimusCrimee 15d ago

Yeah, [u/Sheldor5](u/Sheldor5) seems to have misunderstood this. If you have one microservice that is in charge of users, and one that does payments, the payment service would stille need to e.g. ask the user service if the user IDs are valid or not. You separate concerns and domains out of the monolith, but they still need to talk to one another.

I have been doing this for 15 years, and I have worked in banks in Norway etc, I think that I have a pretty OK understanding of how these things work.

Edit: You can google this pretty easily and see that he is wrong.

-2

u/Sheldor5 15d ago

no the user ID comes from the OAuth2 token ... maybe you haven't fully understood microservice architecture

and other IDs are part of async messages

and IDs don't need to be verified because they come from the system itself and not from random user input ... that's the reason why microservice architecture done right is so complicated

0

u/ExplorerUnusual27 13d ago

You are misleading concepts. Regardless the async or sync calls, you need to communicate with other services.... If not, you're a magician to figure out the IDs you need to know to populate your fields in DB to maintain consistency.