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

why Gwan cache my result, could I disable it?

I had a problem about gwan cache, currently I visit a page serve by gwan (write in C) , which will execute some functions during visit, however, when I visit the same page few more time, gwan will directly give me the result without execute the…
moriya
  • 75
  • 9
0
votes
1 answer

How can I know if the client has closed the connection?

I checked the stream3.c example and found that when I closed the page in the browser, the servlet, i.e. the stream3.c, is still running about 2 rounds then terminated. That means, the data of the last 2 rounds was lost. Who can explain how to…
k.k. lou
  • 1,805
  • 2
  • 13
  • 16
0
votes
2 answers

gwan getus() getns() improper result?

Why after the block while(k--){}, is (t1-t0)=0? This script is the main.c of gwan. typedef struct { u64 a[10000000], b[10000000], c[10000000]; } data_t; char str[512]; u64 size; int main(int argc, char *argv[]) { data_t **data =…
k.k. lou
  • 1,805
  • 2
  • 13
  • 16
0
votes
1 answer

What is usage of wake_up(argv, fd, WK_FD)

Who can tell how to use wake_up() in gwan? // tell G-WAN when to run a script again (for the same request) // type: WK_MS | WK_FD #define WK_MS 1 // milliseconds #define WK_FD 2 // file descriptor void wake_up(char *argv[], int delay_or_fd, int…
k.k. lou
  • 1,805
  • 2
  • 13
  • 16
0
votes
2 answers

Load data from database to memory pool [gwan]

I currently writing a C program to cache data from Mysql to gwan cache (for a faster response from server to client), but I dont know how to let the program automatically initiate when the gwan start... What could I do? Thanks!!
moriya
  • 75
  • 9
0
votes
3 answers

GWAN Bidirectional Communication using websockets

Solved My solution for the read problem was to move the code to a handler, and there using HDL_AFTER_READ state to handle the websocket connection. After putting handshake to reply buffer, return 2 to send it. Additionally you might want to change…
griffin
  • 1,261
  • 8
  • 24
0
votes
1 answer

Scaling nginx with static files -- non-Persistent requests kill req/s

Working on a project where we need to server a small static xml file ~40k / s. All incoming requests are sent to the server from HAProxy. However, none of the requests will be persistent. The issue is that when benchmarking with non-Persistent…
0
votes
1 answer

How do I read or write a cookie in php using gwan?

How do I read or write a cookie in php using gwan? I tried use setcookie, but the only variables that appear are get and post in argv.
uNDERsCORE
  • 31
  • 2
0
votes
1 answer

Problems to start G-WAN

I try to install G-Wan on Ubuntu 12.04.1 LTS (x64). I follow the fast instructions: http://gwan.com/download When i execute $sudo ./gwan, shows me: Floating point exception (core dumped) Then i follow the slow instructions: …
madrikeka
  • 133
  • 1
  • 2
  • 8
0
votes
3 answers

G-WAN and persistent MySQL connexion

me again with a little question about G-WAN and MySQL. This script below works fine ... My only problem is when MySQL went down. G-WAN script crash and G-WAN as well. What is the nest way to keep a persistent MySQL connexion and handle MySQL…
solisoft
  • 669
  • 4
  • 12
0
votes
1 answer

Gwan stops working every night

I have a arch 64bit VPS on digitalocean. I installed gwan and run it in deamon mode. It stopped running every midnight. Here is the log file [Wed Apr 24 06:10:28 2013 GMT] memory footprint: 3.78 MiB [Thu, 25 Apr 2013 00:00:19 GMT] * child abort(8)…
0
votes
1 answer

Index as servlet, rest as static content

I picked up G-WAN only a while back and I'm trying to figure out how to make the index use a specific servlet while also having static content available. I moved index.html to index_old.html so I wouldn't have any conflicts. I placed the following…
Levi Schuck
  • 59
  • 2
  • 8
0
votes
1 answer

Gwan mono : calls to Gwan c# API dump core

I'm investigating gwan and am trying to run c# samples with mono, but encountered some problems. hello.cs dumps core as soon as c# Gwan API (wrapped) is hit. Samples with mono work ok unless Gwan API is called. If You take loan.cs sample it writes…
moljac
  • 946
  • 9
  • 12
0
votes
2 answers

gwan and mongodb

I am new to gwan and currently coding a simple program to insert and select data from MongoDB. After I compile the Mongo-c-driver, and put the Mongo standard library in /usr/lib/, I find that my program under gwan/csp folder has an error: Linking…
moriya
  • 75
  • 9
0
votes
1 answer

How to read, write file over gwan

I am new to gwan, and currently coding a read/write static file over gwan, however, I found that when I try to open file (corresponding to some parameter pass to gwan), it run the main() twice (or infinite looping), could any one help ? Thanks! Here…
moriya
  • 75
  • 9