lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: Dependency Injection?
Date Tue, 14 Jul 2009 21:30:02 GMT
On Tue, Jul 14, 2009 at 5:06 PM, Jason Rutherglen <
jason.rutherglen@gmail.com> wrote:

> Are we looking at implementing dependency injection for the config files?
> I'd like to think about this as we also look at integrating Zookeeper for
> config file management. I was trying (for example) to use
> LogByteSizeMergePolicy however currently I can't set the parameters because
> solrconfig.xml only accepts a class name. Adding custom dependency
> injection
> just for this class doesn't seem ideal, nor is rolling out our own
> dependency injection? There's a couple of choices: * Spring - It's in wide
> use, however it grows brittle and very difficult to maintain over time. I'd
> personally rather focus on search, not managing webs of xml files. Some
> companies have extended Spring to get around other limitations, I don't
> think we want to go down that path? * Guice
> http://code.google.com/p/google-guice/ Pluses: Apache Licensed and it's
> integrated with Java so there's no problems with misspellings, type safety.
> Because it's in Java it gets around Spring's biggest drawback to me which
> is
> the inability to easily navigate the XML files.
>

We have discussed a few times in the past. A nice benefit is that, while we
can provide an injector framework with Solr, it should be easy to plugin
another (though not necessarily with annotations) of your own choosing.

I liked Guice a lot when I used it a couple years back - wasn't it
annotation only though? Not sure I like the idea of Guice annotations all
throughout Solr.

Noble has started some work towards this by beginning to move all of the
solrconfig parsing to one class. Ryan also did some work towards this, and I
think there is a branch with his work, though I'm sure its way out of date
now.

-- 
-- 
- Mark

http://www.lucidimagination.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message