On Fri, Aug 27, 2004 at 10:02:41AM +0200, Fallmann, Daniel wrote:
> Hi Robert,
> 
> so I got you with the AgentX dispatching. Well, if the dispatching is already
> done, the request is processed in the subagent's process space (but it is
> processed there in a sequential way). 
> 
> The problem we see and want to address is that the subagent nowadays can
> register OIDs and handle these OIDs only in a sequential way and not
> parallel with multiple threads living in the subagents process space.

Well, you could use multiple instances of the library so that eeach thread
creates it's own connection to the master agent, but then I do think there is
some shared resources (agent_registry and subagent connection for instance)
that must be removed in order to do that.

On a second level I think you could try to make it possible to crete multiple
sessions in different threads within one agent, this means that the
communications code must be able to handle concurrent writes somehow.

On the third level there is the question of letting different threads handle
different registrations. Here I would guess that it is better to have one
dispatching thread that handles communication with the master agent and then
you could issue jobs to worker threads that take care of fetching of values,
but this doesn't feel like a job for the snmpd library.

> I mean you can not have multiple threads within your subagents process space
> working in parallel (especially register OIDs first parallel) and answer
> requests parallel. Of course one possible solution I see but this one is not
> really applicable, is that you register just a few number of OIDs (e.g. 1-50)
> in each subagent and therefore have lots of subagents.
> 
> So we would like to make the subagents OID handling multi-threaded, so that
> the subagent can do a parallel job.

I think some more detail need to be provided here - what part of it do you want
to make multithread-aware?

> I hope you see the problem the same way we do and furthermore we hope it's a
> worthwhile task we try to do over here.

It's an interesting task but I can't see the problem as I tend to look at SNMP
request handling as something exceptional - the normal state for an
application is to muddle on with the task at hand.

/MF

> 
> -----Urspr�ngliche Nachricht-----
> Von: Robert Story (Coders) [mailto:[EMAIL PROTECTED] 
> Gesendet: Donnerstag, 26. August 2004 18:56
> An: Fallmann, Daniel
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Betreff: Re: How to make Net-SNMP threadsafe
> 
> On Thu, 26 Aug 2004 10:14:25 +0200 Fallmann, wrote:
> FD> We don't want to make all the mibs already implemented thread-safe. 
> FD> What we would like to do is to make AgentX and the Masteragents
> FD> AgentX-dispatching multi-treaded and indeed we are already writing a
> FD> document referencing the code areas that are critical for AgentX
> FD> dispatching in a multi-threaded way.
> 
> I'm not sure what you want to change. AgentX sub-agents run in their own
> process space. When a request comes in for a sub-agent, that request is sent to
> the sub-agent, and the master agent can process other requests while waiting
> for the response. The actaul dispatching to the sub-agents should be fairly
> quick, so I don't see any advantage in making it multi-threaded.
> 
> So, if you have multiple (independent) tables, and want to be able to do work
> for each table at the same time, simply create a separate sub-agent for each
> table.
> 


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to