ericmoritz / wsdemo

A Cowboy Websocket demo
Other
405 stars 58 forks source link

Clojure Server #30

Closed r4vi closed 12 years ago

r4vi commented 12 years ago

Hi, I've added a clojure webserver but I was unable to get the ./runtest script to work.

./rebar get-deps compile is giving me the following output:

Uncaught error in rebar_core: {'EXIT',{{badmatch,{error,badfile}},
                                       [{rebar_core,select_modules,3},
                                        {rebar_core,acc_modules,4},
                                        {rebar_core,process_dir0,6},
                                        {rebar_core,process_dir,4},
                                        {rebar_core,process_commands,2},
                                        {rebar,main,1},
                                        {escript,run,2},
                                        {escript,start,1}]}}

Not sure if I need to do that or not, trying to run ./runtest outputs:


$ ./runtest log 100 localhost 8080 10000
Running test with 10000 clients for 100 seconds
Data File: "log"
escript: exception error: undefined function wsdemo_logger:new/1
  in function  runtest__escript__1340__106222__509198:main/1
  in call from escript:run/2
  in call from escript:start/1
  in call from init:start_it/1
  in call from init:start_em/1
ocharles commented 12 years ago

Try compiling rebar yourself and copying the result over - I had to do that.

ericmoritz commented 12 years ago

Try doing this first:

curl -O http://cloud.github.com/downloads/basho/rebar/rebar && chmod u+x rebar

That should work I believe.

ericmoritz commented 12 years ago

Thanks for the Clojure version!

aglyzov commented 12 years ago

I tried to test the provided clojure server, here is what I got:

"clojure", 10000, 0, 2754, 0, 0, 0

I think this means the aleph library used in the server speaks some older websocket dialect.