C
C
Caretaker2018-06-06 20:46:21
Redis
Caretaker, 2018-06-06 20:46:21

How to subscribe to REDIS events?

I tried for the 100500th time to delve into REDIS in order to abandon the self-written service in favor of something more stable and reliable. REDIS turned out to be the first and most recommended, but... either I don't smoke its capabilities, or it still doesn't fit...
The essence of the current module:
- central service to which "clients" connect
- any client can send a command to the service setting/deleting a "key-value" pair
- the service notifies all other clients (something like a broadcast),
this is still at least implemented using "SET key ... + PUBLISH key", and clients, respectively, having received a message with its key they can ask ... and then what I could not finish smoking on the basis of radish
- when reading a pair, clients must know not only its value, but also the assigned lifetime + expiration time
- some installed pairs have a lifetime, the service itself monitors when the pair should be deleted, deletes it from itself and sends a CAM message about this to all clients
Is it possible all the same, do it on the basis of radish or can there be an alternative with the functionality I need?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
Caretaker, 2018-06-26
@zuart

In general, I had to optimize my bike, but connect it with radish as a duplicate storage ...
In the process, the "bike" duplicates all operations for creating / deleting records in radish, and in the event of a crash or restart, it first loads the entire " data dump" taking into account incoming changes in the process of initialization from radish.
It has become more stable and holds more load without the risk of losing fast data. Most likely, this is a disabled person on crutches, but now only the network interface and the channel to the clients have become the bottleneck, if the client wants to read real-time too much, then the channel to this client should be so thick that the data is pumped without loss and delay, otherwise the data will reach

A
Andrey Tsvetkov, 2018-06-06
@yellow79

there is no automatic publication of a message when a key is deleted, everything else is and is described in manuals and docks

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question