Re: POE HTTP server with WebSocket channel

2013-12-13 Thread Nick Perez
Hey Guido, I am the author of those modules. And yeah, they are broken and experimental. I was attempting to create an unholy amalgamation of MooseX::Declare and POE. It was an abomination that needed to be killed with fire. I should make sure I clean up those modules. That said, I had started

Re: poe and amqp/rabbitmq as a worker manager

2013-03-15 Thread Nick Perez
None of this sounds particularly difficult, just a SMOP. The interesting bits aren't getting the job server up and running. What will be interesting is scaling the server. Am I correct to assume that the workers now directly pull from the queue? And then you would be changing that to a single

Re: alarm function under while loop

2012-11-02 Thread Nick Perez
On Fri, 2 Nov 2012 13:12:58 +0530 Gokul Prasad nhgokulpra...@gmail.com wrote: Hi, snip_giant_mess/ Can you nopaste a complete (non)working test case? Trying to help you debug this piece meal isn't working. Also, explain what it is you are trying to achieve? Perhaps you do not need to do

Re: POE, log4perl and sqlite

2012-10-15 Thread Nick Perez
On Mon, 15 Oct 2012 10:11:32 +0300 Antti Linno antti.li...@gmail.com wrote: 1) Do POE's sessions run in parallel? Not unless you are forking. 2) Does POE::Component::Log4perl cure this problem? Unknown. We need to see some code. I could speculate on a number of things potentially causing

Re: catching exceptions?

2012-04-18 Thread Nick Perez
On Wed, 18 Apr 2012 15:57:27 +0300 Gabor Szabo ga...@szabgab.com wrote: How am I supposed to catch exceptions? Please see Exception Handling in POE::Kernel. -- Nicholas Perez XMPP/Email: n...@nickandperla.net https://metacpan.org/author/NPEREZ http://github.com/nperez

Re: How to debug POE based app and find memory leak

2012-04-11 Thread Nick Perez
On Wed, 11 Apr 2012 11:33:53 +0300 Gabor Szabo ga...@szabgab.com wrote: Hi, I have written a small POE script fetching web pages but it is leaking a lot of memory. I wonder if you could give me advice how to track down this memory leak? In a more generic question, are there special

Re: Multiple LWP::UserAgents at the same time

2012-04-03 Thread Nick Perez
On Tue, 3 Apr 2012 16:57:59 +0300 Gabor Szabo ga...@szabgab.com wrote: my $ua = LWP::UserAgent::POE-new(timeout = 10); my $response = $ua-get($url) ; At first glance without reading the documentation to this module, I would say that this is wrong. Fetching the $url

Re: Modules depending on different event loops in the same POE app?

2011-08-21 Thread Nick Perez
It would probably make sense to run the RCU in a child and have it push events over the pipes of POE::Wheel::Run. Not as monolithic that way, but then you could generalize what kind of interface those two pieces use to chat. At that point you could then replace the RCU part with anything else that

Re: POE::Session major bug.

2011-04-08 Thread Nick Perez
I do believe this is indeed a bug, but not in POE::Session. It seems the GC semantics have changed somewhat and call() specifically invokes a GC sweep in the cases where a return value is expected from an event. I think this behavior is wrong (and I may have been the ultimate reason this behavior

Re: POE and DBI database question

2011-02-17 Thread Nick Perez
When the pre-packaged POE+DBI solutions don't work for you, you can always spin up a child that talks to you via STDIN/STDOUT using POE::Wheel::Run and performs the various DBI actions on your behalf. Then define a simple command/reply interface using dumb hashes and something like

Re: Session lifetime issue (post on behalf of)

2010-03-09 Thread Nick Perez
On Tue, 9 Mar 2010 09:59:30 -0800 Zero Hero zeroh...@qoobly.com wrote: I'm trying to solve a common problem which occurs when I'm using PoCos. The crux of the issue is that a session doing a post to a PoCo, needs to stay alive for work done by a secondary post by that PoCo. Consider:

Re: Execute Jobs parallel using JobQueue

2009-12-03 Thread Nick Perez
On Thu, 3 Dec 2009 22:37:37 +0800 Ryan Chan ryanchan...@gmail.com wrote: On Wed, Dec 2, 2009 at 2:56 PM, Nick Perez n...@nickandperla.net wrote: On Wed, 2 Dec 2009 12:42:34 +0800 Ryan Chan ryanchan...@gmail.com wrote: If I goes with the fork solution, any abstraction recommended

Re: Execute Jobs parallel using JobQueue

2009-12-01 Thread Nick Perez
On Wed, 2 Dec 2009 12:42:34 +0800 Ryan Chan ryanchan...@gmail.com wrote: If I goes with the fork solution, any abstraction recommended? I don't want to scare you off, but I can also suggest POEx::WorkerPool. -- Nicholas Perez XMPP/Email: n...@nickandperla.net http://search.cpan.org/~nperez/

Re: run an interactive command using POE::Wheel?

2009-09-26 Thread Nick Perez
On Sun, 27 Sep 2009 10:59:48 +0800 woosley. xu. redic...@gmail.com wrote: $_[KERNEL]-sig_child($pid, got_child_signal); This is your problem line. Remove '$pid,' from the double quotes. -- Nicholas Perez XMPP/Email: n...@nickandperla.net http://search.cpan.org/~nperez/

Re: IKC bug for client spawn?

2009-05-05 Thread Nick Perez
On Tue, 5 May 2009 10:34:53 -0700 Josh803316 josh803...@gmail.com wrote: 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

Re: IKC bug for client spawn?

2009-05-05 Thread Nick Perez
= worker_stderr, CloseEvent = worker_close, ) or die $0: can't POE::Wheel::Run-new; $heap-{worker} = $child; return $child; } On Tue, May 5, 2009 at 3:41 PM, Nick Perez n...@nickandperla.net wrote: On Tue, 5 May 2009 10:34:53 -0700 Josh803316 josh803

POE + Moose

2009-04-28 Thread Nick Perez
So I had some expectations out of EC's effort, but doesn't look like the path being taken is one I necessarily want to follow. But it did give me some ideas on integrating POE and Moose. So I spent some time looking through various POE::Session implementations: strengths, weaknesses, and raw

Re: Application Configuration Across Sessions

2009-04-25 Thread Nick Perez
On Fri, 24 Apr 2009 19:32:11 -0500 johnr jo...@wowway.com wrote: Hello, What is the POE way of accessing application configuration across sessions? I was working with Config::General (storing config info in a session's heap). However, that is not accessible by other sessions. What is

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

2009-04-20 Thread Nick Perez
It really sounds like you need to segregate the webapp from the actual daemon. And with that, you do not need to run POE within mod_perl (not that you could anyhow). But you obviously need POE communication between the web server and the POE daemon. So I recommend using

Re: which http server to use

2004-09-14 Thread Nick Perez
Don't get me wrong, POE and perl in general is really fast considering that with a 800MHz Duron (I have ancient hardware, I know) I was able to manage 45+ requests per second, including streaming, against a database backend (SQLite) with my own home grown http server that incorporated

Re: POE::Component::Jabber shoud support MUC

2004-09-13 Thread Nick Perez
You are more than welcome to write an MUC module that makes use of the tools available in PCJ, but PCJ itself is only a transport mechanism. We are only building a connection broker. What you want to do with the connection after it is established is beyond the scope of the project. joe jiang

Re: POE XML TCP Design

2004-09-05 Thread Nick Perez
You should definitely use POE::Filter::XML. This is a shameless plug for my own code, but it really solves the problem of implementing a push parser that gives you meaningful chunks of data (POE::Filter::XML::Nodes) from which you can process. If you have any questions please let me know.

[Fwd: Re: [PATCH] sslpoe-sanity-patch]

2004-08-21 Thread Nick Perez
Oops. Reply went to Rocco but not the list: here it is. -- Nick ---BeginMessage--- I guess I should have sent my changes upstream which are in fact the very same changes here. I use this in PoCo::Jabber::Client::XMPP and also in Server::XMPP but adapted it for my own uses. I am not offering to

Re: POE scalability vs. forking

2004-07-06 Thread Nick Perez
From my own experience using ithreads versus POE with Wheel::Run and without Wheel::Run with similar scripts that slam a server for requests with a uniprocessor machine, there isn't much difference other than POE provides a framework and some pretty slick pre-built components from the

Re: Trouble with POE::Filter::XML

2004-05-06 Thread Nick Perez
Reply to me off list and I'll help you out :) I am the author Aaron Craig wrote: Hi all. I would desperately love to use POE. All of the introductory material makes it sound like just the sort of thing I need. A bit of background. I'm writing a simple IRC chatbot script as a favor to a