
G-WAN - Web Application Server - hendler
http://gwan.ch/
======
eropple
I get bad vibes whenever I see server software that isn't permissively
licensed at least far enough that I can see the code. So I go look at their
FAQ to see what they say about getting source access:

<http://gwan.ch/faq#license>

WTF? I mean, in what universe would I trust this sort of handwaving? Lumping
people who might want to actually, y'know, _audit the software they're
running_ in with "oh my god they wants to steals my codes!"...I think I'll
pass and encourage those I know to do likewise. (Plus, as cdcarter notes
elsewhere in this thread, his reasoning for no OS X binary is incoherent at
best, and reading posts by the author makes me wonder exactly what chain of
jerkstores he's supplying with his attitude.)

~~~
derleth
From the site (which seems to disallow copy-paste):

> The next time someone feels the need to publicly call G-WAN's (1-page)
> license "weird" or "insane", look at what they sell and who they get their
> revenues from. Unlike for G-WAN, what they offer is not free for all.

They have redefined the word 'free' into a fine mist if they expect you to
believe Apache and nginx are not free. They're doing something I've seen done
before; oddly, it was mainly being done by Usenet trolls.

~~~
wh-uws
Slightly off topic but a hobby I've picked up recently is breaking web based
"no copy/paste" schemes.

Usually people map onmousedown,click,oncontextmenu, etc. events or some
permutation there of to return false and have an alert that say's something to
the effect of "no copying!"

You can easily defeat those by mapping whichever function to null on your
javascript console. ie:

    
    
      document.oncontextmenu = null
    

The Gwan guy's solution threw me off a bit because I was looking for another
javascript version to no avail.

In an interesting twist they've actually used css. That is every vendor
permutation of.

    
    
      user-select: none;
    

To disable that use your favorite developer tools and remove those styles from
whichever element you want to copy..

~~~
pokoleo
Build + Release a browser extension - I'd download it.

~~~
loungin
Do you have Firebug for Firefox (press F12 to bring it up) or the Developer
Tools (Ctrl-J) for Chrome? They make it trivial to toggle/edit CSS attributes
on webpages.

In GWAN's case (using Firefox) the rule was:

p, h1, h2, h3, h4, ul, ol, legend, label { -moz-user-select: -moz-none; }

------
Osiris
I tried out GWAN on a VPS a while back. There's no configuration file, you
setup directories named in certain ways to tell the webserver what IP/port to
bind to.

I cannot comment on how much fast it is because it's been years since I ran
benchmarks against it. Even supposing the claims are true, currently it's very
limited in what languages it supports. It's great at static content, but
dynamic content must be written in C or use a C library. In other words, PHP,
Python, and Ruby support are pretty much non-existent (though someone has
tried to get PHP FastCGI to work with it).

The author is also fairly arrogant. Earlier versions of the website claimed
his code was "perfect" and that he wrote it because no else seemed competent
enough to do it right (I'm trying to find the quote).

Regarding PHP: > And without something like G-WAN you can forget about PHP in
the years to come because it will not survive the parallelism's requirements.

~~~
ers35
> Even supposing the claims are true, currently it's very limited in what
> languages it supports. It's great at static content, but dynamic content
> must be written in C or use a C library.

That is no longer accurate. G-WAN now supports C, Java, C++, D, and Objective
C out of the box. [1] I am the someone who is implementing FastCGI support.

[1]<http://gwan.ch/developers>

~~~
eropple
I'm not trying to be disrespectful because I'm sure you've put in a lot of
work on your part of the project, but little to nothing on that page makes any
sort of sense. Where is this terrifying efficiency hit from "the frenetic wave
of abstraction layers" that the author of that page is claiming? Does the
author even realize that he sounds like a huckster and his claims about other
projects have only a tenuous relationship to reality? And why would I trust
the judgment of developers who think that writing web applications in C is a
perfectly cromulent idea?

Second reaction: am I actually supposed to take seriously something that looks
like that Java sample? 'Cause, er, I know a teeeeeensy bit about Java, and my
first reaction was "what kind of moron would write Java like that?". Java
isn't C, and this guy's bizarre worship of "programming to the metal" _(it's a
web architecture for god's sake!)_ makes no sense there.

~~~
cdcarter
From my preliminary read of that page and the linked loan.java, it looks like
the java is actually being processed into C code and then complied by the
server. Can anyone confirm if this is how the system is architected to
"support" java?

~~~
chc
The FAQ says it depends on either OpenJDK or the official Oracle Java, so it
doesn't sound like it's a special Java-to-C compiler, unless it's something
like a runtime JVM bytecode-to-C compiler.

~~~
eropple
That could be the case--I'm not going to dig deeply into it because honestly I
like having my brain still work, but it could be that the insanity in
loan.java is just because of the crappy C API being wedged into Java.

I'm not exactly sure how his claims of instant refreshing "scripts" works if
it's a conventional JDK, though. I mean, that's just not possible, even with
hot reloading (as Play Framework developers have learned to their
disappointment).

------
slyphon
My bullshit detector is going off so loudly, I think I best go lie down.

At my last company, we paid for a Zeus ZXTM license (which was an excellent
product and _very_ expensive for our little startup), and they didn't approach
the level of arrogance here. The varnish guy is kind of opinionated, but he's
got the chops to back it up, and you can, y'know, look at the source.

An obvious benefit of open source is also that if I take a large risk of
running my business on your oddball web server and you get hit by a bus, I'm
pretty much hosed. I'd rather buy 4 additional servers and run nginx than take
that risk. Or, y'know, use a CDN.

Whatever, if the developers really are THAT much more skilled and their
product is so far and away better than every other solution out there, then
they should really hire someone who knows how to do marketing and PR properly,
because they're not doing themselves any favors.

~~~
1SaltwaterC
I like the way Zeus deals with their performance claims: you can test it, but
you can not disclose the results. The same crap as Microsoft used to do.
Although I did sign up for a trial, I didn't bother going further after
reading the EULA. Long story short: nginx is powering our servers right now,
without any need for changing the platform.

~~~
slyphon
Hah, I didn't know that about the performance publishing. We used nginx for
static content and as an fcgi front-end.

------
plantain
I think they made a good choice to remove all the pages on their site accusing
Microsoft of a jihad against them, the site is much more respectable now.

You can still find the author accusing Microsoft of a Jihad against them on
archive.org [1] or on their forums [2]

Their stance on open source rubs me the wrong way too...
<http://gwan.ch/faq#license>

[1]
[http://web.archive.org/web/20101023050912/http://gwan.ch/en_...](http://web.archive.org/web/20101023050912/http://gwan.ch/en_jihad.html)

[2]
[http://forum.gwan.com/index.php?p=/discussion/comment/3165/#...](http://forum.gwan.com/index.php?p=/discussion/comment/3165/#Comment_3165)

------
Animus7
The "Support" page reveals how they charge $200,000/year for the privilege of
setting a header:

> 199,999 [Swiss francs]: Use G-WAN under the brand of your choice (custom
> "Server: x" HTTP header).

This isn't the most insane upsell I've heard of, but it's close.

~~~
X4
not really, it's selling technical support.

~~~
cdcarter
No, the support plan is different, this is actually an additional 200,000
swiss francs for that branding.

------
MetaCosm
I played around with this project a couple years ago, so I can give some
feedback on my experience. It isn't a con or joke and it isn't full of lies...
that said, I still couldn't use it.

First of all, it is mostly one guy, and he seems exceptionally bright, and a
bit freaking insane (Tesla was crazy but still smart, so it can work). I
exchanged a few emails with him that combined with lack of access to the
source drove me away from the project.

That said, every single claim he made I found to be either valid or an
undersell on the actual performance (it did even better than he claimed in my
tests). I was rather blown away by the performance, but the risk profile on it
just made it unacceptable. Code C-Script (it supports more now, I am aware,
but at that point it was C), no source, [possibly] nutjob one man show, no
ability to easily hire people to work on it (which to be fair is entirely
chicken and egg).

But, it is still a project I watch with mild interest... and I do encourage
people to try it (great comment on this thread how to run it as a user
<http://news.ycombinator.com/item?id=4110247>) and try it out, if nothing else
it is extremely opinionated software, and it really is borderline insanely
fast.

------
cdcarter
Here's a very interesting thread in the forums of the project maintainer
refusing (or perhaps denying his ability) to provide an OS X binary:
[http://forum.gwan.com/index.php?p=/discussion/420/g-wan-
on-m...](http://forum.gwan.com/index.php?p=/discussion/420/g-wan-on-mac-os-x-
lion-server/#Item_13). Perhaps _this_ is a third point on the "why would you
need it to be open sourced" continuum.

~~~
wtracy
"If you want to help me deliver a Mac version of G-WAN, tell me how to install
a C compiler on Mac OS X."

Sounds like there's some real bright ones on this development team.

~~~
1SaltwaterC
Pierre was a Windows-only developer for 20-something years. It may not sound
bright by taking that quote out of its context, but the thread itself is
longer that that. You know that "you can't teach an old dog new tricks".

------
staunch
For static content the massive leap was from multithreaded/fork()ing servers
to event-based servers (like nginx) powered by epoll (and similar). Event
based servers let you handle thousands of slow clients extremely easily.
That's basically all you need to get the kind of performance 99.9% of people
will ever need for static content. Nginx more than does this job.

For dynamic content multi-process servers are still just fine because your
code/DB requests are going to block for long periods, which is far easier than
writing non-blocking code. Putting an event-based server in front of a multi-
process server for dynamic stuff gets you the best of both worlds.

Something like G-WAN might have a niche for the few people that need to write
some piece of their service in C for performance reasons. But, you can pretty
easily do that as an nginx module as well, and it's simply not necessary
except in very rare cases.

It seems neat, but I don't think it's of much use to most people.

------
readme
Yet another red flag I just noticed in the instructions here:
<http://gwan.ch/download>

    
    
       sudo ./gwan
       Now go to localhost:8080 to try the demos!
    

But wait, I don't need root to open port 8080. So why sudo? Maybe some weird
install procedure runs.... No thanks.

~~~
ers35
G-WAN does not require any installation and you do not need to run it as root.
If you run G-WAN as root, it will automatically apply certain optimizations
such as giving itself access to more than 1024 sockets.

Remove sudo and the examples still work.

~~~
eropple
_> If you run G-WAN as root, it will automatically apply certain optimizations
such as giving itself access to more than 1024 sockets._

That this is termed "an optimization" _terrifies the shit out of me_. Even
moreso than the whole "hey, run it as root, broseph!" part.

I am unsure why you are carrying this dude's water, but nothing I have seen
makes anything related to this project seem either sane or production-safe.
There is _crazy_ in these hills, my friend. Undiluted.

~~~
ers35
> That this is termed "an optimization" terrifies the shit out of me.

What word do you suggest I use to describe configuring a program to have
access to more sockets?

> Even moreso than the whole "hey, run it as root, broseph!" part.

In daemon mode, G-WAN drops privileges to the user and group of your choosing.

~~~
pjscott
This is a little off-topic, but does it strike anybody else as weird that
we're still writing this kind of code in our servers instead of using an
external utility? Personally, I would probably just write something like:

    
    
        sudo chpst -u gwan:gwan -o 100000 ./gwan
    

This uses the chpst utility from runit to do pretty much exactly what you
described: set uid/gid, change the file descriptor limit, drop privileges, and
execute ./gwan. For similar reasons, it feels crazy that people still manually
write code to handle daemonization and pidfile handling, when there are easy
tools that will handle that for you, and generally do a really good job of it.
Isn't that the Unix Way?

~~~
eropple
It might be off-topic, but I'd never used chpst before. That one's going in
the toolbox. Thank you. :-)

------
ineedtosleep
Can't comment about the technology, but the site has this extremely SEO-ified
feel to it and makes the entire site less readable to me.

~~~
cdcarter
It's not just the site. Even the PDF manual is in this style.

"And this test is merely a single-thread test. Add concurrency and SQLite as
well as Tokyo Cabinet die in pain because a single write blocks other
read/write threads.

Not in G-WAN's case. It is never ever blocking nor delaying any processing.

How solid is it? G-WAN relies on it and has been tested with low and high
concurrencies."

I don't want all my comments here to be slamming this project, I just do not
understand this maintainers mind.

~~~
X4
>How solid is it? G-WAN relies on it and has been tested with low and high
concurrencies."

I've compared it and can back that up and I think that TC learned a lot with
Kyoto Cabinet as you can read on their page. Did you even compare SQLite and
TC vs G-WAN KV yourself before posting this?

~~~
cdcarter
I was merely showing an example of the writing style found throughout.

~~~
X4
Do you really judge software by the writing style of the author on the
homepage?

~~~
echaozh
I think it is very reasonable, if the author also writes the documentation,
which is the only way to get to know about the software.

------
readme
>Since its first release in 2009, G-WAN is the undisputed technical leader of
a well-financed (20 years old) market.

How come I am only hearing about it now?

------
chadnickbok
Sounds great, except web servers aren't something people pay for anymore.

Nobody wants to 'steal code', its that code for a WebServer _isn't something
worth stealing_.

As for being amazingly fast? I can write an _AMAZINGLY_ fast server capable of
serving up 'Hello, World!' at speeds that can blow everything else outta the
water; of course this is of no use to anyone anywhere.

~~~
ers35
You do not have to pay any money to run G-WAN.[1]

G-WAN is not merely a "hello world" server. See [2] for the API features and
[3] for more details.

[1]<http://gwan.ch/download>

[2]<http://gwan.ch/api>

[3]<http://gwan.ch/archives/gwan_linux.pdf>

------
ers35
I have been using G-WAN for about a year. If anyone has specific questions
regarding it, I will try to answer them.

~~~
jmitcheson
Generally speaking, are the performance claims legitimate?

~~~
ers35
The author of G-WAN provides a benchmarking script[1] you can use to test the
claims for yourself.

[1]<http://gwan.ch/benchmark>

I have tested the claims and find them to be legitimate.

If you have a more specific question, I may be able to provide more details.

------
cdcarter
I feel the same I felt when I first tried nginx so many years ago. And this
time, there's English language documentation.

~~~
merlincorey
NginX has had English language documentation on nginx.net and wiki.nginx.org
for years and years.

~~~
cdcarter
I recall finding good (which I understand is a loaded qualifier) English docs
was very difficult when I was first pointed in its direction.

~~~
merlincorey
Well, I have been using it since 0.6.x and helping out on freenode IRC and it
has been tolerable to good English at least since then. When Igor posted the
introduction documents[1] he even had them previewed on the mailing list so
that the English could be corrected before posting.

[1] <http://nginx.org/en/docs/introduction.html>

------
SeoxyS
This website tells me a lot about how it's "better" than the alternatives, but
tells me nothing about _what_ this even is. I've looked at it for a while, and
I still can't figure it out. It mentions web servers, communication libraries,
code parallelization, persistence layer... So what is it?

~~~
ers35
The manual explains it: <http://gwan.ch/archives/gwan_linux.pdf>

~~~
sausagefeet
I like how it claims to be provably safer than other webservers but the two
claims require reading the code.

~~~
X4
I love opensource, but I really can't understand people whining about one guys
closed-source program when most software+hardware around him is closed-source
also. That's so blind hatted.

~~~
sausagefeet
What? Almost the entire stack in every place I have worked, except a bank, has
been open source software. And I don't think people are upset that it's not
open source, they find it a joke that the author makes all these ridiculous
claims and is closed source.

------
rawoke
I was a huge fan+user until the author closed down he's forum on he's site for
no other reason(that I can deduce) he didn't like the feedback|comments about
the project. Pity I think those forums brought in a lot of "feet/traffic" to
the project !

------
lukeschlather
Is this a long troll? I'm amazed that a server billed as performant and
designed for "real programmers" needs to put gems like this on their product
pages:

> You have to change the PATH variable if you want to call programs without
> specifying their location.

~~~
readme
I am with you on this. I think it's a very elaborate ruse.

If it isn't, then they have totally failed at marketing and should try to fix
that.

------
mafro
"These examples illustrate how C scripts seriously fit the task of rapid (and
efficient) Web development – especially when used from a Web framework
designed to make things as simple as they should be"

LOL

------
Ygg2
I don't get it. If G-Wan is so much better (performance wise), what's holding
it back?

I mean other than the licensing and the attitude of its programmer.

~~~
ers35
Here are some reasons:

    
    
      * G-WAN is not open-source, so people (justifiably) resist trying it.
      * It lacks software that takes advantage of the platform.
      * G-WAN gets limited coverage on news sites. (it's banned from Wikipedia for example)
      * People react negatively to the extraordinary claims made by its author without verifying them with the provided benchmark tool

~~~
Ygg2
Well some of the claims do appear a bit far fetched and the terms used are
really confusing (my bet is that the programmer is non-native speaker).

And it's not banned from Wikipedia, it's just deemed not relevant. But that
can't be all, can it?

~~~
ers35
If you list the claims you feel are far fetched, I can try to provide evidence
to support them.

~~~
Ygg2
Perhaps far fetched is not the best word to use. The tone of some messages
(world's fastest server/web_proxy) is off putting but what really irks me is
the totally weird ones: Like units sold for Apple/Mircosoft/Google... What
does that prove? Google doesn't sell anything tangible (maybe they sold some
Google android phones but that was a one time event).

~~~
ers35
The first can be proven with the provided benchmarking tool.[1]

As for the second, I agree that the source of those "units sold" should be
cited.

[1]<http://gwan.ch/source/ab.c>

~~~
Ygg2
Ok for far fetched statement here is this: <https://gist.github.com/2932918>

They claim their algorithm is impossible to solve using robots... When it is
obvious that it isn't impossible...

~~~
ers35
That example is easy to solve because it is not using any of the provided
techniques that makes it more difficult for robots to solve the CAPTCHA:
"changing the HTML background color based on: mouse cursor hovering, previous
state or input or shared secret"

The purpose of the example is to give you a basis on which you could implement
an effective CAPTCHA.

The claim of "difficult or even completely impossible for robots" applies to
CAPTCHAs using the above techniques, which are not used in the example.

------
riffic
Oh, how sometimes I love Wikipedians' determination of what is notable or not
-
[http://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion...](http://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/G-WAN)

~~~
paulhodge
Ha, that is a fun read. My favorite part, where one guy points out that the
Google search for "g-wan web server" has 2,440,000 results.

The reply:

    
    
      Google search results for:
      "a-wan web server": About 8,030,000 results (0.29 seconds)
      "b-wan web server": About 5,600,000 results (0.21 seconds)
      "c-wan web server": About 4,010,000 results (0.28 seconds)
      "d-wan web server": About 3,410,000 results (0.29 seconds)
      "e-wan web server": About 2,770,000 results (0.25 seconds)
      "f-wan web server": About 2,430,000 results (0.27 seconds)

------
daemon13
I wonder what are the benefits of setting G-WAN versus 2-3 nginx with 10-15
gunicorns behind it?

In the latter case you have proven software that is easy to set-up and scale.
If need more, then :

\- add more nginx/more gunicorns \- add haproxy \- add DNS balancing

So, what's the point?

~~~
ers35
Adding more servers costs money. Doing more with less saves money.

See page 2 of <http://gwan.ch/archives/g-wan_case.pdf>.

~~~
daemon13
Well, in my specific case, I am OK with money - 10 VPS ~ $200-600 per month.
You spend more on a couple of trips to supermarket.

I don't have time and 15 years of programming under my belt.

------
bakkdoor
Gotta love their "insurance": <http://gwan.ch/insurance> o_O

~~~
shellox
"Source Code Insurance" I hope you don't have to pay monthly..

~~~
cdcarter
Per the fine print, it's yearly.

------
riccardot
I cannot access the forum. It seems he has blocked the forum. This really puts
me off. I find C-scripts really cool and the performance are really fast. I do
not think there is a better server to run C-based web sites

------
madrona
This is hilarious.

------
tjholowaychuk
fail

~~~
bakkdoor
this is insane.

------
gringomorcego
I'm sincerley interested in the ycombinator response.

I found out about this after searching for nginx/apache alternaitives, and it
seems to domeinate everything except the ram usage of nginx.

~~~
ers35
If you are referring to the memory usage comparison at [1], the latest G-WAN
version now uses less RAM than nginx.

[1][http://nbonvin.wordpress.com/2011/03/24/serving-small-
static...](http://nbonvin.wordpress.com/2011/03/24/serving-small-static-files-
which-server-to-use/)

~~~
mp3geek
And only tested with old versions of nginx.

~~~
ers35
Tests [1] and [2] both used the latest version of nginx at the time.

[1][http://nbonvin.wordpress.com/2011/03/24/serving-small-
static...](http://nbonvin.wordpress.com/2011/03/24/serving-small-static-files-
which-server-to-use/)

[2]<http://gwan.ch/benchmark>

------
shellox
I would never use this for a production system to be honest. I don't see the
benefits of G-WAN over nginx. Nginx is open source, so you can read the source
and modify it, which gives you much more control over the server, because you
know how the internals work. The nginx community is also really great, so you
can find solutions for problems really fast.

------
bullcrab
this is crap. node.js rocks. and node.js starting with v6 can do parallel cpu
as well. go node.js. go heroku cedar.

~~~
helper-method
What's V6?

