Henrib wrote:

It may be too late but just for the sake of argument, Hoss's idea about a
ResourceLoader triggered more thinking...(sorry, I'm not as fast as Hoss).

nonsense! of course its not too late. Its great to get feedback and new ideas anytime - the goal is to make sure that we like where we end up and we feel confident we haven't missed something. A few loops in the middle are to be expected.


I also remembered that things were easier before solr-215 because the core &
config were singletons. How could we get some sort of singletons back?
Through the class loader...

I see where you're going, but I'm not sure we *want* the singletons back ;)

Moving away from SolrCore.getSolrCore() is a good thing. Likewise for SolrConfig.config;


getClass().getClassLoader()) when/if needed. And that loader could even know
the config, the schema & the core. Not really the singletons that existed
before but close.

I'm reluctant to attach more data to the ResourceLoader. One of Hoss' more convincing arguments (for me) is that the "Inform/Aware" interfaces makes it clear what components have which dependencies. This is a big advantage for testing and could potentially make it possible to move the Analyzer/Tokenizer framework to lucene/contrib.


Should I pursue or drop the idea ?


I'm not sure we gain much by resurrecting singletons for things that are not really singletons (core/config). We will have a real singleton with the SOLR-350 MultiCore registry.

ryan


Reply via email to