ep2p / kademlia-netty

Java implementation of Kademlia DHT using netty and abstraction layer
MIT License
0 stars 1 forks source link

Use a better design pattern for KademliaNodeServer #7

Closed sepgh closed 1 year ago

sepgh commented 1 year ago

KademliaNodeServer class has an awful design

It probably can be a decorator for KademliaDHTNode instead of having a crazy method like run(kademliaNode) Also, servers should be interfaces to have TCP, HTTP(TCP) and UDP implementations if possible, even though the focus is on TCP at the moment.

sepgh commented 1 year ago

Skipping UDP implementation. Version 0.3.2 is first release with HTTP/1.1 keep alive and connection pool support with better performance than before (using kademlia API 5.0.x).

Builder is too complex, however with filters implementation out of the way, the design is way simpler and open to extension.