mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Hindman" <b...@berkeley.edu>
Subject Re: Review Request 32982: Added reservation user guide.
Date Sun, 28 Jun 2015 23:39:25 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).
> 
> Michael Park wrote:
>     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.

I've dropped this issue for now since the endpoint will be done in a separate review and we
can discuss the API there. This section is marked _Coming Soon_ so we can change it once we
it's finalized. For what it's worth, however, I'm also a +1 to have the slave ID (and other
non-body POST data) in the URL path.


- Benjamin


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


On June 28, 2015, 3:33 a.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32982/
> -----------------------------------------------------------
> 
> (Updated June 28, 2015, 3:33 a.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
> -------
> 
> The Github rendered version is available [here]( https://github.com/mesosphere/mesos/blob/user-docs/docs/reservation.md)
> 
> 
> 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