ACL entity and microservices database relations

by michalk93   Last Updated May 15, 2019 12:05 PM

I would like to build a microservices architecture to handle the following scenario: I have a building. The building has some kinds of devices. And the devices can be used by the users. In the system, the administrator can add a user and allow the user to use selected devices in the building.

I have user service, device service, building service, authentication service. Each service has own database. The problem is where to store relations between users and buildings, buildings and devices?

To indicate which user has access to the device I need to store relation: device_id - user_id but it should be in the table devices_users in the user service or in device service? The same for the relation building_id - user_id and device_id - building_id. Could anyone help my with this issue? Maybe I have designed the microservices in wrong way?



Related Questions


Updated August 09, 2018 07:05 AM

Updated June 06, 2017 20:05 PM

Updated April 28, 2016 08:02 AM

Updated April 10, 2018 12:05 PM

Updated October 26, 2018 10:05 AM