Intro

This page captures some of the experimentation going on https://issues.apache.org/jira/browse/SOLR-4818 and various other issues around refactoring some of Solr's plumbing to use Guice and Restlet, as well as very other simplifications. The word "plumbing" is used to differentiate the core functionality of Solr (searching, faceting, indexing, etc.) from things like servlet setup, plugin loading, dependency injections, etc.

Why Guice?

Guice makes dependency injection dead simple. A fair amount of Solr's current plumbing code was built before dependency injection was popular (we have discussed Spring in the past, but never ported to it) and thus invents ways of bootstrapping. Guice should simplify a lot of this.

Guice also makes it much easier to test mocks and alternative approaches with very little overhead in terms of rewiring. It should also make it a lot easier for us to add plugins, etc.

Why Restlet?

Restlet is a framework for easily adding REST APIs to an application. We already use it for the Schema APIs. Combining it with Guice makes for an easy way to quickly add new, easily testable, REST APIs without a lot of work.

Status

Work is under way on https://svn.apache.org/repos/asf/lucene/dev/branches/solr_guice_restlet/.

Status:

TODO

  • No labels