Some utilities for implementing combined rest and realtime APIs