Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

james (1129)

james
  (email not shown publicly)
http://whoot.org/

...

Journal of james (1129)

Friday February 22, 2002
07:05 AM

OpenFrame and Pipelines

[ #3032 ]

I've just started rewriting OpenFrame to use my Pipeline module. It becomes stupidly easy.

Essentially OpenFrame->isa('Pipeline') and OpenFrame::Slot->isa('Pipeline::Segment'). OpenFrame::Response->isa('Pipeline::Production') and overrides the contains() method to return itself.

In order to make life really easy rather than having specific servers for apache, standalone, etc, etc, you will simple create a pipeline segment that takes an Apache object out of the store and returns a OpenFrame::Request. When you write your OpenFrame installation you take whatever the real server gives you and make sure you have a slot early on in your pipeline to convert it to something more useful. For example, an Apache handler would look like:


use OpenFrame;
sub handler {
    my $r = shift;
    my $store = Pipeline::Store::Simple->new();
    $store->set( $r );
    my $pipe = OpenFrame->new(
        store => $store,
        segments => [ OpenFrame::Slot::ApacheRequest->new() ]
    );
    $pipe->enter();
}

of course you'd probably want more segments, but the crux of it is there.

I think that we can probably have another slot, which parses the old config file, and adds a pipeline of the slots in the config file. Further more the OpenFrame::Slot::ApacheRequest could add a cleanup slot that outputs the production. Mad I say!

I think its nice anyway.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.