Code Monkey home page Code Monkey logo

eredis's Issues

publish/subscribe

What is the right way to implement publish/subscribe on top of eredis?

I tried sending a 'subscribe' command, and it works fine, but I can't call eredis_r_reply() in a blocking manner to wait for a response that hasn't come yet.

error in documentation

hello,
we can read in ReadMe :
/* release a reader */
r = eredis_r_release( e );

e or reader ?

Regards,
Nicolas

eredis connects but does not SET anything via async connection

e = eredis_new();
eredis_timeout( e, 200 );
eredis_r_max( e, 50 );
eredis_r_retry( e, 1 );

eredis_host_add( e, "127.0.0.1", 6379 );

eredis_pc_cmd( e, "AUTH passwd" );
eredis_pc_cmd( e, "SELECT 1");
eredis_run_thr( e );
eredis_w_cmd( e, "SET testkey 10" );

With this snippet (I trimmed variable declarations, by the way) I am able to connect redis-server as I checked via connection tools and also by redis itself. However, testkey does not SET. The most interesting thing is, sometimes (randomly) I see that this teskey declared successfully without reason. Like redis get the key but do some delay. However, this is not simply a delay. It happens randomly. After few minutes maybe that key will be set.

Is there any reason to have such behavior on my end? Redis server is v4.

Stable version releases?

I can't seem to find anywhere to get stable packaged releases for eredis anywhere (either in Debian's repositories or here in the GitHub releases tab). Am I merely blind or are users supposed to simply use master from source? :)

src/eredis.c:202: error: redefinition of typedef ‘eredis_reader_t’

Hello!

[root@gerasim eredis]# make
[ 20%] Built target hiredis-inc
[ 40%] Built target hiredis-src
[ 50%] Building C object src/CMakeFiles/eredis.dir/eredis.c.o
/tmp/c/redis/eredis/src/eredis.c:202: error: redefinition of typedef ‘eredis_reader_t’
/tmp/c/redis/eredis/include/eredis.h:59: note: previous declaration of ‘eredis_reader_t’ was here
/tmp/c/redis/eredis/src/eredis.c:238: error: redefinition of typedef ‘eredis_t’
/tmp/c/redis/eredis/include/eredis.h:58: note: previous declaration of ‘eredis_t’ was here
make[2]: *** [src/CMakeFiles/eredis.dir/eredis.c.o] Error 1
make[1]: *** [src/CMakeFiles/eredis.dir/all] Error 2
make: *** [all] Error 2

Please tell how it can be compiled? Or i'm doing something wrong?

eredis ipv6

hello,
it seems eredis_host_file( e, "my-hosts.conf" ) does not work for ipv6 , parsing : seems bad ,
can you correct ?

Regards,
Nicolas Prochazka

about payload size

Hello,
when i do a eredis_r_cmd , with a redis get , that 's sending a big payload , ~ 8Mb , my progam segfault at eredis_r_cmd ( i cannot test the eredis_r_cmd reply ) , do you have some static buffer ? or hiredis ?

Regards,
Nicolas

End of replies from eredis_r_reply(r)

I am doing a variable number of eredis_r_append_cmd() and a final reply=eredis_r_cmd().

When checking replies with reply = eredis_r_reply( r ), I have no idea how many commands were issued (I could count, but eredis through r->cmds_replied already knows this). Fortunately reply==NULL when no more replies are available, so I can just iterate through the replies. Unfortunately it prints out an error message. Is getting to the end of replies really an error? Is there something else I'm missing?

I'd just do the same check in my code for (r->cmds_replied >= r->cmds_nb), but apparently that is not available outside the API.

From rw.c:

if (r->cmds_replied >= r->cmds_nb) {
    fprintf(stderr,
            "eredis: api misuse: all cmds are already replied: %d/%d\n",
            r->cmds_replied, r->cmds_nb);
    return NULL;
}

Pub/Sub Async ?

Is it possible to use it for Pub/Sub Async?

haven't found a way to do it, or should I use directly Hiredis with redisAsyncContext?

tried some examples but no luck

Does it can build on Centos

OS:CentOS release 6.9
when I type

cmake .

output:

-- Could NOT find libev (missing: LIBEV_INCLUDE_DIR LIBEV_LIBRARY)
CMake Error at src/CMakeLists.txt:90 (MESSAGE):
Could not find required package libev

I install "libev-devel.x86_64" , then "cmake ." again
output:

-- Could NOT find libev (missing: LIBEV_INCLUDE_DIR)
CMake Error at src/CMakeLists.txt:90 (MESSAGE):
Could not find required package libev

I check the "CMakeError.log", find

/usr/bin/ld: cannot find -lpthreads
collect2: ld returned 1 exit status

which step I do was wrong, and what should I do to resolve the problem.
Thanks!

Example

Can you put some examples ?
Is eredis_reply_free must be use with simple eredis_r_cmd ?
How count reader ( thread ?) that opens in pool connection ?

Regards,
Nicolas Prochazka

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.