Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does anyone has first-hand experience with G-WAN web Server?

The only place where I found informations on G-WAN web server was the project web site and it looked very much like advertisement.

What I would really know is, for someone who is proficient with C, if it is as easy to use and extend that other architectures. For now I would mostly focus on scripting abilities.

Are C scripts on GWAN easy to write ? Can you easily update and upload new C scripts to the server (say as easily than some PHP or Java pages on other architectures) ? Do you have to restart the server when doing so ? Can you easily extend it with third party or existing C libraries ?

Any other feedback welcome.

like image 927
kriss Avatar asked Aug 17 '10 13:08

kriss


5 Answers

Well, now G-WAN is available under Linux, I am using it for more than 6 months.

The C scripts are fully-ANSI C compatible so there is no difference for any seasonned C programmer.

To update them on the server, you can edit them directly in the /csp folder (remotely via SSH) or locally on a test machine (and copy them later): G-WAN reloads scripts on-the-fly when they have been changed on disk (no server stop required).

G-WAN C scripts can use any existing library (starting with all those under /usr/lib) without any configuration or interface: you just have to write a '#pragma link' followed by the name of the library at the top of your script.

What I found really useful is the ability to edit C scripts and refresh the view in the Internet browser to see how my code works.

If there is a compilation error, then G-WAN outputs the line in the source code (just like any C compiler).

But where it enters the extraordinary area, is when you have a C script crash: here also it gives you THE LINE NUMBER IN THE SOURCE CODE (with the faulty call and the backtrace).

Kind of black-magic when you are used to Apache modules.

like image 148
Fred Avatar answered Nov 11 '22 00:11

Fred


My experience with G-WAN and its C scripts are:

  • The G-WAN community is very small. Questions you have are mostly answered by its single developer.
  • I consider the API not mature: it's not as "clean" as Java APIs.
  • The limitation, but at the same time the power, of C: it's a systems programming language. So writing application logic in it must be done carefully.
  • You generally need to be a good developer to get good results: if you do something wrong, the server crashes fast and hard (Unix-style).

I've written some scripts now, to try out G-WAN. Overall, it's been very "productive": not much bugs and it works if you follow the guidelines and don't want to do too much funky stuff you expect it to have, like mature web servers. However, I have got the feeling I'm reinventing the wheel a lot of times.

like image 29
Pindatjuh Avatar answered Nov 11 '22 01:11

Pindatjuh


G-WAN also support scripts written in other programming languages (C++, Objective-C, Java, etc.) so you will benefit from whatever native libraries each language implements.

For C scripts, well, the /usr/lib directory lists more than 1,500 libraries that G-WAN can re-use with a simple #pragma link "library".

I found it neat to be able to write a Web application with a part in C, another in C++ and a third one in Java!

like image 23
Milan Avatar answered Nov 11 '22 01:11

Milan


Benchmark shown how G-wan fare poorly at handling these tests.

http://joshitech.blogspot.sg/2012/04/performance-nginx-netty-cppcms.html

like image 39
Proyb2 Avatar answered Nov 11 '22 02:11

Proyb2


I have been using G-Wan for about two years. I consider it highly stable and production ready for static files. I have a number of static sites running for over a year with no issues.

I have built some small scale dynamic sites in C with it as demos/test projects. A bittorrent tracker and a real time analytics platform both using the KV Store for data backing.

In my view building large scale dynamic sites in G-Wan is possible but only with a significant investment in development and support. G-Wan is better suited to building robust highly scalable "enterprise grade" applications than tossing something together over a weekend.

like image 1
Ersun Warncke Avatar answered Nov 11 '22 00:11

Ersun Warncke