Github user andrewor14 commented on the pull request:

    https://github.com/apache/spark/pull/4216#issuecomment-72788602
  
    Thanks everyone for your comments. It seems that the main common concern is 
that this protocol does not follow conventions expected in other REST 
protocols. As of the latest commit, I have addressed this (hopefully) by making 
the following changes. First, the actions now map to the following URLs and 
request methods:
    ```
    submit - POST /submissions/create (parameters specified in JSON body)
    kill - POST /submissions/kill/driver_123
    status - GET / submissions/status/driver_123
    ```
    Although the initial suggestion was to use `DELETE` for kill, doing so 
actually does not reflect a good use of `DELETE` because we're not removing any 
resources without side effects.
    
    Second, I introduced protocol versioning and included this in the URL. For 
instance, a complete URL now looks like 
`http://1.2.3.4:6066/v1/submissions/create`. A different version here means we 
break backward and/or forward compatibility between the client and the server, 
which is expected to almost never happen, however, because this is intended to 
be a stable submission API.
    
    I also spent some time investigating the use of a JAX-RS framework like 
Jersey but ultimately decided against it because it introduces many 
dependencies. Also, although I agree that it hides a lot of path handling 
details and is much nicer in terms of code readability, it doesn't actually 
save us many lines since much of the server code actually involves 
Spark-specific details.
    
    Please let me know of any new or old concerns that I have not addressed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to