[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-4835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17849897#comment-17849897
 ] 

David Smiley commented on ZOOKEEPER-4835:
-----------------------------------------

I attempted to conclusively confirm how viable excluding Netty might be.  I 
came upon ArchUnit[1] and wrote a little test[2] to look for ZK classes that 
don't have Netty in the name yet call such a class or that which call Netty 
directly.  The results show X509 utilities are intertwined with Netty.  And 
furthermore the methods ZooKeeper.getClientCnxnSocket and 
ZooKeeperServer.getOutstandingHandshakeNum and 
UnifiedServerSocket$UnifiedSocket.detectMode() refer to Netty.  Thus it seems 
not safe to exclude Netty today but if the ZK project wanted to invest in 
better separation, it seems close at hand.

[1] ArchUnit: https://www.archunit.org/
[2] my test: https://gist.github.com/dsmiley/8a34cf16dd5827e5396e6da24e19afd2

> Netty should be an optional dependency
> --------------------------------------
>
>                 Key: ZOOKEEPER-4835
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4835
>             Project: ZooKeeper
>          Issue Type: Improvement
>            Reporter: David Smiley
>            Priority: Major
>
> ZK should not mandate the inclusion of Netty if Netty features aren't being 
> used.  There are very few usages of Netty from ZK files that are not named 
> Netty, so this looks pretty easy.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to