Pave the way for a simpler streaming API
Use duplexer to simplify streaming API