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/repository';
load.
Metacello new
baseline: 'RediStick';
repository: 'github://mumez/RediStick/repository';
load: #('Core' 'ConnectionPool').
Metacello new
baseline: 'RediStick';
repository: 'github://mumez/RediStick/repository';
load: #('Core' 'Pubsub').
Metacello new
baseline: 'RediStick';
repository: 'github://mumez/RediStick/repository';
load: #('StreamObjects').
stream low-level API only
Metacello new
baseline: 'RediStick';
repository: 'github://mumez/RediStick/repository';
load: #('Core' 'Stream').
Metacello new
baseline: 'RediStick';
repository: 'github://mumez/RediStick/repository';
load: #('Core' 'Search').
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.
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.