Before we can move plugins to become separate micro-apps, they need to be built according to service object principles, respect boundaries, and use proper inter-service communication.
Create a registry NPM package
addQuery(name, func, [methodName])
addMutation(name, func, [methodName])
addGraphQLSchemas(schemas)
addGraphQLResolvers(resolvers)
addMeteorMethod(name, func)
addMeteorPublication(name, func)
addUtil(name, func)
registerPlugin
// and a way to use all of the “added” things from other plugins
Update the core graphql plugin to do schema stitching of all schemas and resolvers registered by addGraphQLSchemas and addGraphQLResolvers
This is a very complex task, but exciting to see. Once one starts looking at the architecture of reaction and realizing everything is a plugin, the next step is to see reaction as a kind of micro-service architecture. Looking forward to seeing this develop!
No one asked me, but if we were going to move something that's in the core right now into a service, I would vote for moving the jobserver out. In a production environment I would love to not run this on web servers and only run it on dedicated job-servers.
The title of this might be a little confusing. To clarify, this Epic is for getting the current plugin code properly separated such that we can later move to services. So there is quite a bit of work before we actually move anything to a service, including not only this Epic but also finishing the new auth system, designing the service communication pattern, and incorporating data streams.
At the end of this Epic, they will be "services" in the code sense, but not separate apps connected over HTTP.
But I agree that background jobs would be a good one for the initial trials.
Oh, I thought this would be the PR that removes Meteor. So disappointed. :😢
Most helpful comment
No one asked me, but if we were going to move something that's in the core right now into a service, I would vote for moving the jobserver out. In a production environment I would love to not run this on web servers and only run it on dedicated job-servers.