Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use official avro js library? #54

Open
ethanresnick opened this issue Jan 4, 2023 · 4 comments
Open

Use official avro js library? #54

ethanresnick opened this issue Jan 4, 2023 · 4 comments

Comments

@ethanresnick
Copy link

Hi! First of all, thank you for making this awesome library. I'm really excited to see the Kafka-/Avro-in-JS ecosystem getting fleshed out more w/ necessary building blocks like schema registry support. I looked through the implementation, and it seems like you've done a really nice job.

One thing I was wondering about, though, is whether you looked at the official Avro-in-JS implementation, and how it compares to the avsc package? I haven't done a deep dive on either of them, but it does seem like the official implementation is more complete (e.g., it supports recursive schemas, the uuid logical type, etc) and I assume it's probably? gonna be more complete and battle-tested than an implementation that's maintained by one developer outside of the apache foundation.

@felix-iw
Copy link
Collaborator

felix-iw commented Jan 5, 2023

Hi! I decided for avsc for the following reasons:

  • the module seems to be quite mature and well maintained, 156 version in 7 years
  • avsc is well established, more than 200.000 downloads on npmjs per week
  • I already used avsc in projects and it did work very well

avro-js on the other hand seems to be less popular, it has ~4700 downloads/week. And they created only 9 versions in 7 years.
From my understanding avsc also covers all avro features.
If you see a mismatch it would be good to have an example schema we can challenge the two solutions with.

@ethanresnick
Copy link
Author

ethanresnick commented Jan 5, 2023

Hi! I definitely see that avsc is more popular, which can be a good proxy for quality. In terms of what it's missing though, there are a number of missing Avro features listed here. You'll notice that issue's been open for almost 3 years, which makes me wonder how well maintained avsc actually is. Among the missing features seem to be:

  • Schemas w/ circular references
  • Enum default values
  • The uuid logical type
  • Single object encoding (though, if I understand right, that isn't as needed when using a schema registry)

@felix-iw
Copy link
Collaborator

felix-iw commented Jan 6, 2023

Hi! Thank again for bringing this up. I'm going to give avro-js a try.
The developer behind avsc is also an active maintainer of avro-js. I'm wondering how different the two implementations actually are.

@ethanresnick
Copy link
Author

ethanresnick commented Jan 7, 2023

Cool! I didn’t know the same person was involved with both. I’m honestly just getting started with Avro in TS/JS, so I’ll be trying it out as well over the next week or so. We’ll see how it goes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants