10 Commits

Author SHA1 Message Date
Alexander A. Klimov
1dcec6e77a RedisConnection#SendMessageInternal(): lock only while actually using shared objects 2019-11-02 14:00:23 +01:00
Alexander A. Klimov
50594ec1c8 Replace std::bind() with lambdas
refs #48
2019-11-02 14:00:23 +01:00
Jean Flach
7890c37357 Revert "Merge branch 'bugfix/execute-quieries' into 'feature/redis'"
This reverts commit f6c1fc3b43b1895eb87c1657f3e3355bfe9ddaac, reversing
changes made to ad1d448bcdead76a2bd45171a6efcd700b1c23d0.
2019-11-02 14:00:23 +01:00
Jean Flach
d2dc0047a3 Lock before queueing multiple queries 2019-11-02 14:00:23 +01:00
Jean Flach
1d21626b30 Code style 2019-11-02 14:00:23 +01:00
Jean Flach
0634e27d6d Add new connection handling 2019-11-02 14:00:23 +01:00
Jean Flach
f89e649871 Add recursive callback to manage auth and db select 2019-11-02 14:00:23 +01:00
Jean Flach
6aaa35a0a6 Rewrite the RedisWriter
There should be more atomic commits but the whole thing was a mess. This
commit changes the synchrounous Redis connection into an asynchronous
one in its own class RedisConnection.
The RedisConnection uses a Workqueue with commands to fire against the
Redis server. When a response is required a callback must be supplied,
refer to RedisWriter::RedisGet().

Known Issues:
- Authentication has no error handling and can break the connection
- Error handling in general is iffy due to the nature of the async redis
connection
- Getting a reply out of RedisConnection is not trivial
- HandleRW... sunt dracones
2019-11-02 14:00:23 +01:00
Jean Flach
64515b81e3 Add disconnect 2019-11-02 14:00:23 +01:00
Jean Flach
d96dcf869e Add RedisConnection object
This works using an async Redis connection. Multiple connections are not
possible. The connection is fed from a workqueue filled with
RedisCommands in the way of a vector of strings.
2019-11-02 14:00:23 +01:00