Git Product home page Git Product logo

Comments (10)

nicolasff avatar nicolasff commented on June 27, 2024

You need to install libevent. Please refer to the README for instructions.

from webdis.

kishendas avatar kishendas commented on June 27, 2024

Do I also have to install hiredis ? I am getting the below error now. I have libevent installed.

$ make
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o webdis.o webdis.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o cmd.o cmd.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o worker.o worker.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o slog.o slog.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o server.o server.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o libb64/cencode.o libb64/cencode.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o acl.o acl.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o md5/md5.o md5/md5.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o sha1/sha1.o sha1/sha1.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o http.o http.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o client.o client.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o websocket.o websocket.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o pool.o pool.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o conf.o conf.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o formats/json.o formats/json.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o formats/raw.o formats/raw.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o formats/common.o formats/common.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o formats/custom-type.o formats/custom-type.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o formats/bson.o formats/bson.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o hiredis/hiredis.o hiredis/hiredis.c
hiredis/hiredis.c:827:31: error: second argument to 'va_arg' is of incomplete type 'void'
va_arg(ap,void);
~~~~~~~~~~^~~~~
/usr/bin/../lib/clang/3.1/include/stdarg.h:35:50: note: expanded from macro 'va_arg'
#define va_arg(ap, type) __builtin_va_arg(ap, type)
^
1 error generated.
make: *** [hiredis/hiredis.o] Error 1

from webdis.

nicolasff avatar nicolasff commented on June 27, 2024

No, hired is is bundled. This seems to be an issue when compiling with clang; I'll try to reproduce it.

from webdis.

nicolasff avatar nicolasff commented on June 27, 2024

I have updated hiredis, which should fix this issue. Could you please try out the latest master?

from webdis.

kishendas avatar kishendas commented on June 27, 2024

Looks good now. Thanks.
Btw I am not able to connect to webdis, although the thread is up.
Below is the list of commands that I tried - ( Sorry if I am doing something very basic wrong )
$ ./webdis &
[2] 31597
$ curl http://127.0.0.1:31597/SET/hello/world
curl: (7) couldn't connect to host
[2]+ Done ./webdis
$ curl http://127.0.0.1:7379/SET/hello/world
$

from webdis.

nicolasff avatar nicolasff commented on June 27, 2024

What you wrote seems wrong; you started webdis and that created a process with PID 31597 and you tried to connect to TCP port 31597. I assume you then killed webdis (seeing as it shows Done ./webdis), and then tried to connect to the right port, 7379.

Run it, and connect to port 7379. You can use curl -v to get more details.

from webdis.

kishendas avatar kishendas commented on June 27, 2024

Right, initially I gave the process id by mistake for the port, but corrected it later.
So, this command seems to be killing the webdis process -> $ curl http://127.0.0.1:31597/SET/hello/world .
Anyway with -v options its giving Http 503 ( Service unavailable) -

$ curl -v http://127.0.0.1:7379/SET/hello/world

  • About to connect() to 127.0.0.1 port 7379 (#0)
  • Trying 127.0.0.1... connected
  • Connected to 127.0.0.1 (127.0.0.1) port 7379 (#0)

    GET /SET/hello/world HTTP/1.1
    User-Agent: curl/7.21.4 libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
    Host: 127.0.0.1:7379
    Accept: /

    < HTTP/1.1 503 Service Unavailable
    < Server: Webdis
    < Allow: GET,POST,PUT,OPTIONS
    < Access-Control-Allow-Origin: *
    < Connection: Keep-Alive
    < Content-Length: 0
    <
  • Connection #0 to host 127.0.0.1 left intact
  • Closing connection #0

from webdis.

nicolasff avatar nicolasff commented on June 27, 2024

Is redis running? I tried with redis running and it returned {"SET":[true,"OK"]}. 503 Service Unavailable means that webdis couldn't connect to redis.

from webdis.

kishendas avatar kishendas commented on June 27, 2024

Redis was running. I killed both redis and webdis processes and started them again. It looks good now.
Btw does webdis persists the number of client connections to redis ?
Are there any documents/examples or I would have to look at the code to learn more about Webdis.
My requirement is to support web-analytics for about 500 million concurrent users.
Thanks for all the help.

from webdis.

nicolasff avatar nicolasff commented on June 27, 2024

Great!

I'm glad to know it's working now. I'm not sure exactly what you mean, but webdis maintains persistent connections to redis, although it doesn't record the number of connections that have been made to itself.

For further references you can look at the code, or ask me here on GitHub or by email, no preference. I'd be interested to see how far you can scale redis and webdis.

from webdis.

Related Issues (20)

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.