A Redis client for Pharo (and GemStone/S) using Stick auto-reconnection layer
Many parts are borrowed from RedisClient.
However RediStick use Stick for supporting auto reconnection.
Metacello new
baseline: 'RediStick';
repository: 'github://mumez/RediStick/src';
load.Metacello new
baseline: 'RediStick';
repository: 'github://mumez/RediStick/src';
load: #('Core' 'ConnectionPool').Metacello new
baseline: 'RediStick';
repository: 'github://mumez/RediStick/src';
load: #('Core' 'Pubsub').Metacello new
baseline: 'RediStick';
repository: 'github://mumez/RediStick/src';
load: #('StreamObjects').stream low-level API only
Metacello new
baseline: 'RediStick';
repository: 'github://mumez/RediStick/src';
load: #('Core' 'Stream').Metacello new
baseline: 'RediStick';
repository: 'github://mumez/RediStick/src';
load: #('Core' 'Search').Metacello new
baseline: 'RediStick';
repository: 'github://mumez/RediStick/src';
load: #('Core' 'Json').Metacello new
baseline: 'RediStick';
repository: 'github://mumez/RediStick/src';
load: #('Core' 'TimeSeries').Metacello new
baseline: 'RediStick';
repository: 'github://mumez/RediStick/src';
load: #('Core' 'VectorSet').Metacello new
baseline: 'RediStick';
repository: 'github://mumez/RediStick/src';
load: #('Core' 'Function').stick := RsRediStick targetUrl: 'sync://localhost'.
stick connect.
stick beSticky. "Auto reconnect when server is not accessible"
stick beSwitchy: 'sync://otherhost'. "Or connect to the secondary server"
stick onError: [ :e | e pass ]. "Or just pass an error (not reconnect) - mainly for debug"
stick endpoint info.
stick endpoint get: 'a'.
stick endpoint set: 'a' value: 999.By default, bulk replies are decoded as strings, and outgoing String/ByteArray values are UTF-8 encoded. useRawBytesWhile: switches both directions to raw bytes instead, which is useful for binary-safe values such as serialized blobs.
rawBytes := stick endpoint useRawBytesWhile: [
stick endpoint set: 'binaryKey' value: someByteArray.
stick endpoint get: 'binaryKey' ].RsRedisConnectionPool primaryUrl: 'sync://localhost:6379'.
redis := RsRedisProxy of: #client1.
redis at: 'a'.
redis at: 'a' put: 999.In this example, the default connection pool is implicitly used through RedisProxy.
RediStick provides a channel class for using redis pubsub API very easily.
Please read Pubsub.md.
RediStick supports Redis Streams - distributed event streaming API.
Please read Stream.md.
RediStick supports RediSearch - a full-text search extension for Redis.
Please read Search.md.
RediStick supports RedisJSON - a JSON data type for Redis.
Please read Json.md.
RediStick supports Redis TimeSeries - a time series data type for Redis.
Please read TimeSeries.md.
RediStick supports Redis Vector Sets - an approximate nearest-neighbor vector data type built into Redis 8.0+.
Please read VectorSet.md.
RediStick supports Redis Functions - server-side Lua functions organized in libraries.
Please read Function.md.