removed debugging cruft, added README and stub headers for standalone testing
[fb-resolver] / README
1
2 This began as a cleanup of a few startling bugs in resolver.c, but I encountered so many other endemic issues (IMO) along the way that I just started from the top and groomed everything on my way through. Apologies if the style doesn't quite match the rest of the codebase, but I hope it's at least a little easier to follow.
3
4 The resolver is still architected the same as the original (id est, a group of threads, all feeding from a common input stream in turn, resolving their data and responding independently before repeating), but it strives to do the things it does a little more correctly.
5
6 I've probably screwed up portability somewhere, and it may now require a non-vintage compiler.
7
8
9 Major fixes:
10
11 * locking. original had none around its core data structures (!)
12 * functions no longer harbor static buffers (!)
13 * non-blocking IO is more resilient
14
15
16 Other changes:
17
18 * uses modern socket framework
19 * can cache successful lookups as well as failures
20 * cache lookups are now less than linear
21 * uses native stdio locking
22
23
24 Possible future improvements to consider:
25
26 * track more internal data, dump stats on a signal
27 * make the threadpool dynamically sized
28 * use a different work-queue model entirely
29