I need to let the user to manage a device by SNMP and/or HTTP, as he 
wants.
HTTP would be nice for local complex configuration (i.e., during the 
first-time installation); SNMP is the best for remote and centralized 
management of many devices from different manufacturers.
Of course I need a SNMP agent and a web server.

Surely I'll use Net-SNMP for the SNMP agent. I'm deciding for the web 
server.

Anyway, I wonder how these two applications can live together sharing 
most of the variables. Ok, no problem to run two applications on the 
same linux box, but how they can share the variables?

Net-SNMP gives the developer many helpers that helps to retrieve 
variables from the field (in my case, by a communication on RS232 
port). I'm thinking of cache_handler helper or similar. But the 
variables retrieved remains in the agent area and they can't be read 
by the web server (another application).

Now I'm facing two possibilities.

Write an application that retrieve data from the field (by RS232) and 
maintains the variables in a shared memory area that can be accessed 
by Net-SNMP agent and by web server.
In this case I need to rewrite the "cache_handler" mechanism.

Use the cache_handler helper to retrieve and maintain updated the 
field variables inside the SNMP agent and use SNMP GET/SET on 
loopback (127.0.0.1) to create a communication between web server and 
agent. In this case I reuse the "cache_handler" mechanism, but I'm 
worried about the latency of the web server (that needs to request 
data from SNMP agent, a complex task).

What do you think about that? There could be a simpler and more 
effective solution to my problem?

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to