(Opps, hit send before I was done) Sorry for the late response, I've been disconnected from the internet for 2 days (RCN :(
When one uses wheel::run the processes are independent and asynchronous? But when one uses sessions they are serial? > I would use POE::Wheel::Run to start with. Spawn off the database > poller to a separate process (it's probably the only way to cooperate > with Class::DBI at the moment). Can you explain, why its the only way to cooperate with Class::DBI? I'm currently using sessions with Class::DBI, and things seem to be working Lastly, is there anyway to have async non-blocking poe without using Wheel::Run? Thanks Jay ----- Original Message ----- From: "Rocco Caputo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, November 29, 2003 1:08 AM Subject: Re: polling a database > On Fri, Nov 28, 2003 at 06:23:57PM -0600, Jay Strauss wrote: > > Hi, > > > > I'd like to write a little poe script that will query a database table. I'm > > using Class::DBI. I saw some prebuilt components that use plain old DBI, > > but thats not really what i want. > > > > I'd like to do something like: > > > > - connect to some external server > > - read table continously (maybe once a second) > > - if I find something interesting in the table talk to the external server > > - meanwhile, do some other stuff with the external server > > > > and I want to poll the database till I cancel the program > > > > But I'm having sort of a hard time getting started. Are there any examples > > of something like this I can look at? > > > It would inject messages back into the parent POE process as data > becomes available. The parent would also be connected to the external > server. As database messages arrive, they're used to trigger actions > with the external server. > > The client in the parent process can also react to server messages, as > well as timers and other things. > > http://poe.perl.org/?POE_Cookbook has examples of managing child > processes and talking to external servers. Your application might start > out as a combination of two or more recipes. > > -- > Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/ > >
