1. 13 Jul, 2019 3 commits
  2. 11 Jul, 2019 2 commits
  3. 09 Jul, 2019 12 commits
    • Nathan Harris's avatar
      f788056e
    • Nathan Harris's avatar
      Add links to new support email. · 0fbc2eb3
      Nathan Harris authored
      Motivation:
      
      As this project might take off and support be needed, users will want a direct line of communication to file support tickets.
      
      Modifications:
      
      Update docs to include references and links for contacting the RediStack maintainers for assistance.
      
      Result:
      
      Users should have more information on how to contact project maintainers.
      0fbc2eb3
    • Nathan Harris's avatar
      Iterate on type safety for `zadd` · 0ecb3c1e
      Nathan Harris authored
      Motivation:
      
      Issue #60 called for improving the type safety of the options available for the `zadd` command, and MR !70 made some great headway, but attempted to cram too much into a single enum.
      
      Modifications:
      
      - Break the `RedisSortedSetAddOption.returnChangedCount` value into an additional boolean param
      
      Result:
      
      Using `zadd` should now be more straight forward, while being type safe.
      0ecb3c1e
    • Nathan Harris's avatar
      Rename `RedisCommand` properties to avoid overloading terms and being more specific. · 26057638
      Nathan Harris authored
      Motivation:
      
      There are several cases where "command" could refer to a command keyword, or an entire message (keyword + args). This made working with `RedisCommand` and it's documentation ambiguous.
      
      Modifications:
      
      - Rename `RedisCommand.command` to `message`
      - Rename initializer labels to `message` and `responsePromise`
      
      Result:
      
      When encountering a `RedisCommand` everyone should know that they are dealing with a message that should be sent to Redis as soon as possible.
      26057638
    • Nathan Harris's avatar
      Polish project documents · 04aa1f93
      Nathan Harris authored
      Motivation:
      
      To give a better first impression, and providing more comprehensive information for first time viewers, the README file needed reworking.
      
      Modifications:
      
      - Add a CHANGELOG file that at least redirects readers to the releases page of GitLab
      - Update the CONTRIBUTORS list
      - Change project README to have more information, flow better, and to have a better "first impression"
      
      Result:
      
      The README should give a stronger indication into the project's health.
      04aa1f93
    • Nathan Harris's avatar
      Update Jazzy Doc Generation Script · f2df3460
      Nathan Harris authored
      Motivation:
      
      Up until now, Jazzy docs were generated on a private CI runner hosting macOS - which doesn't make CI portable as it requires that runner to always be available.
      
      Modifications:
      
      - Change: CI config to use a Linux Jazzy Docker image for portability
      - Change: Doc theme templates to not reference GitHub
      
      Result:
      
      Jazzy docs should be able to be generated at any time, as the CI infrastructure is using GitLab's cloud solution with a Docker image
      f2df3460
    • Nathan Harris's avatar
      Merge branch '61-rebrand' into 'master' · fd73e0ab
      Nathan Harris authored
      61 -- Rebrand from `RedisNIO` to `RediStack`
      
      Closes #61
      
      See merge request Mordil/swift-redis-nio-client!73
      fd73e0ab
    • Nathan Harris's avatar
      7e7e3546
    • Nathan Harris's avatar
      Merge branch 'rename-errors' into 'master' · 57168eda
      Nathan Harris authored
      Rename `RedisNIOError` to `RedisClientError`
      
      See merge request Mordil/swift-redis-nio-client!72
      57168eda
    • Nathan Harris's avatar
      Rename `RedisNIOError` to `RedisClientError` · 13432f0c
      Nathan Harris authored
      Motivation:
      
      To make it a little more generic, and to avoid turnover during renames (such as the planned rebranding in issue #61), `RedisClientError` more accurately reflects the source of the errors, as well as the responsibility of causing the bug.
      
      Modifications:
      
      - Rename `RedisNIOError` to `RedisClientError`
      - Rename `RedisError` file to `RedisErrors`
      - Add documentation of `RedisClientError`
      - Remove no longer used `.unsupportedOperation(method:message:)` value
      - Rename `.responseConversion(to:)` to `.failedRESPConversion(to:)`
      
      Result:
      
      Names of `RedisClientError` should be more descriptive, less prone to turnover, and more documented for users to understand the issues related to these thrown errors.
      13432f0c
    • Nathan Harris's avatar
      Merge branch '47-proposal-feedback' into 'master' · 6c39eb39
      Nathan Harris authored
      47 -- SSWG Review Feedback
      
      Closes #55, #57, #54, #49, and #47
      
      See merge request Mordil/swift-redis-nio-client!53
      6c39eb39
    • Nathan Harris's avatar
      Merge branch 'connection-refactor' into '47-proposal-feedback' · 238ebb74
      Nathan Harris authored
      Refactor `RedisConnection`
      
      See merge request Mordil/swift-redis-nio-client!71
      238ebb74
  4. 05 Jul, 2019 1 commit
    • Nathan Harris's avatar
      Refactor `RedisConnection` · ea7c755d
      Nathan Harris authored
      Motivation:
      
      During proposal review, and while working within the codebase, several issues were identified with how `RedisConnection` was architectured.
      
      Modifications:
      
      - Change implementation of `RedisConnection` in some areas for new logic of internal `ConnectionState`
      - Change behavior of logging in a few places
      - The initializer for `RedisConnection` is now **internal**
      - How users can override the default `ClientBootstrap` for a connection is by passing an instance to the `.connect` static method
      - Change unit tests to inherit from a common XCTestCase class that handles creation and cleanup of `RedisConnection` in tests
      - Remove Redis namespace enum
      
      Result:
      
      The API for `RedisConnection` should be much simpler, with the implementation being less buggy.
      
      This resolves issues #49, #54, and #57.
      ea7c755d
  5. 04 Jul, 2019 5 commits
    • Nathan Harris's avatar
      b807af58
    • Nathan Harris's avatar
      Merge branch '60-typesafe-sortedset' into '47-proposal-feedback' · 2f21e207
      Nathan Harris authored
      60 -- Provide Strong Option Types in SortedSet Commands
      
      See merge request Mordil/swift-redis-nio-client!70
      2f21e207
    • Nathan Harris's avatar
      60 -- Provide Strong Option Types in SortedSet Commands · 64232992
      Nathan Harris authored
      Motivation:
      
      While working through issue #59, it was noticed just how "stringly" the SortedSet command options for `zadd`, `zinterstore`, and `zunionstore` were, and Swift provides ways of having strong type safety for these options.
      
      Modifications:
      
      - Add `RedisSortedSetAddOption` and `RedisSortedSetAggregateMethod` to replace the String API in `zadd`, `zinterstore`, and `zunionstore`
      - Fix an implication of how `overestimatedCountBeingAdded` documentation for `Array where Element == RESPValue` for `add(contentsOf:overestimatedCountBeingAdded:_:)`
      
      Result:
      
      Users should have a more discoverable and straightforward way that isn't error prone for calling `zadd`, `zinterstore`, and `zunionstore` with Redis supported options.
      64232992
    • Nathan Harris's avatar
      Merge branch '59-respconvertible-generics' into '47-proposal-feedback' · 392be147
      Nathan Harris authored
      59 -- Use `RESPValueConvertible` as Generic Constraint
      
      See merge request Mordil/swift-redis-nio-client!69
      392be147
    • Nathan Harris's avatar
      59 -- Use `RESPValueConvertible` as Generic Constraint · fa227b0e
      Nathan Harris authored
      Motivation:
      
      Johannes continues to provide great insight, and correctly pointed out that `RESPValueConvertible` was being used as an "existential" in all cases.
      
      This can cause unexpected type-erasure and introduce unnecessary cost overhead with dynamic dispatch when in most cases we know the exact value we want for `RESPValue` to execute commands.
      
      Modifications:
      
      - Add new extensions to `Array where Element == RESPValue` for appending and adding elements into them
      - Change `RedisClient.send(command:with:)` to require `[RESPValue]` instead of `[RESPValueConvertible]` as the `with` argument type
      - Change all instances of `RESPValueConvertible` being an "existential" type for method arguments to instead be a generic constraint
      
      Result:
      
      The library should be safeguarded from a class of bugs, with the use of `send` being a bit more straight forward, with some new convenience methods for `[RESPValue]` types.
      fa227b0e
  6. 03 Jul, 2019 16 commits
    • Nathan Harris's avatar
      Merge branch 'cleanup-unsafe' into '47-proposal-feedback' · e964ba04
      Nathan Harris authored
      Revisit `RESPValue` and `RESPValueConvertible` implementations.
      
      See merge request Mordil/swift-redis-nio-client!67
      e964ba04
    • Nathan Harris's avatar
      Revisit `RESPValue` and `RESPValueConvertible` implementations. · cd9bd04f
      Nathan Harris authored
      Motivation:
      
      Johannes provided a fair code review of the project and summarized his findings in issue #48, and one of the prime offenders was all of the `unsafe*` APIs (pointers, buffers, bytes)
      that were used with `RESPValue` and `RESPValueConvertible`.
      
      He also provided great feedback and pointed out good points of confusion with the API design of `RESPValue` and `RESPValueConvertible`.
      
      Modifications:
      
      - Return to using `Array` instead of `ContiguousArray` for `RESPValue.array` storage
      - Update all documentation to be more thorough in explaining how the types should be used and conformed to.
      - Remove all uses of `unsafe*` APIs where possible
      - Change implementations to be a lot more type and memory safe, double checking assumptions
      - Remove conformance to `ExpressibleBy*Literal` as it is too easy for users to shoot themselves in the foot and saves only a few characters over `.init(bulk:)`
      - Create new `RedisNIOTestUtils` target for common test extensions, making them public
      - Move most almost all implementations of `RESPValue` computed properties into the `RESPValueConvertible` conformances
      
      Result:
      
      Users should be more safeguarded by the API against unknowingly getting incorrect `RESPValue` representations, the API design of `RESPValue` and `RESPValueConvertible` should be much clearer,
      and memory safety should be at a higher bar from these changes.
      
      This resolves issues #55 & #48, and contributes to issue #47.
      cd9bd04f
    • Nathan Harris's avatar
      Merge branch 'redis-command' into '47-proposal-feedback' · f445822c
      Nathan Harris authored
      Rename `RedisCommandContext` to `RedisCommand`, improve `RedisCommandHandler`...
      
      See merge request Mordil/swift-redis-nio-client!66
      f445822c
    • Nathan Harris's avatar
      Merge branch 'expire-timeout' into '47-proposal-feedback' · 15a3c038
      Nathan Harris authored
      Update `RedisClient.expire` to no longer use `deadline` terminology.
      
      See merge request Mordil/swift-redis-nio-client!65
      15a3c038
    • Nathan Harris's avatar
      Rename `RedisCommandContext` to `RedisCommand`, improve `RedisCommandHandler`... · 5fb0bfca
      Nathan Harris authored
      Rename `RedisCommandContext` to `RedisCommand`, improve `RedisCommandHandler` usage semantics, and cleanup documentation.
      
      Motivation:
      
      During proposal review, it was noted that `RedisCommandContext` was a bit misleading, and the hidden reference semantics worrisome.
      
      In addition, several of parts of the documentation around `RedisCommandHandler` were weak or also misleading.
      
      Modifications:
      
      - Rename `RedisCommandContext` to just `RedisCommand`
      - Update documentation to be more explicit about the module who owns the types being referenced
      - Update documentation to call out explicit usage semantics and behavior
      - Change `RedisCommandHandler` to close the socket connection on error thrown
      - Rename the "base" Redis Channel Handlers to be more explicitly named
      
      Result:
      
      Users should have clearer documentation on what happens when using `RedisCommandHandler` and `RedisCommand` without hidden semantics.
      
      This contributes to issue #47.
      5fb0bfca
    • Nathan Harris's avatar
      Update `RedisClient.expire` to no longer use `deadline` terminology. · b96f64c7
      Nathan Harris authored
      Motivation:
      
      During proposal review, it was appropriately pointed out that `RedisClient.expire` incorrectly mixes 'deadline' and 'timeout' terminology.
      
      Modifications:
      
      - Change references of 'deadline' to 'timeout' to follow Redis' established semantics for 'EXPIRE'
      - Add additional unit test for `RedisClient.expire`
      
      Result:
      
      `RedisClient.expire` should now be more clear as to its semantics and not mix terminology incorrectly.
      
      This contributes to issue #47
      b96f64c7
    • Nathan Harris's avatar
      Merge branch 'client-bootstrap' into '47-proposal-feedback' · c5241a46
      Nathan Harris authored
      Change `Redis.makeDefaultClientBootstrap` to `ClientBootstrap.makeRedisTCPClient`
      
      See merge request Mordil/swift-redis-nio-client!64
      c5241a46
    • Nathan Harris's avatar
      Change `Redis.makeDefaultClientBootstrap` to `ClientBootstrap.makeRedisTCPClient` · 5d232ad0
      Nathan Harris authored
      Motivation:
      
      During proposal review, feedback was provided that the discoverability of the factory method for building a standard RESP `ChannelPipeline` was poor outside of documentation.
      
      Modifications:
      
      - Move `Redis.makeDefaultClientBootstrap` to `ClientBootstrap.makeRedisTCPClient`.
      - Move the `channelInitializer` implementation into a new `Channel.addBaseRedisHandlers()` instance method.
      
      Result:
      
      Users should have an easier time discovering how to easily create baseline RESP `ChannelPipelines`.
      
      This contributes to #47.
      5d232ad0
    • Nathan Harris's avatar
      Merge branch 'resp-translator-refactor' into '47-proposal-feedback' · dc0b7e8b
      Nathan Harris authored
      Refactor `RESPTranslator` to mutate the passed `ByteBuffer` directly.
      
      See merge request Mordil/swift-redis-nio-client!63
      dc0b7e8b
    • Nathan Harris's avatar
      Merge branch 'init-label' into '47-proposal-feedback' · 44c29169
      Nathan Harris authored
      Add `fromRESP` label to `RESPValueConvertible.init`
      
      See merge request Mordil/swift-redis-nio-client!56
      44c29169
    • 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
    • Nathan Harris's avatar
      Merge branch 'final-channelhandler' into '47-proposal-feedback' · f98b53e3
      Nathan Harris authored
      Make `RedisCommandHandler` final
      
      See merge request Mordil/swift-redis-nio-client!55
      f98b53e3
    • Nathan Harris's avatar
      Add `fromRESP` label to `RESPValueConvertible.init` · 60d5c4ce
      Nathan Harris authored
      Motivation:
      
      During SSWG review, feedback was provided on the API design of the `RESPValueConvertible.init` signature and how it should appropriately follow Swift Design Guidelines regarding labels.
      
      Modifications:
      
      `RESPValueConvertible.init(_:` is now `RESPValueConvertible.init(fromRESP:)`.
      
      Result:
      
      There should be more clarity at the call site when initializing a type from a `RESPValue`.
      
      This contributes to #47
      60d5c4ce
    • Nathan Harris's avatar
      Make `RedisCommandHandler` final · 1281724a
      Nathan Harris authored
      Motivation:
      
      During SSWG review, feedback was provided that forced a re-evaluation of early design feedback interpretation on composability of RedisNIO.
      
      First understanding was that the desire was to have "customization points" to gain benefits of implementation of RedisCommandHandler, while new understanding is that it just needs to be public in order for users to include it in their own custom ChannelPipeline schemes.
      
      Modifications:
      
      `RedisCommandHandler` is now a final class.
      
      Result:
      
      Users will no longer be able to subclass `RedisCommandHandler`, but gain a super slight performance increase.
      
      This contributes to #47.
      1281724a
    • Nathan Harris's avatar
      Merge branch '58-5.1-testing' into 'master' · cc477734
      Nathan Harris authored
      58 -- Add Swift 5.1 and Nightly Build Testing
      
      Closes #58
      
      See merge request Mordil/swift-redis-nio-client!68
      cc477734
    • Nathan Harris's avatar
      0eb30744
  7. 25 Jun, 2019 1 commit