mqliang edited a comment on pull request #6811:
URL: https://github.com/apache/incubator-pinot/pull/6811#issuecomment-827016380


   LGTM. 
   
   I have a generic question which is not related to this PR. I observe there 
are bunch of pre-processing logic for a request:
   * authz/authn
   * admission control (e.g. disallow user to create new segments if existing 
number of segments exceed a threshold. We don't have this logic yet, but it's 
useful and may be added in future)
   * request validation (validate schema, etc) 
   * request rewriting( e.g. this PR rewrite request by normalizing LHS and RHS 
for numerical types)
   * log and audit.
   
   Now all those logic are put into BrokerRequestHandler, which is a little 
messy and hard to maintain. Ideally, we should use HTTP middleware to decouple 
those pre-processing/post-processing logic from the actual query processing 
logic.  Most web framework provide such a HTTP middleware mechanism out of box, 
the HTTP library ***JAX-RS*** we use also provide similar mechanism: [Filters 
and 
Interceptors](https://dennis-xlc.gitbooks.io/restful-java-with-jax-rs-2-0-2rd-edition/content/en/part1/chapter12/filters_and_interceptors.html)
   
   cc @mcvsubbu  @siddharthteotia @Jackie-Jiang


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to