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

Remove Netty from the API #3659

Open
akobusinski opened this issue Jan 20, 2024 · 5 comments
Open

Remove Netty from the API #3659

akobusinski opened this issue Jan 20, 2024 · 5 comments
Labels
Feature Request Suggest a change/feature

Comments

@akobusinski
Copy link

Problem Description

Due to the fact that the current API depends on Netty, there's no easy way of integrating it with a server that uses anything other than Netty, for example Minestom that uses java.nio

Solution Description

Remove the use of Netty classes in the API. One way of doing this could be by creating a new interface that replaces the Netty channel. Same with the Netty ByteBuf.

Alternatives

No response

Additional Info

The only issue I can see with this is the fact that its a breaking change.

If you're okay with it, I can create a draft PR and start working on it.

@akobusinski akobusinski added the Feature Request Suggest a change/feature label Jan 20, 2024
@kennytv
Copy link
Member

kennytv commented Jan 20, 2024

This is something we probably have to do anyways given netty 5, but this will have to wait for a major version bump given it'd be fairly disruptive - at the moment none is planned for the near future, and as of now we don't have much reason to already do the break.

A workaround for the minestom case until then is to use ViaProxy, or to put ViaVersion on Velocity/Bungee

@Kichura
Copy link
Member

Kichura commented Jan 20, 2024

Are there other dependencies that may be deprecated in case this breaking change does occur?

@akobusinski
Copy link
Author

A workaround for the minestom case until then is to use ViaProxy, or to put ViaVersion on Velocity/Bungee

I'm aware that you can put Minestom behind a proxy, but in my opinion that's a pretty hacky workaround since you have to spin up a proxy just for that one server.

Are there other dependencies that may be deprecated in case this breaking change does occur?

I don't think there's anything else.

@0-x-2-2
Copy link

0-x-2-2 commented Jan 30, 2024

ViaVersion on the proxy unfortunately isn't a real option for us due to anti-cheat even though the versions we would allow to be translated would be very small, the changes between 1.19.x and 1.20.x or even 1.20.1 and 1.20.4 are significant enough to cause issues with anti-cheats. We did some work for this at some point of ripping netty-buffers outside of netty and wrapping NIO: https://netty.io/wiki/using-as-a-generic-library.html

@FlorianMichael
Copy link
Member

Removing Netty from the API would not only break ViaVersion but also all other projects depending on it such as ViaFabricPlus or ViaLegacy, it's something for an major version bump and this definitely won't happen just because someone wants Minestorm support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Suggest a change/feature
Projects
None yet
Development

No branches or pull requests

5 participants