I would like to solicit your insight on the best practices in handling
responses/postbacks.  Specifically, I am wondering what are the pro's
and con's of using a response event vs. a response postback.  For
example,

  $kernel->post($worker_session, $work_request_event,
                $work_response_event)

vs.

  $postback = $session->postback($work_response_event);
  $kernel->post($worker_session, $work_request_event,
                $postback);

In the various components I have surveyed (PoCoCl::DNS, PoCoCl::HTTP,
PoCoCl::Ping, PoCoCl::UA, PoCoCL::POP3, PoCo::SubWrapper), both styles
are used.

A couple advantages of using postbacks that I can think of are

1. The ability to include state arguments.
2. More generalized, i.e., it works with functions outside of POE.  

I am certain that many of you have more profound insights in the
matter.  TIA.

Pete


Reply via email to