[jira] [Commented] (ZOOKEEPER-4835) Netty should be an optional dependency

2024-05-28 Thread David Smiley (Jira)


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

David Smiley commented on ZOOKEEPER-4835:
-

Note that TLS can be achieved completely independently via Mesh/Istio.
{quote} that the zookeeper client really works without any Netty
{quote}
It's not clear how to make a "client" vs "server" distinction within the 
codebase to enforce that it's okay for the "server" to talk to Netty but not 
the "client".  Plenty of packages are in common (utils).  Anyway, as the 
ArchUnit test shows, it's really pretty close to making a class name based 
distinction of which classes can talk to Netty.  

> 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
> Attachments: zk-netty-violations.txt
>
>
> 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)


[jira] [Commented] (ZOOKEEPER-4835) Netty should be an optional dependency

2024-05-28 Thread Enrico Olivelli (Jira)


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

Enrico Olivelli commented on ZOOKEEPER-4835:


I think that this is doable.

That said when you use TLS you need Netty and I am pretty sure that many users 
are using TLS.

 

I think that the main value is to have something that ensures that the 
zookeeper client really works without any Netty class in the classpath. It is 
possible that in the future someone uses some utility from Netty.

 

 

> 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
> Attachments: zk-netty-violations.txt
>
>
> 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)


[jira] [Commented] (ZOOKEEPER-4835) Netty should be an optional dependency

2024-05-28 Thread David Smiley (Jira)


[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-4835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)