For Programmers: Free Programming Magazines  


Home > Archive > PERL POE > July 2006 > Can POE help in this scenario?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Can POE help in this scenario?
Chris Brown

2006-07-06, 7:06 pm

Hi,

I've just started looking at POE with a view to using it in conjunction
with a workflow application. The application works with a couple of
entities; a queue for new jobs (processed in batch-mode), user requests
(processed in transaction-mode).

New jobs change state (becoming partially processed jobs) and eventually
require user input to continue being processed.

There are two types of events I can think of:
1. the 'new jobs' queue requires attention.
2. a partially processed job requires attention (initiated by user input)

I want the workflow to be shared sensibly between the two modes, i.e. a
user request should be responded to asap. What happens if a user request
comes in during batch processing. Should the batch process be
interrupted? If so, how? Also, if the batch is interrupted how should it
be picked up again? Is it possible for a user request to be seamlessly
(i.e. minimal disruption) processed during batch processing?

Is this the kind of thing POE is good for?

At the moment I have a daemon that performs the transaction-based stuff
via a socket. I'm looking at my options with regard to incorporating
batch processing. Given what I read about POE so far, I think I can uses
its networking features. Can I use POE to share one resource (the
workflow) between the two modes?

I'm still reading the docs and working my way through the mailing list
archives but I'd appreciate any feedback that helps me answer my questions.

Hope this all makes sense.

Regards

Chris
Chris Fedde

2006-07-07, 7:05 pm

On Fri, 07 Jul 2006 10:23:17 +1000 Chris Brown wrote:
+------------------
| Is this the kind of thing POE is good for?
+------------------

I don't see anything about your problem that would preclude the use of POE.
Keep in mind that POE is a cooperative multitasking kernel for perl. If
your problem is just queue management then there might be other more direct
ways to implement it.

If your problem involves event streams and processing steps and non
blocking IO would be an advantage then POE might be a good fit.

--
Chris Fedde
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com