On Sun, Nov 18, 2001 at 10:31:56PM +0100, [EMAIL PROTECTED] wrote: > hi, > > as posted events now keep sessions alive, i want to implement the > automatic postback feature. there wouldn't be much changes to the idea > in the wiki except that using postbacks as return pointer would be an > extension. SENDER, event and [args] would be used normally. new methods: > > postreply($remote_session, $remote_event, @remote_args, > $return_event, \@return_args); > postforward(remote_*); # return_* is forwarded > postpostback($remote_session, $remote_event, @remote_args, $postback);
I think postbacks are too low level for POE::Kernel. True, Kernel (and maybe Session) will need a way to catch return values, but everything beyond that could be done in POE::Message. Please read on before you object to this. I'm not sure it makes sense yet, but it's starting to sound good. I documented the idea, though, and I'll continue to document things as they come up. http://poe.perl.org/?Poe_design/Automatic_postbacks > postpostback is a stupid name, it exists to remove the need for an event > handler that just catches the return values and hands them over to the > postback. > i thought about storing a list context flag as well and faking that, but > it is probably not so useful as long as the usual event handler is not > preemptable. > > my question: > which place would you prefer to store return_* at ? as some more list values > in the event queue along with sender, session, ... ? > POE::Message would be good, but it doesn't exist yet and design isn't > finished as well i guess. Definitely in POE::Message. If at all possible, I would like new features to be written outside the Kernel. If they are impossible, then the least amount of code should go into Kernel.pm. Everything else should be done outside. > OT about POE::Message: > i would exclude address information or at least make it optional. these > objects might be used to communicate over established paths (like my > beloved session relations :). Components, exceptions, postbacks, POE::Message, and session relationships, as well as some other ideas, are all gradually coming together as an object layer. I finally started documenting the ideas together. Have a look: http://poe.perl.org/?Poe_design/codeless_callbacks http://poe.perl.org/?Poe_design/Object_layer Back to automatic postbacks. If you can find a way that they'll fit into the object layer scheme, that would be good. Otherwise I'm more in favor of POE::Message and codeless callbacks. I'd like to see more design discussion on the list. I think ideas will benefit from general discussion. -- Rocco Caputo / [EMAIL PROTECTED] / poe.perl.org / poe.sourceforge.net
