Skip to content

NIORedis 0.7.0: The Proposal

Pre-release
Pre-release
Compare
Choose a tag to compare
@Mordil Mordil released this 02 May 02:29
· 264 commits to master since this release

Breaking Changes

  • Static factory methods for building a default Redis Channel pipeline and RedisConnection have been moved to a new Redis enum namespace (#38)
    • Their method signatures have also seen some changes
  • Encoding / Decoding RESP has been separated from the Channel pipelines (#39)
    • RESPTranslator is a new type that implements the encoding/decoding of RESP formatted bytes to Swift types
    • RESPDecoder has been renamed to RedisByteDecoder and is just a ByteToMessageDecoder
    • RESPEncoder has been renamed to RedisMessageEncoder and is just a MessageToByteEncoder
  • Error handling is now more straight forward (#37)
    • RedisError is to represent only errors returned by Redis itself in command responses
    • NIORedisError represents errors thrown within the library
    • RESPTranslator.ParsingError represents errors thrown while parsing bytes
  • RedisPipeline has been removed (#36)
    • This feature may be re-introduced in the future, but for now is left up to higher level packages to implement
  • RESPValue now holds references to ByteBuffers rather than Data (#34)
  • Foundation.Data is no longer RESPValueConvertible (#30)

Additions

  • RedisConnection now has a property sendCommandsImmediately that 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.
  • RESPValue now 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 .integer storage instances)

Implementation Changes

  • SwiftLog has been anchored to version 1.0.0
  • RESPTranslator now uses ByteBufferViews and ByteBufferSlices internally, so there should be a performance increase (#34)