in reply to POE and Websockets

There are probably more topical resources for POE help, like POE's mailing list or irc.perl.org channel #poe, depending whether you prefer long-form answers or quicker, specific assistance. There's also POE's wiki, which includes this introductory article and a Cookbook with several examples.

POE is a callback-based event reactor. When something happens, such as when data appears on a socket, POE's Kernel notifies your code that it can safely read from the socket. POE::Kernel's API hides the details of several event loops, including low-level loops like Ev, and high-level graphical toolkits like Prima.

POE's callback model may be confusing because it's name-based rather than code-reference based. Named events make certain things easier, like mapping events to any kind of callback, and dynamically loading or reloading callbacks as needed. Some people store their objects in a database and load them (or reload them) as needed. Most people don't use the feature, though.

POE::Session objects do a few different things, but they mainly act as namespaces for events. Multiple parts of a program can use the same event names, as long as each has a separate session. For example, multiple classes might use the same event name. It would be bad if they got each others' callbacks.

That's a very basic, very high level synopsis of the two main POE classes. If you have more specific questions, I'll be happy to try answering them.

Replies are listed 'Best First'.
Re^2: POE and Websockets
by cavac (Prior) on Jun 25, 2012 at 14:41 UTC

    Thanks! Very good information, now i know at least what i'm looking for.. and where i'll be able to look for answers ;-)

    "You have reached the Monastery. All our helpdesk monks are busy at the moment. Please press "1" to instantly donate 10 currency units for a good cause or press "2" to hang up. Or you can dial "12" to get connected directly to second level support."