You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/03/05 13:11:07 UTC

[GitHub] maskit commented on issue #1317: get/set API for namespace policy need to be refactored

maskit commented on issue #1317: get/set API for namespace policy need to be refactored
URL: https://github.com/apache/incubator-pulsar/issues/1317#issuecomment-370414287
 
 
   I like the proposed idea. ? 
   
   My thoughts:
   
   1) Maintainability
   Since we have many interfaces for policies (API for 3 languages, CLI, and REST), maintainability is unignorable. Replacing all individual interfaces with a simple get / set interface would absolutely improve maintainability of the code. And it would also be good for compatibility.
   
   2) Approachability
   People like code completion. From my experience, list of properties / methods are really useful especially when you use unfamiliar libraries. It tells you not only candidates, but also features you didn't know. To me, losing it would be a pain and documentation wouldn't be enough complement. However, I'd be happy if type of `policyProperty` in the proposal is `Enum` because I would be able to see the list. Of course we need to maintain the enum, but maintaining enum entries should be much easier than maintaining methods.
   
   3) Data types
   What need to be checked for a policy and the policy name should be 1:1, as far as I know. Looking up a `PolicyValidator` doesn't sound difficult to me.
   
   Nitpick) REST API
   http://restcookbook.com/HTTP%20Methods/put-vs-post/
   https://developer.github.com/v3/#http-verbs

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services