Data flow example using shared_ptr