• Stars
    star
    142
  • Rank 258,495 (Top 6 %)
  • Language
    Swift
  • License
    Apache License 2.0
  • Created almost 6 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Non-blocking, event-driven Swift client for Redis.

RediStack

SSWG Sandbox Incubating Badge Documentation MIT License Swift 5.6

RediStack (pronounced like "ready stack") is a non-blocking Swift client for Redis built on top of SwiftNIO.

The GitLab repository is a read-only mirror of the GitHub repository. For issues and pull requests, please visit GitHub.

Introduction

It communicates over the network using Redis' Redis Seralization Protocol (RESP2).

This library is primarily developed for Redis v5, but is backwards compatible to Redis v3.

Installing

To install RediStack, just add the package as a dependency in your Package.swift.

dependencies: [
    .package(url: "https://github.com/swift-server/RediStack.git", from: "1.4.1")
]

Getting Started

RediStack is quick to use - all you need is an EventLoop from SwiftNIO.

import NIOCore
import RediStack

let eventLoop: EventLoop = ...
let connection = RedisConnection.make(
    configuration: try .init(hostname: "127.0.0.1"),
    boundEventLoop: eventLoop
).wait()

let result = try connection.set("my_key", to: "some value")
    .flatMap { return connection.get("my_key") }
    .wait()

print(result) // Optional("some value")

Note: Use of wait() was used here for simplicity. Never call this method on an eventLoop!

Documentation

The docs for the latest tagged release are always available at the Swift Package Index.

Questions

For bugs or feature requests, file a new issue.

Changelog

SemVer changes are documented for each release on the releases page.

Contributing

Check out CONTRIBUTING.md for more information on how to help with RediStack.

Contributors

Check out CONTRIBUTORS.txt to see the full list. This list is updated for each release.

Swift on Server Ecosystem

RediStack is part of the Swift on Server Working Group ecosystem - currently recommended as Sandbox Maturity.

Proposal Pitch Discussion Review Vote
SSWG-0004 2019-01-07 2019-04-01 2019-06-09 2019-06-27

Language and Platform Support

Any given release of RediStack will support at least the latest version of Swift on a given platform plus 2 previous versions, at the time of the release.

Major version releases will be scheduled around official Swift releases, taking no longer 3 months from the Swift release.

Major version releases will drop support for any version of Swift older than the last 3 Swift versions.

This policy is to balance the desire for as much backwards compatibility as possible, while also being able to take advantage of new Swift features for the best API design possible.

License

Apache 2.0

Copyright (c) 2019-present, Nathan Harris (@mordil)

This project contains code written by others not affliated with this project. All copyright claims are reserved by them. For a full list, with their claimed rights, see NOTICE.txt

Redis is a registered trademark of Redis Labs. Any use of their trademark is under the established trademark guidelines and does not imply any affiliation with or endorsement by them, and all rights are reserved by them.

Swift is a registered trademark of Apple, Inc. Any use of their trademark does not imply any affiliation with or endorsement by them, and all rights are reserved by them.

More Repositories

1

swift-aws-lambda-runtime

Swift implementation of AWS Lambda Runtime
Swift
1,132
star
2

async-http-client

HTTP client library built on SwiftNIO
Swift
917
star
3

http

⚠️ Historical HTTP API - please use https://github.com/swift-server/async-http-client instead
Swift
703
star
4

vscode-swift

Visual Studio Code Extension for Swift
TypeScript
622
star
5

swift-service-lifecycle

Cleanly startup and shutdown server application, freeing resources in order before exiting.
Swift
395
star
6

work-group

⚠️ Historical workgroup organisation
352
star
7

swiftly

A Swift toolchain installer and manager, written in Swift.
Swift
337
star
8

swift-backtrace

💥 Backtraces for Swift on Linux and Windows
C
295
star
9

guides

Guides for building, debugging and deploying Swift Server applications
258
star
10

sswg

Swift Server Working Group (SSWG)
181
star
11

swift-prometheus

Prometheus client library for Swift
Swift
144
star
12

swift-webauthn

A Swift library for implementing the WebAuthn spec
Swift
127
star
13

swift-openapi-vapor

Vapor Bindings for the OpenAPI Generator
Swift
79
star
14

swift-kafka-client

Swift
77
star
15

swift-devcontainer-template

Visual Studio Code Development Container for Swift
Shell
54
star
16

swift-openapi-async-http-client

AsyncHTTPClient transport for Swift OpenAPI Generator.
Swift
54
star
17

security

⚠️ Historical TLS API - please use SwiftNIO instead
Swift
49
star
18

swift-aws-lambda-events

Swift implementation of AWS Lambda Events
Swift
48
star
19

swift-openapi-hummingbird

Hummingbird transport for OpenAPI generator
Shell
27
star
20

swift-memcache-gsoc

Swift
15
star
21

sswg-collection

Dockerfile
11
star
22

swift-openapi-lambda

An AWS Lambda transport for Swift OpenAPI
Swift
8
star
23

swift-service-cache

caches for swift services
6
star
24

swift-etcd-client-gsoc

Swift
5
star