mesg-foundation / engine

Build apps or autonomous workflows with reusable, shareable integrations connecting any service, app, blockchain or decentralized network.
https://mesg.com/
Apache License 2.0
130 stars 13 forks source link

Simplify system services configs and compilation #1155

Closed NicolasMahe closed 5 years ago

NicolasMahe commented 5 years ago

I would suggest to simplify the override of the env of the system services. Instead of having to define one variable per env, we could pass ALL envs in one variable as a JSON encoded array. The Engine would have to decode it to start the instances. Maybe we could go further and create a generic system based on JSON encoded string or a file that is transform to an asset during the compilation, that contains all info about the SystemService. Like this we will not have to update the config package to add or update system services. @krhubert suggested something like this on Discord.


Also, why not compiling the service also in the script dev? like scripts/build-engine.sh is doing? because of optimization?

Answer from @antho1404 yes because of optimization but not only, we should only have the compiled version of the service and if we have the compiled version there is no need of having the sources of the system service in the engine and in that case, the compiled version is a snapshot of the exact version we want from this system service that we can manually update with something like

mesg-cli service:compile https://github.com/mesg-foundation/service-marketplace > systemservices/marketplace.json

It would definitely make sense to move the system services into their own repo and use the mesg-cli to compile them during the build of the Engine.


Related to PR https://github.com/mesg-foundation/engine/pull/1087

NicolasMahe commented 5 years ago

This issue should be closed as the goal is to remove the system service and use directly the cosmos module or processes build on top on it. @antho1404 can you confirm by closing this issue

antho1404 commented 5 years ago

Yes system services will be removed when the full network is implemented. We can add it later again if needed.