-
Notifications
You must be signed in to change notification settings - Fork 30
Conform RedisByteDecoder to NIOSingleStepByteToMessageDecoder
#63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
API breakage tool flags false positives: As stated above:
|
|
@fabianfett isn't the change from |
ff608c9 to
f1dbb64
Compare
@Joannis Great catch! Fixed! |
|
Only expected false positive changes as of now: |
Cherry pick of:
https://gitlab.com/swift-server-community/RediStack/-/merge_requests/185
Motivation
Traffic on the
NIOChannelPipelineis not free, because of this recent NIO projects try to reduce the number of needed handlers for a given protocol. For example NIOSSH and NIOHTTP2 parse incoming bytes in the main ChannelHandler rather than within a dedicated DecoderHandler. To make this pattern easier theNIOSingleStepByteToMessageDecoderwas introduced into NIO. TheNIOSingleStepByteToMessageDecoderallows users to have an explicit decoder object within their main channel handler, that has the same semantics as theByteToMessageDecoderin the channel pipeline. A usage example can be seen here:https://github.com/vapor/postgres-nio/blob/main/Sources/PostgresNIO/New/PostgresChannelHandler.swift#L102
To allow us to move the
RedisByteDecoderinto theRedisChannelHandler, let's conform it toNIOSingleStepByteToMessageDecoder.Changes
Conform
RedisByteDecodertoNIOSingleStepByteToMessageDecoder. This is a non breaking change sinceNIOSingleStepByteToMessageDecoderhas default implementations for theByteToMessageDecoderprotocol, which we continue to support.