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
3
votes
1 answer

How do I create a G-Wan global variable properly?

--- config.h extern char userurl[3]; char userurl[3]; --- index.c include "config.h" int main(int argc, char *argv[]) { char *req_g="",*req_p=""; get_arg("g=", &req_g, argc,argv); get_arg("p=", &req_p, argc,argv); …
stashfree
  • 655
  • 6
  • 22
3
votes
2 answers

Gwan C#, how to get HTTP headers?

I need it for rewriting url, to know which friendly url I am processing. For User-Agent and other stuff. EDIT: public class Gwan { [MethodImplAttribute(MethodImplOptions.InternalCall)] extern public static long getEnv(string arg, int…
Igor Golodnitsky
  • 4,456
  • 7
  • 44
  • 67
3
votes
2 answers

GWAN Key-Value persistent multiple store

I want to record a key-value in persistent mode but when I want to use 2 or more different stores it doesn't work. Here's my script: ... typedef struct{ kv_t *kv; char *name; } kv_data; int main(int argc, char…
John S
  • 231
  • 3
  • 11
3
votes
3 answers

Are there any low-level languages that can be used in place of scripts?

I am a "high-level" scripting guy. All my code is Class-based PHP or JavaScript. However, I want to know if there is any form of useful interpreter projects for "low-level" compiled languages like C or C++ (strange sounding huh?). This all came…
Xeoncross
  • 55,620
  • 80
  • 262
  • 364
3
votes
2 answers

How to reference Mono C# assemblies with GWAN C# servlets

I am trying to include a c# servlet CompanyListService.cs in gwan csp folder and getting a compile error 'The type or namespace name `PropertyManagement' could not be found. Are you missing a using directive or an assembly…
3
votes
1 answer

GWAN is modifying jquery.min.js to error

I am doing an experimental HTML template wich comes with jquery.min.js file - one of the most popular javascript libraries. When I load the template from my local hard drive it works fine. When I upload it and load it from server (GWAN) I get error…
Sasho
  • 3,532
  • 1
  • 31
  • 30
3
votes
1 answer

why is there LG_VHDL in gwan.h?

In the gwan.h header i see there is LG_VHDL. VHDL is, as far as i know, mostly for FPGA programming. Could you please tell me more why, what, how there is a something related to vhdl here ? I can't find anything about gwan and vhdl anywhere. vhdl is…
ker2x
  • 440
  • 3
  • 11
3
votes
2 answers

How to configure GWAN as a reverse proxy?

I saw some performance of GWAN and interested in testing it as a reverse proxy of static content in front of Apache with APC for optimizing PHP opcode, to run a Wordpress multisite. I can get GWAN up and running but I have no idea how to configure…
3
votes
2 answers

Can I add Access-Control-Allow-Origin: * to the default headers

I'm currently running a G-WAN server that hosts static HTML files. Right now I'm using an iframe to show the contents of these files. I would like to be able to load them cross-domain with JavaScript. Which, by default, is not allowed by the…
Fu-Raz
  • 73
  • 7
3
votes
1 answer

How to share memory between http requests in g-wan?

Lets say I have a g-wan server with c script, if a http request comes in and then another http request, I would like for both of these running scripts to be able to read and write from the same section of ram. In other words, I wish to just have a…
Phil
  • 46,436
  • 33
  • 110
  • 175
3
votes
2 answers

G-WAN handler rewriting solution

Here's my script : #include "gwan.h" // G-WAN exported functions #include // strstr() int init(int argc, char *argv[]) { u32 *states = (u32*)get_env(argv, US_HANDLER_STATES); *states = 1 << HDL_AFTER_READ; return 0; } void…
John S
  • 231
  • 3
  • 11
3
votes
2 answers

Does xbuf_frurl() supports HTTP_POST?

So far, I've only seen examples of using xbuf_frurl() with HTTP_GET method. Does this function in g-wan support HTTP_POST? If it does, how do I pass in the POST data? Thanks.
Andy Tam
  • 31
  • 1
3
votes
1 answer

ssl on gwan server

has anyone worked with gwan server using SSL? i have generated (self-signed) certificates in the the /cert subdirectory. the server hung when using https: are there any other requirements for SSL on g-wan error.log reads "READ:Tmo 144 bytes: 0:…
Gabe Rainbow
  • 3,658
  • 4
  • 32
  • 42
3
votes
1 answer

G-WAN cc1plus: error: unrecognized command line option "-std=gnu++0x"

I am starting to use gwan a lot. I'd like to use cpp but im getting a g++ error on Amazon: cc1plus: error: unrecognized command line option "-std=gnu++0x" Is there any way of ignoring/skipping the directive on my side, or specifying the g++ command…
Eli
  • 106
  • 7
3
votes
1 answer

URL rewrite on G-WAN for .JPG

I am testing G-WAN server and I'd like using rewrite rules. With apache the rule is : RewriteRule ^(.+)-(.+)-(.+)-1.jpg$ imagesproduitnew/$3/$2.jpg [L] I am trying to do it by handlers JPG, but I have lot of difficulties. Has anybody already done…
1
2
3
18 19