[client-v2] Native Protocol: Handshake, Ping
Describe the bug
Client V2 should support Native (on top of TCP) protocol.
TBD: More details description
A basic question for native protocol implementation: are you going to use BIO or NIO?
Good day, @pan3793 ! I have no exact plan for the native protocol. We will try to use most optimal approach for native as well as for http. In general, yes, we will use NIO and NIO2 where possible.
From my previous experience, NIO might be challenge. When bytes arrive in the socket recv buffer, it fires the callback method to decode the CH packet, but CH native protocol has no cheap way to detect if a packet(frame) is completed or not, the only way is to try the best effort to decode ...
@pan3793 I'm thinking to utilize netty for such things and I agree it might be a problem with buffers. However you may predict them well and minimize time of finding a frame.
I did try to implement it using Netty and found such problems.
However you may predict them well and minimize time of finding a frame.
Looking forward to your implementation.