Giter VIP home page Giter VIP logo

Comments (4)

granders avatar granders commented on May 9, 2024

RestUtils is also duplicated

from schema-registry.

granders avatar granders commented on May 9, 2024

@junrao @nehanarkhede
Neha and I discussed this a bit on Friday and came to the conclusion that there are actually two distinct functions of the Schema class

  • one is as a wrapper for the data that is returned to users on a GET schema request
  • the other is as a wrapper for data that is put into the kafka store

While the structure is currently identical, the class should not be shared for these two distinct purposes - so the preferred solution to this issue is to actually split into separate classes with less ambiguous names.

from schema-registry.

ewencp avatar ewencp commented on May 9, 2024

Adding some notes since I think discussion in other issues are assuming the fix for this issue is going to resolve a number of issues that have arisen as we've discussed how code is shared among the different modules. It increasingly sounds like this issue is now being treated as "Clean up the separation between the client and core modules".

  1. A lot of code sharing issues are also causing us to pull in Jersey dependencies into the client module. Pulling in Hibernate for validation is fine, but most other stuff like WebApplicationException don't make sense.
  2. RestUtils is duplicated, and also uses WebApplicationException to pass along errors. This needs to be replaced because, as added in a comment in #98, it's just a hack that happens to make it easy to pass along responses from forwarded requests, but in practice ends up losing information (since it's throwing WebApplicationException rather than something more specific like RestException). Since RestUtils is used in client, it'll need some other exception which can pass along all the necessary info., Then, for uses in core where the response should be forwarded we'll need to convert it back.
  3. Other exceptions in client should not be extending WebApplicationException.
  4. There are some duplicated exceptions between client and core. It appears the ones in core are no longer being used and should probably be cleaned up, unless it turns out we need RestException versions for core and non-RestException versions for client.

from schema-registry.

junrao avatar junrao commented on May 9, 2024

Committed to master.

from schema-registry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.