i think you need both A and B to some degree: 1) something must be extending leases (i think this is cleanest implemented as part of B, because it avoids aliasing issues where something is in the graph for such a short time that you never bump its lease), and 2) you need something (probably a thread, ie A) looking for expired leases