On Tue, Aug 4, 2009 at 8:42 AM, Andrzej Bialecki<a...@getopt.org> wrote: > Kirby Bohling wrote: >> >> All, >> >> I have pushed out a version of Nutch to github: >> >> git://github.com/kbohling/nutch.git > >> I'm going to look into how to use OSGi features to hook the plugins >> into the core configuration. I am trying to minimize the amount >> change to Nutch code. In that vein, I am contemplating adding one >> service implementation to each plugin. Create >> "RegisterExtensionService", that has a single method that will allow >> each plugin to register whatever factory type objects are needed by >> the core to instantiate the objects required to assemble a runtime >> environment. If a plugin has multiple extensions, we can either >> register them all in one service, or register each as a separate >> services. > > This looks like a very good beginning. I only started looking at it, but one > thing that puzzles me is that there are no services defined ... I t hought > that plugins that provide specific services (such as parsing) should > advertise this, so that facades such as Parser, IndexingFilters, URLFilters, > URLNormalizers, etc ... can assemble all available plugins. Or am I missing > something? >
I ran out of time over the weekend before services could be inserted. I wanted to get something out for potential review on direction. My initial goal was just to get everything into an OSGi environment. There are several ways of going about adding services. I will try out a couple of different ways, and report back. It looked to me that the least amount of code churn could be accomplished by having a single "service" that each plugin could use to register their implementations. However, we could just as easily implement the services and factory logic using individual services (one per <extension-point> in the plugin.xml files). I likely won't have much time until this weekend, but I can discuss if people have suggestions or designs ideas they want me to try out. Kirby