-
Notifications
You must be signed in to change notification settings - Fork 0
Platform Model Factories
A platform-model factory is a factory which constructs and populates the data of a platform model based on data in a database. How the platform model's data is populated is entirely up to the developer doing the implementation. However, there are some expectations and recommendations regarding how this data should be sourced from said databases.
Typically, this information is pulled from a collection of different entity types, then consolidated for easy access in the platform model’s fields/properties. Usually this is done via entity factories which do direct queries to the database to obtain entity data. The entity data is then both combined and populated simultaneously into the platform model.
If these platform models are used quite frequently or rely on remote caching of sorts, it may be less resource-intensive to utilize service clients instead of accessing the entity data directly. In this case, entity factories should not be utilized. Instead, a client should be installed in the platform assembly to assist with retrieving data from the necessary service.
Additionally, services created strictly to serve platform assemblies should only utilize gRPC. HTTP in this context is entirely unnecessary unless the service also needs to accept external calls.
Finally, it's recommended that the service model only be implemented if necessary since this requires more machines and more man-hours from the development team to run up.