[Twisted-Python] twisted pysnmp status
Mike C. Fletcher
mcfletch at vrplumber.com
Fri Mar 30 12:57:21 EDT 2007
Justin Warren wrote:
> The performance of PySNMP (many years ago) was the main reason we wrote
> libsnmp; PySNMP seemed to have been written from a very CompSci
> perspective with full abstract ASN.1 model that gets subclassed to SNMP
> via many steps, all of which slow it down. We went for a more
> engineering approach, hardcoding lookup tables for values that never
> change for the specific ASN.1 instanciation that is SNMP, for example.
> libsnmp isn't integrated into twisted, though we do use it with twisted
> with great success in seafelt; there has been some interest in
> integrating libsnmp with twisted in recent times. libsnmp also lacks
> SNMPv3 support, only because we haven't had a need to add it yet, but
> this means it probably doesn't meet your needs.
Actually, would meet our client's needs well enough. SNMPv3 isn't a
requirement, just a small nicety for them.
> However, I am interested in both of these goals: twisted integration,
> and SNMPv3 support, so perhaps if there enough people interested in such
> an outcome we could work together to achieve it?
Looking over your code it seems like it would be fairly easy to make it
an option in TwistedSNMP. Currently TwistedSNMP has an abstraction
point that allows regular or speed-enhanced PySNMP to be used. By the
look of it a very simple wrapper module would let libsnmp provide the
(small set of) features we use (basically just encode/decode and
translation of result values to/from Pythonic values with a few "type"
operations as well (OID, EndOfMibView, that kind of thing)).
BTW, I notice that none of your code uses GetBulk (though you define
it)? Bulk operations were a *huge* speed win for our application.
Hopefully you're doing it in your real-world code.
Anyway, I'll see if there's any interest from the customer in trying out
libsnmp with the code-base. That would let me take company time to work
on integrating it into TwistedSNMP. They almost certainly don't care
enough to have it do v3 operations, but raw speed on v2 operations is
something they may care about enough to pay for a few hours of work.
Mike C. Fletcher
Designer, VR Plumber, Coder
More information about the Twisted-Python