[tmp-sample] Wrapping the middleware in more of a bidi-like way