I'm actually studying microservices and I'm facing a problem.
Context
I m developing two microservices :
- User management, Spring Based, with MySQL database
- Planning management, ASP.NET based with SQL Server database. The only access point of this service is an API listing some RESTFUL endpoints like
/planning/{day}/{userId} or /planning/{startDate}/{endDate}/{idUser}
- Billing management, Node.Js based with MongoDB.
Problems
What can I do to only permit accessing the planning information through the user service without couple the two services ? Knowing that the planning service could be accessed later from somewhere else, but not now.
How can I do to access billing information from billing service corresponding to a user from the MySQL database? I know that microservices are not coupled, and this point is killing me, cause it has to be coupled in a way no? Like referencing
idUser
in a billing? Else, how can I know which billing from my API should I expose? More precisely, how do microservices communicate between them, without to be coupled?How to create authentication without duplicating authentication requests to the authentication service, from other services?