[
https://issues.apache.org/jira/browse/ZOOKEEPER-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509437#comment-13509437
]
Skye Wanderman-Milne commented on ZOOKEEPER-1346:
-------------------------------------------------
Nikita, thank you for your comment. I've posted a new patch on review board
(https://reviews.apache.org/r/8094/, will post it here shortly) which makes the
server root and command URL configurable, so I don't think the /v1 prefix is
necessary -- given that it's unlikely we'll create a new API anytime soon and
that users can change the URLs to whatever they please, I think it's best to
use a simple default URL rather than the type you'd use for an actual web
service. I don't feel particularly strongly about this though so either works
for me.
I will definitely change the default URL from "command" to "commands" though (I
keep accidentally typing "commands" so it must be the right choice :)).
After giving it more thought, I'm a little wary of making the interface too
"RESTy", or at least being careful in how far we take the resource metaphor.
Commands are more like RPCs than resources, both in function and
implementation, and while we could force them into a CRUD-style
GET/PUT/POST/DELETE interface I don't think it's a natural model. Each of the
commands is different, so each would support a different set of operations with
different semantics (e.g., DELETE "stats" to reset stats and DELETE
"connections/xxx" to close a client connection -- not implemented yet but
conceivable). Also, we may add commands that aren't resource-oriented at all
(e.g., a command to restart the ZK instance).
I also like using GETs whenever possible because they're dead simple (you can
link to them!). It's certainly a very minor inconvenience to use other request
types, but in this case I don't think it's worth it given that it doesn't add
clarity to the API.
> Handle 4lws and monitoring on separate port
> -------------------------------------------
>
> Key: ZOOKEEPER-1346
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1346
> Project: ZooKeeper
> Issue Type: Improvement
> Components: server
> Reporter: Camille Fournier
> Assignee: Skye Wanderman-Milne
> Fix For: 3.5.0
>
> Attachments: ZOOKEEPER-1346_jetty.patch, ZOOKEEPER-1346.patch
>
>
> Move the 4lws to their own port, off of the client port, and support them
> properly via long-lived sessions instead of polling. Deprecate the 4lw
> support on the client port. Will enable us to enhance the functionality of
> the commands via extended command syntax, address security concerns and fix
> bugs involving the socket close being received before all of the data on the
> client end.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira