API for callback-based stream a la Node.js