Giter Club home page Giter Club logo

Comments (8)

Strech avatar Strech commented on July 21, 2024 2

@arttsu Thanks for your help, the #63 is in the master and will be released this week 🤝

from avrora.

Strech avatar Strech commented on July 21, 2024 1

Hey, @arttsu thanks for rising this question. In short, I think a better manual schema registration interface definitely a thing to implement, and I would mark it as an enhancement issue.

In specific auto-registration is:

  1. Not a best-practice, but more a comprehensive feature when its conventions work for you
  2. Many other features require to disable it since by design reader should never register the schema, it's a writer's prerogative
  3. AvroTurf is good with some initial ideas, but it's not a good design solution to combine encoding interface with a schema registration, I would rather split the functionalities to follow SRP

WDYT, sounds good?

from avrora.

Strech avatar Strech commented on July 21, 2024 1

Just a heads-up about schema registration, this is a sneak-peek for the upcoming functionality

I think it will not be exposed via the main Avrora module due to its specificity (I prefer to keep in Avrora only main flows about encoding/decoding), but can be used directly.

With it, your example can be rewritten as:

defp ensure_registered_schema() do
  {:ok, _} = Avrora.Utils.Registrator.register_schema_by_name(@schema_full_name, as: "#{@topic_name}-value")
end

from avrora.

arttsu avatar arttsu commented on July 21, 2024

@Strech, thanks for a thorough response! Glad that better manual schema registration would be on your radar. It would definitely be sufficient for my usecase.

from avrora.

arttsu avatar arttsu commented on July 21, 2024

Thanks for working on this, looks great! Very minor nitpick - have you considered using the name Registrar for the new module? To me it seems to be more correct (not a native speaker though, so might be wrong 😄).

from avrora.

Strech avatar Strech commented on July 21, 2024

@arttsu thanks for the name suggestion, I will definitely look for the better name 👍🏼

from avrora.

Strech avatar Strech commented on July 21, 2024

@arttsu It takes me a while, but here we are https://github.com/Strech/avrora/releases/tag/v0.16.0 it includes also an updated mix task for schema registrations. I will prepare release notes soon. Thanks for your support 🤝

from avrora.

arttsu avatar arttsu commented on July 21, 2024

Awesome! Thanks again for implementing and releasing this so quickly 👍

from avrora.

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.