Re: Poco Generic - Killing the long running child

2010-08-20 Thread Josh803316
if the object is in a blocking method. It is assumed that your object won't prevent the child from exiting. If you want your object to live longer (say for some long-running activity) please fork off a grand-child. On Thu, Aug 19, 2010 at 1:33 PM, Josh803316 wrote: > I am using poco-gene

Poco Generic - Killing the long running child

2010-08-19 Thread Josh803316
I am using poco-generic to spawn a long running child. The child executes a series of test steps and then exits when it is finished. I'm running into a problem with attempting to stop/kill the long running child under the following condition. Condition: Child process connects to another device (N

PoCo::Generic ->POE::Wheel::Run generating read errors

2010-03-29 Thread Josh803316
I'm attempting to spawn long running processes using PoCo::Generic. Sometimes the processes run and sometimes they immediately stop and fail (like the trace shown below). What can cause these wheel read errors and what is the best way to clean each process up after it has finished? I've turned tr

Re: Can't store GLOB items at blib/lib/Storable.pm at /usr/local/lib/perl5/site_perl/5.10.0/POE/Filter/Reference.pm line 208

2009-12-22 Thread Josh803316
n't store GLOB items at ../../lib/Storable.pm (autosplit into > ../../lib/auto/Storable/_freeze.al) line 339, at -e line 1 > > If you choose to use something like YAML, POE::Filter::Reference's > documentation will explain how to replace Storable. > > -- > Rocco Caputo - rc

Can't store GLOB items at blib/lib/Storable.pm at /usr/local/lib/perl5/site_perl/5.10.0/POE/Filter/Reference.pm line 208

2009-12-22 Thread Josh803316
My application using Poe::Wheel::RunPoCo::TCP::Server (and Client) and Poe::Component::Generic is crashing with the following stack trace. Most notably: pid 855 STDERR: 27:ERR: Can't store GLOB items at blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/_freeze.al) line 339, at /usr/loca

Handling postback for PoCo::TCP::Server

2009-10-22 Thread Josh803316
I'm trying to create a postback event for my server ...but for some reason I'm not seeing the $session->postback('client_output') get called. I want to wait to receive a response from the $kernel->post before I respond back to the client with the returned result. I think my syntax must be wr

Re: [QSF] Re: PoCo Generic packages question

2009-07-24 Thread Josh803316
wrote: > > On 24-Jul-2009 Josh803316 wrote: > > *Hopefully this doesn't create a new thread. > > > > I figured out the problem with having access to the Packages. I need to > have > > factories methods defined so that when the return came with the blessed >

Re: PoCo Generic packages question

2009-07-24 Thread Josh803316
*Hopefully this doesn't create a new thread. I figured out the problem with having access to the Packages. I need to have factories methods defined so that when the return came with the blessed object, I had access to the object in ARG1 of the return. $heap->{$alias} = POE::Component::Generic->sp

PoCo Generic packages question

2009-07-23 Thread Josh803316
If I'm wrapping a long running module with poco generic(see below), how do I access the "packages" methods? $heap->{$alias} = POE::Component::Generic->spawn( package => 'LongRunning::Test', alias => $alias, object_options => [ 'long_run

Re: undef for @_ arglist when starting a poe session

2009-07-11 Thread Josh803316
orking now after I added my $obj = POE::Component::Generic->spawn( package => 'Wrapped::Module', # I didn't add "use POE;" inside this module which seems to have caused the problem ); On Sat, Jul 11, 2009 at 10:08 AM, Phil Whelan wrote: > Hi Josh, >

undef for @_ arglist when starting a poe session

2009-07-10 Thread Josh803316
I'm starting a poe session inside of a forked long running daemon. I'm wondering under what circumstances would the arglist passed to _start for a new session be undef: I know the $poe_kernel is running and active because I can dump it. If I try to dump $_[KERNEL] I get nothing. use POE; use POE:

Re: writing sequential code in POE

2009-06-01 Thread Josh803316
Hopefully I'm reading your question correctly but if you need a way to syncronously and sequnetially call things I believe you can use "call": http://search.cpan.org/~rcaputo/POE-1.006/lib/POE/Kernel.pm#call_DESTINATION,_EVENT_NAME_[,_PARAMETER_LIST] On Mon, Jun 1, 2009 at 8:15 AM, jorge sanchez

Re: IKC server with multiple clients....can clients communicate directly after subscribtion

2009-05-13 Thread Josh803316
27;ll post the solution to this attempt later if I follow through. On Wed, May 13, 2009 at 1:29 AM, Brandon M. Andrews < brandonmandr...@gmail.com> wrote: > Josh803316 wrote: > >> To Whom may want to Help, >> >> I have two IKC clients that publish their states to a IK

Re: IKC server with multiple clients....can clients communicate directly after subscribtion

2009-05-12 Thread Josh803316
=>'sub_event', unsubscribe => 'unsub_event', register=> 'reg_event', unregister => 'unreg_event' }); $kernel->post( 'IKC', 'publish', $alias, [$class->SUBSCRIBE_METH

IKC server with multiple clients....can clients communicate directly after subscribtion

2009-05-12 Thread Josh803316
To Whom may want to Help, I have two IKC clients that publish their states to a IKC server (each one is a separate process). I want to be able to use IKC to make both clients talk with each other once they have published their states. I tried to subscribe from one client to the other client, bu

Re: _stop state isn't called on child when parent gets Ctrl-C (EasyDBI session still active)

2009-05-08 Thread Josh803316
al question is, how do I handle this correctly..Do I handle this in the parent by looking for open sessions or do I handle this on the child side by adding signal handlers? Any and all suggestions welcome. Thanks in advance for any advice On Fri, May 8, 2009 at 5:48 PM, Josh803316 wrote: > He

_stop state isn't called on child when parent gets Ctrl-C (EasyDBI session still active)

2009-05-08 Thread Josh803316
Hello once again POE world, *I have a problem with a child daemon process not being killed when I hit Ctrl-C for the parent. All other children are reaped but one remains. This child happens to be the one using EasyDBI. *I have noticed that when I hit Ctrl-C..I don't see the _stop event calle

Re: Mapping package states with different code ref names

2009-05-07 Thread Josh803316
rt', '_stop' => '_stop', (map { $_ => '_process_request' } keys %COMMANDS) }, ($class) => { 'find' => '_process_request' } On Th

Mapping package states with different code ref names

2009-05-07 Thread Josh803316
For some reason..when I execute the find method, which should really execute the '_process_request' method the find isn't replaced with a reference to _process_request # CODE ATTEMPT # my $session = $class->__spawn({easyDBI_alias => 'easydbi_alias'}); $kernel->post('PoeDev

Re: IKC bug for client spawn?

2009-05-05 Thread Josh803316
Nick, I definitely think it might be simpler... I was hoping to be able to control the workers spawing on startup based on a passed list. I was also hoping that I could spawn a remote client to do some load sharing in the future. I would prefer to manage it all from the server startup. New clie

Re: IKC bug for client spawn?

2009-05-05 Thread Josh803316
t; "worker_error", StdoutEvent => "worker_stdout", StderrEvent => "worker_stderr", CloseEvent => "worker_close", ) or die "$0: can't POE::Wheel::Run->new"; $heap->{worker} = $chil

IKC bug for client spawn?

2009-05-05 Thread Josh803316
It appears that if you start an IKC server and then an ikc client connects to it from within the same POE::Kernel->run() then we get the following error: 23289: Remote kernel 'host.domain-4a0076da5af9' already exists 23289: Remote kernel 'host.domain-4a0076da5af9' already exists Single pr

IKC client and 'remote kernel already exists' error

2009-05-03 Thread Josh803316
I'm attempting to spawn some ikc clients when I startup my ikc server. $worker->__spawn(); I keep getting the following error on the console and was wondering what it meant 32299: Remote kernel 'servername-49fe52367e2b' already exists ###

IKC Client and deprecated functions

2009-05-01 Thread Josh803316
Hello POE world,I'm trying to create a package that will spawn IKC clients. I see that on_connect, on_error and subscribe are deprecated but all docs and cookbook programs use the deprecated examples. What would be the best way to implement my __spawn function using the ikc responder/monitor inste

Re: Loading inline states from a hash

2009-05-01 Thread Josh803316
defined &$_ } keys %{ __PACKAGE__ . "::" }; } ] ], ## pass args into _start: args => [...@_], ); On Fri, May 1, 2009 at 12:58 PM, Josh803316 wrote: > If I want to call a single session with states loaded from a hash.what > is the best way to do this? > > inline_states => [ &

Loading inline states from a hash

2009-05-01 Thread Josh803316
If I want to call a single session with states loaded from a hash.what is the best way to do this? inline_states => [ _start => sub {}, _stop => sub{}, %subs ] inline_states => [ _start => sub {}, _stop => sub{}, $key => $subs{$key} ]

Best practices for ikc post and error handling

2009-05-01 Thread Josh803316
I have a poe web server that parses ajax client requests and then calls the appropriate ikc state based on the param. I'm wondering what the typical error handling method is in this case. Should I wrap this in an eval? Should I simply check against the return value? I also thought it would be po

Re: Multiple Service Handling (IKC and HTTP/JSONRPC)

2009-04-27 Thread Josh803316
> server in one program. > > -- > Rocco Caputo - rcap...@pobox.com > > > > On Apr 27, 2009, at 20:45, Josh803316 wrote: > > I read the combined service example in the POE cookbook ( >> http://poe.perl.org/?POE_Cookbook/Combined_Services). >> >> It gave

Multiple Service Handling (IKC and HTTP/JSONRPC)

2009-04-27 Thread Josh803316
I read the combined service example in the POE cookbook ( http://poe.perl.org/?POE_Cookbook/Combined_Services). It gave me an idea to have multiple services handled from a single kernel run call. This way, I could handle an ajax request, a separate web_services request (json-rpc) as well as ikc cl

Re: Suggestions on which poe DBI module to use

2009-04-27 Thread Josh803316
Thanks for the suggestions so far!!! I think I will start with EasyDBI specially since your multi-plex code will be available :) On Mon, Apr 27, 2009 at 1:10 PM, Andrew Feren wrote: > I've been starting to implement something similar so I'd love to see this. > > -Andrew > > > Phil Whelan wrote:

Suggestions on which poe DBI module to use

2009-04-27 Thread Josh803316
I've read the cpan module docs and have looked at the cookbook example ( http://poe.perl.org/?POE_Cookbook/DBI_Helper_Processes). The following modules all run non-blocking async dbi calls for poe but I'm not sure which I should choose. I would love to see a pro/con list for these or get some sort

Application design with IKC (worker ping)

2009-04-23 Thread Josh803316
I'm still trying to wrap my mind around POE which is quite new to me, and how to create a large application with a controller and several workers (where each worker also acts as a controller with several workers underneath). I've started my design with a very simple worker ping module. Is the fol

Re: Handling Dynamic Children (Workers) without restarting the poe ikc server

2009-04-21 Thread Josh803316
n. Then > the server can access it like a local session. I am guessing you need > to invert your thinking. The workers do the connecting. The server just > listens. Then when a test needs to be run, the server will then post() > an event to which ever worker it choses. > > On Tue,

Handling Dynamic Children (Workers) without restarting the poe ikc server

2009-04-21 Thread Josh803316
If I have a POE control server that manages multiple workers using IKC to communicate, how would I handle adding another worker to the group dynamically. I'm trying to create a plug and play type environment where I could potentially add a new worker module to the group of managed workers without

Re: Automating network testing with POE (web services IPC)

2009-04-20 Thread Josh803316
st an idea. I just > don't see the benefit of including some mythical event of > reimplementing a component into your design. If you are reimplementing, > you are likely redoing the whole approach anyway, so this becomes a > moot point. > > On Mon, 20 Apr 2009 18:46:21 -0700 > J

Re: Automating network testing with POE (web services IPC)

2009-04-20 Thread Josh803316
Nick, thanks for the help. IKC seems great for most of this.what about the future if I wanted to swap out a a perl worker for a C worker? Would I use JSONRPC instead of IKC for my communication? Would it be easy to mix/match? On Mon, Apr 20, 2009 at 5:47 PM, Nick Perez wrote: > It really so