middleware objects local to each thread