Questions tagged [g-wan]

G-WAN is a web server with scripts in Asm, C, C++, C#, D, Go, Java, Javascript, Lua, Objective-C, Perl, PHP, Python, Ruby and Scala.

G-WAN is a (freeware) web application server first published in 2009. The gwan.com site presents the G-WAN API, answers FAQs and also publishes many benchmarks in various programming languages.

G-WAN supports scripts in Asm, C, C++, C#, D, Go, Java, Javascript, Lua, Objective-C, Perl, PHP, Python, Ruby, and Scala (click on a language link to show a benchmark).

An old performance comparison with static servers was done by an academic: http://nbonvin.wordpress.com/2011/03/24/serving-small-static-files-which-server-to-use/

A more recent benchmark (on 1/2/4/8 CPU Cores) - also made by an independent third-party - compares Apache 2.2, Apache 2.4, Nginx, Lighttpd, Varnish, Litespeed, Cherokee and G-WAN: http://www.rootusers.com/web-server-performance-benchmark/

274 questions
0
votes
1 answer

get_arg() would not work with wake_up()

I added a printf statement under the xbuf_xcat, in stream3.c, as below: xbuf_xcat(reply, "%x\r\n%s\r\n", len, readbuf); char *client_arg_time=0; get_arg("time=", & client_arg_time, argc, argv); printf("%s\n", client_arg_time); It is expected to…
k.k. lou
  • 1,805
  • 2
  • 13
  • 16
0
votes
2 answers

gwan. Accessing site through external IP

I have a Gwan server set up at home on my Arch Linux box. I'm running "motion". I have a router that, of course, handles my external IP address. I want to access the avi movie shorts generated by motion through port 1000 which is port forwarded…
whatshisname
  • 131
  • 1
  • 6
0
votes
1 answer

Gwan report.c statistics

I am testing on G-wan server performance and it's very amazing!!! Here is the output from report.c Requests All: 5,725 (6.06% of Cache misses) HTTP: 66 (1.15% of all requests) Errors: 70 (1.22% of all requests) CSP: 5,650 (98.69% of all requests)…
moriya
  • 75
  • 9
0
votes
1 answer

how to download large file on G-wan?

I use G-wan download files from directory 'www' ,it can download the files size less than 16M,if the files size is 16M, the G-wan is wrong: Signal : 11:Unknown SIGSEGV problem Signal src : 128:. errno : 0 Thread : 1 Code …
0
votes
2 answers

How to wait for other thread to init and clean up correctly afterwards?

Considering following situation: 2 threads, where 1 should initialize some data, which takes an indeterministic amount of time, and the other thread needs to wait for that. Problems I have: I can't do anything before any of the two threads are…
griffin
  • 1,261
  • 8
  • 24
0
votes
1 answer

strange G-WAN response speed differences

I had just implement G-WAN web server and test for my code, however, it is very strange that my server response very fast sometimes (20 ms), and sometimes over few seconds (6–7 s) or even timeout... I try to simplify my code, and return a string to…
moriya
  • 75
  • 9
0
votes
1 answer

Correct way to implement session in G-WAN's Ruby

What would be the correct way to implement session on G-WAN's Ruby, this is my idea: send a random cookie if not exists, or the GUID cookie would be fine? but how to read and write Cookie on G-WAN's Ruby? documentation only shows the examples on…
Kokizzu
  • 24,974
  • 37
  • 137
  • 233
0
votes
2 answers

GWan & Lua HTTP client

I am running a Lua HTTP client and the request leads to an error 400: [root]# ./luatest 400 Bad Request
0
votes
1 answer

comet.c hanged when there are more than 6 connections

Another question about coment.c in gwan. In a browser, open many pages of csp_comet.html, start same feed with same freq. of 1 sec. All ajax calls to comet.c with a timestamp. But, when there are too many pages(about six pages), the newly opened…
k.k. lou
  • 1,805
  • 2
  • 13
  • 16
0
votes
1 answer

get image and delivery via gwan

I am writting a G-WAN application, which will count the number of visit for different images (the images are stored on different servers). HTML code: For the sendandcount application, after I…
moriya
  • 75
  • 9
0
votes
1 answer

When system resource is not enough for adding a client in the push list

Exactly what I want is: when the system resource is not enough to add a new subscriber, how to disconnect(may be randomly) an existing subscriber to make room for that newly registered one? In client side, the browser will terminate that…
k.k. lou
  • 1,805
  • 2
  • 13
  • 16
0
votes
2 answers

comet.c cannot work with more than one page opened in browser

It works well when comet.c is opened in different browser simultaneously, one page per browser. When I opened two pages of comet.c in a browser, no matter firefox or chrome, only the first page received and displayed data. The second page were…
k.k. lou
  • 1,805
  • 2
  • 13
  • 16
0
votes
1 answer

I need a function of push_list_remove

The feed created by push_list_add() will be terminted whenever the client or the server close the connection. But how can I close a connection in server side? What exactly I need is a way to remove a feed which is created by push_list_add(). Who can…
k.k. lou
  • 1,805
  • 2
  • 13
  • 16
0
votes
1 answer

How do prevent race condition when deleting a GWAN KV stored struct?

After several months of evaluating and reevaluating and planing different data structures and web/application servers I'm now at a point where I need to bang my head around with implementation details. The (at the moment theoretical) question I'm…
griffin
  • 1,261
  • 8
  • 24
0
votes
1 answer

How does the file descriptor limit the connection in stream3.c

In the example of stream3.c, there is a pipe(fd) command producing two file descriptors, fd[0] and fd[1]. This script keeps on running by the wake_up(argv, fd[0], WK_FD) command. That means every server-push script uses 2 file descriptors. Who can…
k.k. lou
  • 1,805
  • 2
  • 13
  • 16