izumi icon indicating copy to clipboard operation
izumi copied to clipboard

Isolated classloaders support

Open pshirshov opened this issue 6 years ago • 0 comments

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:

  1. Coursier resolves convergence by choosing most recent version in the slot. Hence we should resolve each role independently.
  2. 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:

  1. We create a classloader per each role
  2. We start creating classloaders per each dependency reusing duplicates

Shared component problem (e.g. http server) is more problematic. We have two options:

  1. 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
  2. Make sure we have strictly one version of shared component api - still some manual work to be done

pshirshov avatar Sep 28 '18 12:09 pshirshov