You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2013/08/06 13:45:33 UTC

[Solr Wiki] Update of "GuiceRestlet" by GrantIngersoll

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "GuiceRestlet" page has been changed by GrantIngersoll:
https://wiki.apache.org/solr/GuiceRestlet

New page:
= 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:
 * Existing collection based RequestHandlers are mapped into (note, I picked /api/collections/COLLECTION_NAME, but it can changed) 
  * http://localhost:8983/solr/api/collections/collection1/select?q=*:*
 * SolrDispatchFilter is replaced by SolrGuiceServletConfig and is much simpler.  A default core is no longer supported
 * Simpler, pluggable SolrQueryRequest creation should make it easier to use Solr in a non-servlet environment

= TODO =

 * Get the tests to pass
 * Make SolrRequestParsers and many other things injectable
 * Demonstrate with Netty
 * Map the Admin APIs
 * Verify the UI
 * https://issues.apache.org/jira/browse/SOLR-5103 with a Plugin mgmt API
 * Separate out the configuration medium (i.e. XML) from the construction of the objects (e.g. IndexSchema assumes XML, as does SolrConfig)
 * MORE HERE