Exporting - the wrong default?
Andrew Dinn
adinn at redhat.com
Thu Jul 28 08:47:50 UTC 2016
On 27/07/16 17:26, Alan Bateman wrote:
> I do see your point about it being a potential chore when starting out,
> esp. when a new module is in development and the API packages are in
> flux. However I would expect that in time that the IDEs, the refactoring
> support in particular, will help. Also once the API has settled a bit,
> and other modules start depending on your module, then the number of
> changes to the exports list will reduce.
I believe you are missing an important point here -- one of scale. Large
middleware suites like containers currently comprise many hundreds of
component jars, many of them released independently by a proportionately
large number of 3rd party developers. That means something is always in
flux between one release and the next of the middleware suite. Your
pretty picture of Jigsaw imposing a nice clean mechanism to control
dependencies at the level of each individual released component does not
scale to this sort of circumstance.
A descriptor (module-info.class) baked into a 3rd party jar at release
cannot be altered without getting the 3rd party to update and re-release
the jar -- at which point other components then also need to change and
be re-released in consequence. Meanwhile further components will have
had to change to patch bugs or security issues and the whole cycle
starts all over again.
By contrast a descriptor (or suite of descriptors) independent from the
described components can be updated without having to get multiple 3rd
parties to be involved in re-creating the described components. This
latter route has indeed been followed by those who have had to build
systems at this scale for exactly this reason.
What you present as an advantage - having the linkage descriptor tightly
coupled with the linked component -- is, in fact, already known to
present significant problems. I find it bizarre that you seem to think
that your assumptions about the benefits offered by Jigsaw's mode of
operation can be blithely retained - not even allowing that they might
have some drawbacks -- in the face of repeated warnings from those who
have experience in these matters.
regards,
Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander
More information about the jigsaw-dev
mailing list