[ https://issues.apache.org/jira/browse/SOLR-16347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17581951#comment-17581951 ]
Jason Gerlowski commented on SOLR-16347: ---------------------------------------- I've taken a crack at this in the draft PR [here|https://github.com/apache/solr/pull/975]. A lot of the initial hurdles have been cleared away: per-core loading of APIs, Solr authc and authz support, etc without requiring _too_ much integration code (IMO). Two example APIs have been converted over to JAX-RS: {{GET /api/cluster/configs}} (an "admin" API) and {{GET /collections/collName/schema/name}} (a "core" API). That said, the PR is still very much a "draft", and many TODOs still remain, namely: * add "dev-docs" on our Jersey integration, how to debug problems, etc. * add ExceptionMapper's for SolrException and other "known" types * test different response formats (what response formats do we want v2 to support?) * sanity-check performance test on Jersey APIs * sanity-check cores-per-node scaling unaffected by Jersey integration * check memory footprint of Jersey's "ApplicationHandler" * double-check for off the shelf code to convert Jetty<->Jersey request/response classes * unit tests for jersey-ified APIs * tests and precommit I plan to start working down this list, adding to the PR linked above as I go. > Add JAX-RS integration for defining v2 APIs > ------------------------------------------- > > Key: SOLR-16347 > URL: https://issues.apache.org/jira/browse/SOLR-16347 > Project: Solr > Issue Type: Improvement > Security Level: Public(Default Security Level. Issues are Public) > Components: v2 API > Affects Versions: main (10.0) > Reporter: Jason Gerlowski > Priority: Major > > SOLR-15182 rewrote our v2 APIs to use annotations using an existing > (in-house) framework. But continuing to use a homegrown framework is less > than ideal for a few reasons: > # Our in-house framework doesn't integrate with 3rd-party tooling like > OpenAPI. > # It gives us less functionality than many off-the-shelf frameworks, at a > higher maintenance cost. > # The current framework is less explicit about API inputs and outputs than > many off-the-shelf alternatives, making code less clear and readable for > developers. > (For more on the pros/cons and for different evaluations on the tradeoff > here, see > [this|https://lists.apache.org/thread/6wx2vzfnmfgkw03b7s450zfp7yhrlz8f] > long-running dev@ thread.) > The work done by SOLR-15182 makes the jump to JAX-RS reasonably > straightforward on an individual API basis: once the framework is in place > switching a given API to JAX-RS is mostly a matter of swapping out our > homegrown annotations for those recognized by JAX-RS and changing API method > signatures to better represent the API inputs/outputs. > We should integrate Jersey or a similar JAX-RS implementation and start > cutting over v2 APIs to this new mode of definition. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org