Questions tagged [hiredis]

Hiredis is a minimalistic C client library for the Redis database

Hiredis is a minimalistic C client library for the Redis database.

It is minimalistic because it just adds minimal support for the protocol, but at the same time it uses an high level printf-alike API in order to make it much higher level than otherwise suggested by its minimal code base and the lack of explicit bindings for every Redis command.

Apart from supporting sending commands and receiving replies, it comes with a reply parser that is decoupled from the I/O layer. It is a stream parser designed for easy reusability, which can for instance be used in higher level language bindings for efficient reply parsing.

Hiredis only supports the binary-safe Redis protocol, so you can use it with any Redis version >= 1.2.0.

The library comes with multiple APIs. There is the synchronous API, the asynchronous API and the reply parsing API.

Source Code: https://github.com/redis/hiredis

139 questions
1
vote
1 answer

access redis hash with hiredis in C

I have two hashes in the redis database with names "hash1" and "hash2". I created those hashes in another python file. Now i want to get all the keys and values that are in those hashes with hiredis in a .c file. Is that possible? I have only seen…
jmfel
  • 43
  • 2
  • 9
1
vote
1 answer

Is there any necessary to use pool in async redis client

I use async redis api(hiredis) in my project with one connection, because of non-blocking io, so I think one connection is enough for me, but I want to figure out whether the sequence of commands will be executed first-in-first-out
1
vote
0 answers

C Hiredis: help needed on redisContext()

I have few questions as below regarding Hiredis for C: I read somewhere that hiredis does not do connection pooling. Is there any library available for hiredis which does connection pooling or may be an alternative to hiredis which has connection…
user3275095
  • 1,605
  • 4
  • 24
  • 36
1
vote
1 answer

How do I install hiredis on Solaris 11?

I'm trying to install hiredis on my Joyent SmartMachine running Solaris 11. I keep getting the following error. In file included from /usr/include/iso/string_iso.h:48:0, from…
scum
  • 3,202
  • 1
  • 29
  • 27
1
vote
1 answer

What is the use of privdata argument in redisAsyncCommand?

The function definition provided in the source for redisAsyncCommand( ) is: static int __redisAsyncCommand(redisAsyncContext *ac, redisCallbackFn *fn, void *privdata, const char *cmd, size_t len) { ... } What is the purpose of the void *privdata…
xennygrimmato
  • 2,646
  • 7
  • 25
  • 47
1
vote
1 answer

How is redisAsyncConnect() different from redisConnect()?

In what cases should redisAsyncConnect be used, instead of redisConnect? What is the difference in implementation of both functions?
xennygrimmato
  • 2,646
  • 7
  • 25
  • 47
1
vote
1 answer

Hiredis dependency not resolving

Please help me understand where rpm looks for libhiredis. Software could easy find rest of the dependencies like libev etc, which i installed using yum. For hiredis i used regular make && make install as yum had really old package. This is the only…
balyanrobin
  • 91
  • 1
  • 5
1
vote
1 answer

memory leak in hiredis using valgrind

I ran valgrind on my code which uses hiredis, it points out the following individual lines in my code : redisAsyncConnect() redisAsyncConnectUnix() redisLibuvAttach() uv_loop_new() I have used 'redisAsyncDisconnect' to free up the memory for the…
melwin_jose
  • 315
  • 3
  • 20
1
vote
1 answer

hiredis "undefined reference to" compiler error

I want to compile the client for redis in C. I've downloaded and installed the libevent library and the hiredis files. I've used this command: gcc -I/home/tasos/Dropbox/lists/hiredis example-libevent.c -levent but I get these…
TasostheGreat
  • 432
  • 1
  • 9
  • 24
1
vote
2 answers

unable to install recommendify gem - hiredis.h not found

I am trying to install recommendify gem. This gem try to compile a native bin called recommendify to be faster than ruby´s parser. First i tried to install like other common gem: gem install recommendify and this is the error: ➜ ~ gem install…
David Villa
  • 107
  • 11
1
vote
1 answer

Fast value checking?

I have a list of 50,000,000+ 512-bit values. I have a stream of data coming in at 1,750,000 values per second, I need to check if each of those values is in the aforementioned list or not. Currently I've opted for redis via hiredis in c using the…
nathan
  • 5,402
  • 1
  • 22
  • 18
1
vote
1 answer

rpush multi-word string with spaces to redis using hiredis

I am trying to rpush a multiword string to a redis key But everyword is getting added as a new element How can I avoid this #include #include #include #include int main(int argc, char **argv) { …
Ram
  • 1,155
  • 13
  • 34
1
vote
2 answers

Nodejs installing hiredis with npm. Getting error

Hi im trying to install hiredis. But im getting this error: Need advise. Edit:After installing python im getting different error:
ftdeveloper
  • 1,053
  • 3
  • 26
  • 50
1
vote
1 answer

Sending multiple record with one call using hiredis

I hope this list is right for asking questions about redis client "hiredis" . I want to achieve the same thing which I am doing below with redis client . As can be seen redis send 3 different record with one rpush call . redis 127.0.0.1:6379>…
Kadir Erdem Demir
  • 3,531
  • 3
  • 28
  • 39
1
vote
2 answers

Using hiredis (redis client library)

I have the redis server installed, and can use it from the command line. Now, I am wanting to write a client program using hiredis. To begin with, I tried to compile example.c which is present in the hiredis…
user1274878
  • 1,275
  • 4
  • 25
  • 56