NIORedis 0.7.0: The Proposal
Pre-release
Pre-release
Breaking Changes
- Static factory methods for building a default Redis
Channelpipeline andRedisConnectionhave been moved to a newRedisenum namespace (#38)- Their method signatures have also seen some changes
- Encoding / Decoding RESP has been separated from the Channel pipelines (#39)
RESPTranslatoris a new type that implements the encoding/decoding of RESP formatted bytes to Swift typesRESPDecoderhas been renamed toRedisByteDecoderand is just aByteToMessageDecoderRESPEncoderhas been renamed toRedisMessageEncoderand is just aMessageToByteEncoder
- Error handling is now more straight forward (#37)
RedisErroris to represent only errors returned by Redis itself in command responsesNIORedisErrorrepresents errors thrown within the libraryRESPTranslator.ParsingErrorrepresents errors thrown while parsing bytes
RedisPipelinehas been removed (#36)- This feature may be re-introduced in the future, but for now is left up to higher level packages to implement
RESPValuenow holds references toByteBuffersrather thanData(#34)Foundation.Datais no longerRESPValueConvertible(#30)
Additions
RedisConnectionnow has a propertysendCommandsImmediatelythat controls the timing of when commands written to the network socket should be flushed and sent to Redis. (#36)- The default is
true, which means every command will trigger a flush.
- The default is
RESPValuenow has the following computed properties converted from the underlying storage (#30, #34):bytes: [UInt8]?data: Data?string: String?(this isn't new, but now also works with.integerstorage instances)
Implementation Changes
SwiftLoghas been anchored to version1.0.0RESPTranslatornow usesByteBufferViews andByteBufferSlices internally, so there should be a performance increase (#34)