izumi
izumi copied to clipboard
Isolated classloaders support
This should be the last piece allowing us to have piece of mind and not to worry about convergence.
We need to consider the following:
- Coursier resolves convergence by choosing most recent version in the slot. Hence we should resolve each role independently.
- We may create a classloader per role but it wouldn't work as per there are shared libraries and shared components.
We may solve shared libraries problem by building a classloader tree. We should plan this work ahead of time to minimize the complexity.
So:
- We create a classloader per each role
- We start creating classloaders per each dependency reusing duplicates
Shared component problem (e.g. http server) is more problematic. We have two options:
- Make roles completely independent - this way we would lose one of the most important benefits of role based approach and get a tomcat-like monster
- Make sure we have strictly one version of shared component api - still some manual work to be done