You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Terry Laurenzo <Te...@amexbf.com> on 2003/03/18 18:07:05 UTC

Possibility for a light weight Phoenix container

Phoenix developers/users:

I have been working to integrate Phoenix into our internal service infrastructure for about a month now. I led the adoption of Avalon as a whole over a year ago and we have been using it through a set of wrapper Java classes that essentially delegate most work down to the Excalibur DefaultComponentManager. Since the functionality that this provides is extremely limited, I made the decision to dive into Phoenix. Specifically, I have been using the post 4.0 developer snapshots that include the added functionality of managing Maps and Arrays of dependencies instead of enforcing one to one relationships. 

Using the Phoenix container is compelling with one caveat: it does not play well with others. It looks like there was initial work done to build an embedded version with PhoenixServlet but this is badly out of date. Phoenix makes a great stand-alone container but many of us who are trying to integrate these new tools with our existing set of processes do not have the luxury to build on Phoenix from the ground up. It would be really nice to have an officially maintained embedding API (that is documented!) for embedding the container into other applications or loading as part of a webapp (I know the Phoenix "way" says to host the web server in Phoenix, but this is not always feasible).

To this end, I spent about two days digging into the bowels of Phoenix and building such functionality. First, I built a SimpleAppEmbeddor class that is primarily configured with a Configuration for the assembly and a Configuration for the block configurations (just like what would normally exist in the SAR). It leaves out most of the ClassLoader, logging and instrumentation (although instrumentation could be reenabled by including the right components in the primordial ServiceManager that is used to initialize the kernel). I then built a new PhoenixServlet that will load a Phoenix application and store a ServiceManager representing all of the components it contains into the Servlet context so that all servlets in the web app have access to it. 

I know that some of what I am proposing is counter to the goals of Phoenix the container, but I think that Phoenix the embedded component has different goals. The goals in this situation are to be as light-weight as possible and expose the core Phoenix functionality within applications that have been built apart from Phoenix. There is a lot of useful stuff in Phoenix that makes development so much easier. I would just like to make these core features useful to everyone instead of being restricted to those who have the luxury of building things from the ground up.

So, my proposal is to begin defining such a set of components to be formally included within Phoenix instead of being developed as an add-on. Currently, the add-on approach is difficult because the Phoenix source code is in such a state of flux.

Am I out in left field here or does anyone else have interest in such a thing?

Terry Laurenzo

Re: Possibility for a light weight Phoenix container

Posted by Peter Donald <pe...@realityforge.org>.
Hi,

On Wed, 19 Mar 2003 04:07, Terry Laurenzo wrote:
> To this end, I spent about two days digging into the bowels of Phoenix and
> building such functionality. First, I built a SimpleAppEmbeddor class that
> is primarily configured with a Configuration for the assembly and a
> Configuration for the block configurations (just like what would normally
> exist in the SAR). It leaves out most of the ClassLoader, logging and
> instrumentation (although instrumentation could be reenabled by including
> the right components in the primordial ServiceManager that is used to
> initialize the kernel). I then built a new PhoenixServlet that will load a
> Phoenix application and store a ServiceManager representing all of the
> components it contains into the Servlet context so that all servlets in the
> web app have access to it.

nice! I would love to see it.

> I know that some of what I am proposing is counter to the goals of Phoenix

nah. Just not a priority ;)

> the container, but I think that Phoenix the embedded component has
> different goals. The goals in this situation are to be as light-weight as
> possible and expose the core Phoenix functionality within applications that
> have been built apart from Phoenix. There is a lot of useful stuff in
> Phoenix that makes development so much easier. I would just like to make
> these core features useful to everyone instead of being restricted to those
> who have the luxury of building things from the ground up.

ok.

> So, my proposal is to begin defining such a set of components to be
> formally included within Phoenix instead of being developed as an add-on.
> Currently, the add-on approach is difficult because the Phoenix source code
> is in such a state of flux.
>
> Am I out in left field here or does anyone else have interest in such a
> thing?

I like the idea and more than happy to put in some effort in maintaining it 
(or even helping you develope it). I probably wont be using it (at least not 
initially) so I will have to rely on you to give feeedback on design etc.

If we do this I would want the interface used to embed the container to be 
fairly stable and extensible. In which case we will need to do a fair chunk 
of unit testing and probably play with a few designs. 

Anyways I would love to see what you have for a start and then we can go from 
there. Feel free to chuck stuff in our new Issue tracker to make sure it 
doesn't get lost. 

-- 
Cheers,

Peter Donald
------------------------------------------------------------
 militant agnostic: i don't know, and you don't know either.
------------------------------------------------------------ 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org