I'm new with microservices, and after reading many documentation, I'm still having some doubts about many things. I'm putting an example of what I want to achieve now:
Scenario:
- Microservice architecture.
- The FileServer will store files from several sources.
- Each microservice has its own database.
TemplateService database:
- TemplateId (PK): guid
- FileId (~FK): guid
- TemplateName
FileService database:
- FileId (PK): guid
- FileName
- Path
Use case: A user wants to upload a template to the application.
Questions: (and my ideas)
Who creates the GUID (FileId)?
- UI creates the GUID, and calls both, Template Service and File Service.
- UI calls Template Service and this service creates the GUID, and then call the File Service
Who deals with the File Server?
- UI sends the File directly to the FileServer (or maybe to another service such as FileManager?)
- UI sends the File to FileService, and this service store it in the FileServer.
Aucun commentaire:
Enregistrer un commentaire