mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Park" <mcyp...@gmail.com>
Subject Re: Review Request 32982: Added reservation user guide.
Date Fri, 26 Jun 2015 20:42:55 GMT


> On May 13, 2015, 10:25 p.m., Marco Massenzio wrote:
> > docs/reservation.md, line 71
> > <https://reviews.apache.org/r/32982/diff/1/?file=921006#file921006line71>
> >
> >     this seems to imply that in the Request, the `slave_id` is some part of a "form"
submission:
> >     ```
> >     -d, --data <data>
> >          (HTTP) Sends the specified data in a POST request to the HTTP
> >          server, in the same way that a browser does
> >          when a user has filled in an HTML form and presses the submit
> >          button. This will cause curl  to  pass  the data to the server
> >          using the content-type application/x-www-form-urlencoded.
> >     ```
> >     
> >     IMO the API should instead carry the `slave_id` either as part of the URL (`/reserve/slave_id/1234-xyz`)
or part of the JSON body:
> >     ```
> >     {
> >         "slave_id": "1234-xyz",
> >         "resources": {
> >                "name" : "cpus",
> >                "type" : "SCALAR",
> >                "scalar" : { "value" : 8 },
> >                ...
> >         }
> >     }
> >     ```
> >     Also, we need to be sure that the `Content-Type` is set accordingly (`application/json`)
> >     
> >     The same for all the other endpoints.
> 
> Cody Maloney wrote:
>     I think just having it all be in the request body is more like how Mesos does all
the rest of it's endpoints currently.
>     
>     For the HTTP API version would be nice to do JSON, but the current protobuf/http
Mesos APIs currently they all work on the "form encoding" thing which is a standard (Although
mesos only implements a specific subset of it with some quirks).

Marco, thanks for mentioning the concerns here.

I think the API I described here is consistent with how existing APIs work such as `/teardown`.
I think your proposal is that we change the API for all the endpoints, based on:
> The same for all the other endpoints.

Let's create a JIRA ticket for this and tackle it as a separate task.


- Michael


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


On June 26, 2015, 8:35 p.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32982/
> -----------------------------------------------------------
> 
> (Updated June 26, 2015, 8:35 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Jie Yu, and Timothy Chen.
> 
> 
> Bugs: MESOS-2205
>     https://issues.apache.org/jira/browse/MESOS-2205
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   docs/reservation.md PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/32982/diff/
> 
> 
> Testing
> -------
> 
> Documentation.
> 
> 
> Thanks,
> 
> Michael Park
> 
>


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