[Buffalo-pm] Multi-Threaded Perl...

DANIEL MAGNUSZEWSKI dmagnuszewski at mandtbank.com
Mon Jun 13 14:09:43 PDT 2005


Thanks.

I guess the real question has become: "Should I fork or multithread?
Which does Perl handle better, and which one would be a better solution
to my problem - or does it not matter which method I choose?" 

I'm doing my own research too :-) but I'm just curious to hear anyone's
else's experiences.

-Dan

>>> "Quantum Mechanic" <quantum.mechanic.1964 at gmail.com> 06/13/05 4:34
PM >>>
On *nix, the standard "dispatch to child" idiom is oft used. It's
documented in many books, papers, and articles.

For instance, in the Perl Cookbook, first edition, section 17.11
discusses "forking servers".

You might find one of the variations at
http://perlmonks.org/?node_id=301010 useful too. (Disclaimer: I
submitted one of these.)

-QM

On 6/13/05, DANIEL MAGNUSZEWSKI <dmagnuszewski at mandtbank.com> wrote:
> Yeah, I did. Wasn't really sure which way was better though. I
figured
> I'd gather my facts and compare. Thoughts?
> 
> The OS is Linux (it'll probably end up with FC3).
> 
> -Dan
> 
> >>> "Shaun Griffith" <sgriffit at gennum.com> 06/13/05 4:18 PM >>>
> Instead of multi-threading, have you thought of forking?
> 
> What OS are you on?
> 
> > -----Original Message-----
> > From: buffalo-pm-bounces at pm.org
[mailto:buffalo-pm-bounces at pm.org]On 
> 
> > Behalf Of DANIEL MAGNUSZEWSKI
> > Sent: June 13, 2005 4:09 PM
> > To: buffalo-pm at pm.org 
> > Subject: [Buffalo-pm] Multi-Threaded Perl...
> >
> >
> > Mongers,
> >
> > I am in the planning stages of writing a program that will
> > make queries
> > to a device (via SNMP), wait for a response, then do
> > something with the
> > information received (namely store it into a database), and move
on
> to
> > the next device in the list. Obviously, when having to do
> > this thousands
> > of times per a 5 minute time frame, a single threaded program can
be
> > restricted by the blocking for the I/O Requests. I figured
> > that in order
> > to maximize the speed, it would need to be multithreaded.
> >
> > My real question is whether anyone has written any multithreaded
> Perl
> > programs, along with the pluses and minuses or using Perl for
> > multithreading. Hopefully I won't have to use C or C++, in which
> case,
> > I'd probably rather bang my head against the wall. Although,
having
> a
> > high quality UB Computer Science education, it wouldn't be
> impossible
> > ;-)
> >
> > Any help or insight would be great! Thanks.
> >
> > -Dan
> >
> > _______________________________________________
> > Buffalo-pm mailing list
> > Buffalo-pm at pm.org 
> > http://mail.pm.org/mailman/listinfo/buffalo-pm 
> _______________________________________________
> Buffalo-pm mailing list
> Buffalo-pm at pm.org 
> http://mail.pm.org/mailman/listinfo/buffalo-pm 
> 
> 
> _______________________________________________
> Buffalo-pm mailing list
> Buffalo-pm at pm.org 
> http://mail.pm.org/mailman/listinfo/buffalo-pm 
>




More information about the Buffalo-pm mailing list