Skip to content

Releases: swift-server/RediStack

NIORedis 0.7.0: The Proposal

02 May 02:29

Choose a tag to compare

Pre-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)

NIORedis 0.6.0: Simple Connections

28 Mar 06:16
0797c3f

Choose a tag to compare

Pre-release

Motivation

Much of the exposed types in the library were wordy, unclear, or not fulfilling strong use cases - so a revisit was done to the foundational protocols: RedisCommandExecutor, RedisConnection, RedisPipeline - as well as their implementations and RedisDriver.

Breaking Changes

  • RedisCommandExecutor is now RedisClient (#24)
  • RedisConnection is no longer a protocol (#24)
    • NIORedisConnection has taken the name to act as the primary concrete implementation for Redis connections
      • the isClosed property has been renamed to isConnected
  • RedisPipeline is no longer a protocol (#26)
    • NIORedisPipeline has taken the name to act as the primary concrete implementation for Redis pipelines
  • RedisDriver is no longer a thing (#25)
    • Connections are now made with a static method on RedisConnection

Fixes

  • RedisConnection.close() has had some tweaks to resolve a state where closing a connection results in error and the QUIT command could not be sent (#24)

NIORedis 0.5.0: Everything is Convenient

25 Mar 23:04
2dd1d30

Choose a tag to compare

Motivation

The goal of this release was to bring feature parity with Vapor's Redis implementation and to have as Swifty of an API as possible, with consistent documentation and minimal performance impact.

Breaking Changes

  • Every command extension has the @inlinable attribute to remove method call overhead as much as possible
  • Every existing command extension up to this point has been re-evaluated with the function names, parameter labels, and return types.

New Additions

  • EventLoopFutures resolving RESPValue now have an extension method that can convert to a type you desire or fail with a RedisError: .mapFromRESP(to:) (5a35a91)
  • New convenience command methods

NIORedis 0.4.0: POP and SSWG

19 Mar 05:08
e4e32fd

Choose a tag to compare

Pre-release

Breaking Changes

  • Removed DispatchRedis package (5c32b97)
  • RedisConnection and RedisPipeline have become protocols. The default implementations have been renamed to NIORedisConnection and NIORedisPipeline (6b30127)
  • The select(_:) command convenience method has been renamed to select(database:) (6b30127)
  • RedisPipeline.enqueue(command:arguments:) has been renamed to RedisPipeline.enqueue(operation:) which is now a closure that provides a RedisCommandExecutor so all of the command convenience methods are made available. (6b30127)
    • Commands are still queued and not executed immediately.
  • RedisConnection.command(_:arguments:) is no longer supported (6b30127)

New Additions

  • swift-log is now added, and default logging implementations have been added (73d5930)
    • Most logging is done with debug
    • Each logging instance can be overridden in constructors of objects that log
    • Each logger uses a NIORedis. prefix in their label
  • RedisCommandExecutor protocol that creates an interface for objects responsible for sending commands (6b30127)
    • NIORedisConnection and NIORedisPipeline both conform to this protocol
  • RESPConvertible conformance to Optional (618481f)
  • New command convenience methods (9f505be)

Fixes

  • NIORedisConnection.close() to send a "QUIT" command to Redis before closing, and properly checking if the connection has been closed already (6825451)

NIORedis 0.3.0: Housekeeping

14 Mar 23:16
596b9b9

Choose a tag to compare

Pre-release
Merge pull request #13 from Mordil/set-commands

Add all Set commands with unit tests

NIORedis 0.2.0: The Return Pitch

10 Jan 20:08
473b395

Choose a tag to compare

Pre-release
Merge pull request #5 from Mordil/rev-2

Rev 2

NIORedis 0.1.0: The First Pitch

08 Jan 03:56

Choose a tag to compare

Pre-release
Update pitch doc to include references to pipelines and include links