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

Jim Brandt cbrandt at buffalo.edu
Tue Jun 14 04:33:02 PDT 2005


Dan,

With either approach, I'm thinking the tricky part is dealing with  
the database. For best performance, you only want to connect once,  
but if you have multiple processes contending for that DB handle, I'm  
thinking things could get messy.

Also, I would build a proof of concept with just a single program  
doing it the simple way and prove to yourself that it won't work. I  
agree that you'll probably have performance issues, but premature  
optimization can be a very bad thing. You'll feel better banging on  
the problem if you prove that it can't work the easy way.

Jim


On Jun 13, 2005, at 5:09 PM, DANIEL MAGNUSZEWSKI wrote:

>>> 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.

==========================================
Jim Brandt
Administrative Computing Services
University at Buffalo



More information about the Buffalo-pm mailing list