0

we're currently trying hard to get into microfrontends and self-contained services. I would say that we understood in some way the base concept.... But we run into a problem if we're talking about our calendar:

The calendar is for us a self-contained service with his own microfrontend, and it's including data from other self-contained services. So far, nothing special. So the idealistic way would look something like that:

Desired self-contained services

But the difference we see to other services is, that the calendar has a lot of events (especially in the month view). So if we would go with the microfrontend approach, we understood that we have to include in every event the microfrontends from the self-contained services "employees", "patients", "treatment" etc.. But this seems for us a big performance disadvantage.

So we decided for now to solve this with an API Gateway. But now we lost the independence between the self-contained services:

Calendar diagram

Do you have some suggestions for us how to get the advantages of microfrontends & self-contained services if you have such a situation as the calendar? Or would you solve it completely differently?

Tech stack: React for Frontend Java Quarkus for Backend Postgresql as Database

SimonasN
  • 1
  • 1
  • If you have a fully generic calendar service with any kind of events then it means you need a component that knows how to render a given event entry and that component can then delegate the rendering of it's inner components to other contexts. You can't really save the network calls necessary for those inner components to fetch their own info, but the component logic should be cached by the rendering framework (doesn't React do this already)? Alternatively you may ask yourself if it's worth to have such a generic Calendar service if the calendar is specific for events of a given domain. – plalx Jul 02 '21 at 15:31
  • Lets say you are looking at a scheduled treament appointment in the calendar and stakeholders wants to change the info that shows for the patient, the level of details about the treatment, etc. Do you really want to have to modify many distinct services to do so because the rendering of a given even is scattered across multiple services? Maybe, maybe not, only you can tell but just pointing that out ;) – plalx Jul 02 '21 at 15:39

0 Answers0