swiftone has asked for the wisdom of the Perl Monks concerning the following question:

I was skimming some Perl6 info, (in particular http://www.perl.com/pub/2000/07/perl6.html), and I stumbled across the statement:
But not a lot seems to have happened to Perl in the last year. The last really interesting Perl development was probably POE, which won the "Best New Module" award at last year's Perl conference.

POE? What's that? If it's so great, it sounds like something I should learn about. So I looked it up in CPAN, and read the readme. It appears to assume I'm familiar with POE, but I did get this:
"POE" is an acronym for Perl Object Environment. This may change to Persistent Object Environment.

First and foremost, it is a programming framework for event-driven state machines.

POE includes high-level, functional interfaces for select, alarms, sockets and file I/O. The interfaces are robust but incomplete.

From different vantage points, POE may look like other things:

It may seem to be a cooperative multithreading model.
It may be interpreted as a portable component architecture.

Because it implements a low-level programming concept, POE can do many things.

I guess I'm just not familiar with the terminology of this low-level programming concept. It "can do many things". Can someone give me some examples?

Replies are listed 'Best First'.
Re: Show me the missing Big Deal of POE.
by Anonymous Monk on Oct 14, 2000 at 00:30 UTC
      Just out of curiosity, how would you say POE compares to Libero?

      That strikes me as a similar ideal, though not Perl specific. (I have not tried it, but I have used the Xitami webserver that they wrote with it and it works...)

      Thanks,
      Ben

RE: Show me the missing Big Deal of POE.
by KM (Priest) on Oct 13, 2000 at 19:24 UTC
Re: Show me the missing Big Deal of POE.
by Anonymous Monk on Oct 14, 2000 at 03:12 UTC

    Libero is a finite machine meta-language. It includes a tidy state machine description language and a very nice engine for generating real source code from it. It comes with schemas to make machines in C, REXX, x86, several other languages, and even Perl. I like it a lot.

    POE is very much a library: code is built with it rather than in it. It also lives at a lower conceptual level: it's abstract state machines rather than any particular kind. This is both a blessing and a curse.

    Implementation differences abound: Libero's machines are intended to encompass entire programs; POE's are components that work together by passing message events. Libero's machines are sequential, while POE's are concurrent. Libero's states don't accept parameters; POE's do. Libero doesn't generate a transition/event queue, and POE has one. The list goes on and on.

    That said, I still like Libero and it's not at all incompatible with POE. If anything, POE's currently not finite machine enough for Libero, so I'm working on a POE::DFA (deterministic finite automaton) that will make it easier to finish a schema I've been tinkering with. After that I expect to be able to churn out state machines like crazy, which is why I went looking for something like Libero in the first place.

    Oh, if anything, POE probably is more like iMatix's SMT (Simple Multi-Threading kernel), which is an add-on for Libero and also part of Xitami. I must admit that I haven't given SMT a really close look, so I may be totally wrong.

    -- Rocco Caputo / troc@netrus.net / :)

      In a current endeavor, I am starting to use POE. Admittedly, it's because I don't feel like writing a state machine plus a server; however, it appears that POE seems to make this a bit easier by providing a framework. Of course, it feels a bit like wrapping oneself around MPW, Metrowerks, RogueWave, or MFC, but still it's a decent framework.

      I am curious as to the performance of the beastie in a production environment, as opposed to writing a simpler graph used as a callback table, triggered on transitions, vis-a-vis NerveCenter et al.

      I do believe that writing drop-in components will become easier once I write a more generic Component loader -- or at least settle on a well-defined directory/folder structure for the packages --, since to achieve such ease of extensibility, the Component/Filter/Wheel paradigm must evolve to a new abstraction, such as a generic plug-in with a set directory OR package structure. Just as we tend to write -- or some variant thereof -- ...

      pacakge Foo; sub new { my $this = shift; my $class = ref($this) || $this; my $self = {}; bless $self, $class; return $self; } 1;
      ...so too will we see the likes in POE.

      -v
      "Perl. There is no substitute."
        I do believe POE makes implementation of event based programs more easier than some of the other frameworks that your mentioned that I have used e.g. MFC. As of right now it might lack some functonality of the big boys but I feel its getting there. As for writing a state engine from scratch, perl says dont re-invent the wheel. If its out there just plug it in. I too am trying some intresting things with POE. Will keep you updated on how it goes.
Request for submission: Article on POE for www.perl.com
by princepawn (Parson) on Oct 30, 2000 at 18:40 UTC
    Mark-Jason Dominus sayeth:

    POE is important, and more people should be using it. I would like to find a qualified and interested person to write an article (or a series of articles) about POE to be published on www.perl.com. The author would, of course, be paid.

    If you're interested, please send me email (mjd@plover.com)

Re: Show me the missing Big Deal of POE.
by mdillon (Priest) on Oct 13, 2000 at 20:55 UTC
               _|_|_|
               _|    _|
               _|_|_|
               _|
               _|
    
     _|_|_|      _|_|    _|_|_|_|
     _|    _|  _|    _|  _|
     _|_|_|    _|    _|  _|_|_|
     _|        _|    _|  _|
     _|          _|_|    _|_|_|_|
    
               _|_|_|_|
               _|
               _|_|_|
               _|
               _|_|_|_|
    let me ask you, swiftone: do you drink water? pure, clean, natural, life-giving water?

    have you ever seen a commie drink a glass of water?

    learn to stop loving the bomb today (don't be so uptight)