You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want the server AND the devtool to be able to handle multiple different version of the Components API in parallel.
For example, if there is 3 different JSON api version (let's say 1.0, 2.0 and 3.0) the server should have loaded the 3 different version and able to reply quickly to any application that target one of these versions.
The scope of these changes target the projects :
server
application_runner
components_api
dev_tools
First, we must have locally all the Components API. I think there is 3 way to load them :
Manually Package all the API in the server (easy way but need more maintenance)
Let the server download all the version, we supply the list (or range) of the versions
Let the server download all the version and handle the list of the versions.
Then we must load all the versions and keep them loaded for faster response.
Finally we must provide the API to the application_runner when needed.
Curently the application_runner have a module called JsonShemata that load the unique version of the API into a GenServer.
When needed, the UiValidator module can then ask the GenServer for the JSON shema of the needed component then perform the check.
I think we can duplicate this GenServer for each version of the API and add a ComponentApiManager that is in charge of downloading and loading all the API by starting a new GenServer for each version of the API.
Note : We probably should only load the last MINOR.PATCH version of each MAJOR
To sum up :
ComponentApiManager
Download all latest Major version of the API
Keep track of all the downloaded/loaded version
Start a new JsonShemata GenServer for each version
JsonShemata
In charge of one version
Load the files of the version
Serve the files for the UiValidator
UIValidator
Receive the App UI and targeted version
Ask the ComponentApiManager for a json shema file in the targeted version
The ComponentApiManager forward the request/response to the compatible version of the JsonShemata.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We want the server AND the devtool to be able to handle multiple different version of the Components API in parallel.
For example, if there is 3 different JSON api version (let's say 1.0, 2.0 and 3.0) the server should have loaded the 3 different version and able to reply quickly to any application that target one of these versions.
The scope of these changes target the projects :
First, we must have locally all the Components API. I think there is 3 way to load them :
Then we must load all the versions and keep them loaded for faster response.
Finally we must provide the API to the application_runner when needed.
Curently the application_runner have a module called JsonShemata that load the unique version of the API into a GenServer.
When needed, the UiValidator module can then ask the GenServer for the JSON shema of the needed component then perform the check.
I think we can duplicate this GenServer for each version of the API and add a ComponentApiManager that is in charge of downloading and loading all the API by starting a new GenServer for each version of the API.
Note : We probably should only load the last MINOR.PATCH version of each MAJOR
To sum up :
ComponentApiManager
Download all latest Major version of the API
Keep track of all the downloaded/loaded version
Start a new JsonShemata GenServer for each version
JsonShemata
In charge of one version
Load the files of the version
Serve the files for the UiValidator
UIValidator
Receive the App UI and targeted version
Ask the ComponentApiManager for a json shema file in the targeted version
The ComponentApiManager forward the request/response to the compatible version of the JsonShemata.
Beta Was this translation helpful? Give feedback.
All reactions