mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <bmah...@apache.org>
Subject Re: Review Request 53483: Added members type/reader to `Request`.
Date Sat, 05 Nov 2016 00:54:48 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/53483/#review155033
-----------------------------------------------------------


Fix it, then Ship it!





3rdparty/libprocess/include/process/http.hpp (lines 445 - 448)
<https://reviews.apache.org/r/53483/#comment224862>

    Note that when I wrote the `http::Response` documentation, I hadn't yet added `http::Connection`
which means I only documented the server-side semantics. I should have added the client-side
semantics to the documentation when I added `http::Connection`.
    
    Given that we now have `http::Connection` and want to document both client and server
side usages of `http::Request` and `http::Response`, how about the following?
    
    ```
      // Clients can choose to provide the entire body at once
      // via BODY or can choose to stream the body over to the
      // server via PIPE.
      //
      // On the server-side, Processes setting up routes can specify
      // whether they want to process the incoming request once it is
      // complete or in a streaming manner (see `ProcessBase::route`
      // for handler options).
      enum
      {
        BODY,
        PIPE
      } type;
    ```
    
    Ideally we should commit the client-side of the documentation in this patch, and add the
server side of the documentation in whichever of your subsequent patches adds the route options.



3rdparty/libprocess/include/process/http.hpp (lines 449 - 453)
<https://reviews.apache.org/r/53483/#comment224861>

    How about we move the type related variables right below type, much like we did this http::Response?
This way it's clearer for the consumer to see how these relate:
    
    ```
      enum
      {
        BODY,
        PIPE
      } type;
      
      std::string body;
      Option<Pipe::Reader> reader;
    ```


- Benjamin Mahler


On Nov. 4, 2016, 5:55 p.m., Anand Mazumdar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53483/
> -----------------------------------------------------------
> 
> (Updated Nov. 4, 2016, 5:55 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-6466
>     https://issues.apache.org/jira/browse/MESOS-6466
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> These new members are needed for supporting request streaming i.e.,
> the caller can use the writer to stream chunks to the server if
> the request body is not known in advance.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/http.hpp 9722c6210526479da243ae9945e4c9a89ecb9009

> 
> Diff: https://reviews.apache.org/r/53483/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message