1. 09 Jul, 2019 1 commit
  2. 03 Jul, 2019 1 commit
    • Nathan Harris's avatar
      Refactor `RESPTranslator` to mutate the passed `ByteBuffer` directly. · b8c19488
      Nathan Harris authored
      Motivation:
      
      During proposal review, it was pointed out that the code with a position index was redundant and error prone over relying on `ByteBuffer`'s `readerIndex`.
      
      Modifications:
      
      Refactored `RESPTranslator` to rely on `ByteBuffer.readerIndex` for position of current parsing cursor,
      and eliminated `ParsingResult` enum to instead return `RESPValue?`.
      
      The implementation for writing out `RESPValue` has been expanded to `RESPValueConvertible` and moved to an extension of `ByteBuffer`.
      
      Result:
      
      Parsing `RESPValue` into and out of `ByteBuffer` should be less error-prone and more straight forward.
      
      This contributes to issues #47 and #55
      b8c19488
  3. 06 Jun, 2019 1 commit
    • Nathan Harris's avatar
      Rename `NIORedis` to `RedisNIO` · e81f9546
      Nathan Harris authored
      Motivation:
      
      The SSWG has identified a fast approaching reality of namespace clashes in SPM within the ecosystem and has proposed a rule on names that `NIORedis` no longer complies with.
      
      Modifications:
      
      All references to `NIORedis` have been switched to `RedisNIO` as this module name is unique (at least within GitHub's public repositories).
      
      The goals for this name are as follows:
      
      1. To indicate that this is a Redis client library that is built with SwiftNIO
      2. That it is a lower level library, as it directly exposes SwiftNIO as an implementation detail
          2a. The idea being that a higher level library (`Redis`) will be used, and to "go one level deeper" in the stack, you append the "deeper" `NIO` postfix
      3. It follows a naming pattern adopted by Vapor who has expressed their desire to adopt this library as their Redis implementation
      
      Result:
      
      A repository, package name, and module name that are unique across GitHub's public repositories that achives the goals outlined above.
      e81f9546
  4. 01 May, 2019 2 commits
    • Nathan Harris's avatar
    • Nathan Harris's avatar
      Simplify RESP Parsing and Redis Channel Handlers · 477668e6
      Nathan Harris authored
      Motivation:
      
      As it stands, the parsing / encoding implementations for RESP was directly tied to the NIO Channel Handlers.
      
      Unit tests were sloppily spread across multiple files and it made it difficult to explicitly separate out
      the Channel Handler behavior from the RESP specification implementation.
      
      Modifications:
      
      - Add: `RESPTranslator` enum helper object with static methods that only handles RESP parsing / encoding
      - Rename: `RESPEncoder` to `RedisMessageEncoder`
      - Rename: `RESPDecoder` to `RedisByteDecoder`
      
      Results:
      
      It should be easier to understand what type is intended to be used as part of a NIO channel pipeline while
      still having a direct way of parsing / encoding between Swift types and the RESP specification.
      
      Unit tests should be more maintainable as well.
      477668e6