A toolkit for building realtime APIs