[SNMP4J] Multithreaded asynchronous requests

Paul Ferreira pferreira at alaloop.com
Fri Jun 27 19:35:39 CEST 2008


Hi,

i'm trying to send asynchronous snmp get requests (in high volumes) in a multithreaded environment.

I have several questions, but the first one would be regarding the "strategy" to follow. I am not quite sure which way to go:

-use a single Snmp  instance, with a single instance of DefaultUdpTransportMapping (hence a a single listener thread for all requests) coupled with a single instance of MultiThreadedDispatcher (and his ThreadPool) to process the incoming messages.The pros would be to stay in control of the number of listening and processing threads. The cons?
-use a Snmp  instance per request, with an instance of DefaultUdpTransportMapping (hence a listener thread per request) coupled with an instance of MultiThreadedDispatcher per request , but, using a unique instance of ThreadPool for all instances of MultiThreadedDispatcher.
The pros would be to have the "safety" of a listener thread per request. The cons : as many listener threads as requests ...

What do you think? has anyone been doing this kind of thing?

Thanks in advance 

Paul






More information about the SNMP4J mailing list