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

In G-WAN's lock free KV Store, when does the node's memory get freed after a kv_del() call?

Let's say in G-WAN server thread we looked up an item in the KV Store and got a valid pointer to a "record" struct. (The KV store is attached to G-WAN's persistent pointer.) record = (record_t*)kv_get(&records, "akey", sizeof("akey") - 1); I'm…
0
votes
1 answer

xbuf_frurl does not work properly without server header of content length?

I try to get some info from other sites with xbuf_frurl. I got some site OK but some Not OK. By Now, I still can not make sure what is going wrong. But some sites are missing the content length header. Who can tell whether xbuf_frurl() relies on…
k.k. lou
  • 1,805
  • 2
  • 13
  • 16
0
votes
1 answer

xbuf_frurl timeout=0

I try to use xbuf_frurl to start a worker to do some post-processing. The worker will finish the job without returning anything. Thus, the original script can respond to client faster. So, I try to set the timeout=0ms in xbuf_frurl, hoping that it…
k.k. lou
  • 1,805
  • 2
  • 13
  • 16
0
votes
3 answers

braces usage without function name

Possible Duplicate: Practical use of extra braces in C Unnecessary curly braces in C++? What is the usage of the braces, for example as shown below: int var; { some coding... ... } there is no function name before the braces, nor typedef,…
k.k. lou
  • 1,805
  • 2
  • 13
  • 16
0
votes
1 answer

Content type handler needs G-WAN restart

I made a html.c content type handler to set max-age=99999999. At first, it works. But when I amended it, saved it, it didn't reflect the change until the G-WAN server is restarted. Is it the designed behavior? Updated: add the code as…
k.k. lou
  • 1,805
  • 2
  • 13
  • 16
0
votes
1 answer

The starting "/" in the virtual path of the cache

Pls clarify which one of the following is correct? In the user's manual P.27, it is stated that: // note: no starting ‘/’ in the virtual path static char path[] = ”tools/counter.html”; // a ‘virtual’ path int expire = 0; // 0:never But…
k.k. lou
  • 1,805
  • 2
  • 13
  • 16
0
votes
1 answer

Default expiry date of all types of file

Despite of doing it in each file type handler, is there any simple way to set default expiry date of all types of file, e.g. json, jpg, html, css, js, etc?
k.k. lou
  • 1,805
  • 2
  • 13
  • 16
0
votes
2 answers

Which Linux kernels and Linux distros are supported by G-WAN?

I can find a statement at the beginning of the user's manual: version 3 for Linux (tested with Debian and CentOS 32-bit and 64-bit) I am using Ubuntu 12.10 64-bit for development. So far, I found no problem with it, but I still have no…
k.k. lou
  • 1,805
  • 2
  • 13
  • 16
0
votes
2 answers

G-WAN URL rewrite for home page not working

I am trying to do a URL rewrite for the site home page. Here is a simplified version of my handler. int init(int argc, char *argv[]) { u32 *states = (u32*)get_env(argv, US_HANDLER_STATES); *states = (1 << HDL_AFTER_READ); return 0; } int…
Richard Heath
  • 349
  • 3
  • 12
0
votes
2 answers

Anatomy of G-WAN URI servlets

gwan/csp/strangesubfolder/inc.c can be visited via http://domainName.com/strangesubfolder/?inc I feel this servlet mapping strange but that suits my need. I can't find the mapping description in the gwan user's manual. Please correct me if I am…
k.k. lou
  • 1,805
  • 2
  • 13
  • 16
0
votes
2 answers

G-WAN servlets returning 1-99 (to lack HTTP headers) are very slow

I ran gwan_1 (v3.3.28), and then visited the page http: //.../?persistence.c. It reponsed fast. But when I changed "return 200;" to "return 9;" in the code, the browser responded slowly, about 4 seconds later. In the document, it is stated that:To…
k.k. lou
  • 1,805
  • 2
  • 13
  • 16
0
votes
1 answer

If the host directory is a link, G-WAN does not find that listener

Has anyone had the same experience? If the host directory is a link to another directory, gwan can't open that listener. For example, if 0.0.0.0_8080 is a symbolic link to another directory, then gwan does not to open that listener.
k.k. lou
  • 1,805
  • 2
  • 13
  • 16
0
votes
1 answer

request: adding "no. of workers" in the server report

by gwan_1 or gwan -w 1, gwan limits the no. of workers to ONE. but i can't find it in the server report. there is only such information as below in the report: Processes: 436 CPU(s): 1 Intel(R) Pentium(R) Dual CPU E2180 @ 2.00GHz (2 Cores/CPU, 1…
k.k. lou
  • 1,805
  • 2
  • 13
  • 16
0
votes
1 answer

what is the difference between "gwan_1" and "gwan -w 1"?

In the gwan.ch/en_timeline.html stated that, renaming gwan to gwan_1 is to start gwan with one worker. what is the difference between gwan_1 and gwan -w 1 ?
k.k. lou
  • 1,805
  • 2
  • 13
  • 16
0
votes
2 answers

How to make a G-WAN servlet close its connection silently without sending any reply

How to have gwan send no reply to some requests, i.e. make a servlet closed silently without building and sending a reply? It is useful to reduce the out-going bandwidth from the server side. For collecting data only, there's no need to respond…
k.k. lou
  • 1,805
  • 2
  • 13
  • 16