Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
Currently, we have a JsonModule class that is responsible for parsing user's module YAML specifications, resolving the specification into application components (i.e. function providers, ingresses, routers, and egresses) that is then bound to the application universe.
Over time, the JsonModule class has overgrown with several changes as we progressively adapted the YAML format.
- The class handles ALL kinds of components, including ingresses / functions / egresses etc. The code is extremely fragile and becoming hard to extend.
- Users have no access to extend this class, if they somehow need to plugin custom components (e.g. adding an unsupported ingress / egress, custom protocol implementations etc).
We aim to rework this with the following goals in mind:
- The system should only handle module.yaml parsing up to the point where it extracts a list of JSON objects that individually represent an application component.
- The system has no knowledge of what each JSON objects contains, other than its TypeName which would map to a corresponding ComponentBinder.
- A ComponentBinder is essentially an extension bound to the system that knows how to parse a specific JSON object, and bind components to the application universe.