On Thu, 11 Nov 2010 08:04:18 +0200 Timo wrote:
TT> On 11/11/2010 05:32 AM, Robert Story wrote:
TT> > I'd vote for 2. You'd just have to disable the cache reload at the higher
TT> > levels (there are some flags that can be set when the cache is created) 
and
TT> > keep the cache consistent via netlink.
TT> 
TT> I was actually wondering if option 1, or some sort form of it would be
TT> the best. See below. (Sounds like option 2 would require reimplementing
TT> the MIB with to be direct access style.)

<sigh>.  My brain said option 1, but for some reason my fingers typed 2.

TT> Right. I'd assume the RightThing(tm) is to on first MIB request to do
TT> full load and start listening changes, and after a timeout stop
TT> listening changes. We'd have then fully dynamically working system.

sounds good, as long as the listening part is optional.

TT> I'm wondering if I can do the following with the cache_handler:
TT>  1) on container_load we do full dump as usual, but also register for
TT> the netlink events for changes (using register_readfd() external fd
TT> handling) and finally a timer to unload cache/stop listening netlink

The cache already has a timer, so that can be reused.

TT>  2) on each of _get operations reset the "monitoring stop timer"

A new cache helper flag could be added to bump the cache expiration timer. I
don't think a separate monitoring timer would be needed.

TT>  3) on netlink socket callback just go and directly update the local
TT> cache container using the regular CONTAINER_*

Yep. You just have to have a way to get a hold of the cache. Another option is
to simply queue the netlink messages and not do any cache modifications until
a request comes in. This could be anew generic facility added to the cache
helper: cache updates, in addition to simply loading and flushing. The updates
could be immediate or delayed, and there could be thresholds for simply
triggering a flush and reload if too many updates come in...

------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to