pekko icon indicating copy to clipboard operation
pekko copied to clipboard

Extract classical transport to dedicated modules and provide both Netty 4.1 and Netty 4.2 implementations?

Open He-Pin opened this issue 6 months ago • 12 comments

Some users are using an old version of Netty, eg, Netty 4.1.x. If the user upgrades to the new version of Pekko 1.2.x but does not upgrade other dependencies, then an error will happen...

We encounter this problem at $Work and have to exclude the Netty 4.2 dependency.

Should we split the Netty transport into two modulestransport-netty41 and transport-netty42?

refs: https://github.com/apache/pekko/pull/1794

He-Pin avatar Aug 27 '25 09:08 He-Pin

@pjfanning @mdedetrich wdyt about this

He-Pin avatar Aug 27 '25 09:08 He-Pin

  • pekko 1.1 supports netty 4.1 - users who like netty 4.1 can just simply not use pekko 1.2
  • we wouldn't make a major refactor like this in this 1.x line
  • by the time, we release pekko 2.0.0, most people will have upgraded to netty 4.2
  • netty 4.2 is not even a big upgrade - most netty 4.1 users should be able to upgrade with little or no code change

pjfanning avatar Aug 27 '25 10:08 pjfanning

Image

  1. We encounter this at $Work just now, we have to set -Dio.netty.allocator.type=pooled to avoid that, there user's Netty version is been overrided by Pekko 1.2.0-M2

He-Pin avatar Aug 27 '25 10:08 He-Pin

We can have 3 modules, pekko-remote-transport-netty-base pekko-remote-transport-netty41 and pekko-remote-transport-netty42, which only need to adust 1/2 lines of code.

He-Pin avatar Aug 27 '25 10:08 He-Pin

We can't refactor pekko like this in a minor release. Stick with pekko 1.1 until you can sort out the netty issues. You can also fork pekko and do whatever you like to the fork.

pjfanning avatar Aug 27 '25 10:08 pjfanning

Can you link the netty issue tracking this so other users can follow what is going on on the netty side?

pjfanning avatar Aug 27 '25 10:08 pjfanning

https://github.com/apache/pekko/pull/1555 , another option is backport this to 1.1.x

He-Pin avatar Aug 27 '25 10:08 He-Pin

@pjfanning can we do this in Pekko 2.0.0 ?

He-Pin avatar Aug 27 '25 10:08 He-Pin

  • we may end up dropping netty altogether in pekko 2
  • by the time pekko 2 is released (6 months or more), won't netty team have fixed their issues?

pjfanning avatar Aug 27 '25 10:08 pjfanning

  1. Extracting the classical transport will make the Pekko-remote not depend on Netty anymore, Not sure about this, Flink is still using the classical transport, I suggest we extract it to a dedicated module.
  2. Yes, but the user can have complex dependencies....

He-Pin avatar Aug 27 '25 10:08 He-Pin

One possible workaround is to use Pekko 1.2.0-M1. We haven't heard anything bad about this release. It uses netty 4.1 and has the #1555 change too.

pjfanning avatar Aug 27 '25 10:08 pjfanning

If we choose to keep the netty code in Pekko 2.0.0, I wouldn't be against putting it in a separate pekko-remote-netty module that extends on pekko-remote but has the netty specific classes. I don't think we should support multiple netty versions though (by having multiple modules, one for each netty version).

pjfanning avatar Aug 27 '25 11:08 pjfanning