The core functionality of Super Sparrow, including the ability to communicate with route servers is encapsulated as a library, libsupersparrow. Breaking this code out into a library allows flexibility to make the algorithm available to a variety of applications.
The library is able to manage connections to multiple route servers and multiple connections to a single route server. In the latter case, connections are cached such that if multiple connections to a route server are requested a single connection will be opened and shared. This avoids the possibility of exceeding the maximum number of connections a route server will accept.
Results read from route servers may be cached to increase performance and avoid placing excessive load on route servers. The implementation of this is quite simple. Results are stored in a self reordering linked list. Queries to the cache search through the list sequentially and if a result is found it is moved to the front of the list. The number elements and the timeout for elements in the cache is configurable. Though simple, the cache yields a significant performance increase, if successive queries are received for the same IP address.
The library also manages the relationship between the AS numbers of POP and their IP addresses or hostnames. This enables the library to determine if the prefered prefix for an address, as returned by a route server, includes the AS number of a peer and if so the IP addresses or hostnames that should be returned accordingly.
Two aplications that link against libsupersparrow have been written: mod_supersparrow a driver module for Dents to allow Super Sparrow to be tied to the DNS for a domain, and supersparrow a standalone utility that may be used for testing and tying Super Sparrow to aplications that can communicate over standard I/O. The latter may be used in conjunction with Apache's mod_rewrite to tie Super Sparrow directly to Apache.