4 ms·
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
by Osiris 14y ago
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 14y ago> 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 http://gwan.ch/developers
- eropple 14y agoI'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.
- deleted 14y ago[deleted]
- cdcarter 14y agoFrom 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?
- eropple 14y agoIt's honestly hard to tell, because behind the SEO-dross and random attacks on established, already-high-performance tools, there aren't many details at all. At first (I hadn't looked at the linked file) I immediately said "you have to be kidding me", but...then I looked at the Java file and I think you might be more on-target than I'm comfortable with. It does not look like it's running in a normal JRE, which makes me really skeptical of the sibling post claiming that "you can write Java however you want". (If it was running in a normal JRE, a ton of the stuff in loan.java makes little sense...)
- chc 14y agoThe 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 14y agoThat 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).
- asharp 14y agoIt wouldn't surprise me if it has something like GCJ creating something like a .so that it loads on the fly. That is just a thought though, i haven't inspected it particularly closely.
- Osiris 14y agoI did note in the comment about PHP support. I did notice the website mentioned C++/ObjC, but I just lumped those in as C variants. The Java integration looks interesting. The author in a forum post did say that he doesn't think that FCGI is the right way to go and suggested asking Zend to build a C library for GWAN that could run PHP code [1]. I find that unlikely unless GWAN really starts getting a large following. [1] http://forum.gwan.com/index.php?p=/discussion/comment/3801/#Comment_3801 http://forum.gwan.com/index.php?p=/discussion/comment/3801/#...
- ers35 14y agoPHP support is important for backwards compatibility. This is one reason why I am implementing FastCGI. See [1] for reasons why PHP+FastCGI is a poor choice in 2012. [1]http://gwan.ch/en_fastcgi.html http://gwan.ch/en_fastcgi.html
- otoburb 14y agoActually, on the developers page you linked it also lists JS, Lua, Go and Python as languages for GWAN handlers. I assume that means that those languages are supported via separate processes that are called out by the GWAN process since the page breaks those languages out separately from 'natively' supported C/C++/Obj-C, D and Java.
- ers35 14y agoI wrote the Lua, Go, and Python examples handlers. JavaScript, Lua, and Python can be linked directly with the server for performance you would not get via separate processes. I had more difficulty with Go, which you can read about on the forum.[1] They all work, but are just proofs of concept at the moment. G-WAN makes it easy to link with any C library, so it is not hard to use languages that expose a C API such as those listed. It is just a matter of writing a more complete handler. [1]http://forum.gwan.com/index.php?p=/discussion/463/writing-g-wan-servlets-in-go/#Item_2 http://forum.gwan.com/index.php?p=/discussion/463/writing-g-...
- tedunangst 14y agoyou setup directories named in certain ways I was intrigued by this and had a look. One level of the hierarchy requires directories either named with a starting # or $. !!! Possibly two of the worst leading characters to use if there's ever a chance one of these file names is going to hit a shell script. Or the command line. And since the point seems to be you can adjust the config by pushing things around with mv, seems like that's going to happen a lot. Rule number one when putting your metadata in a filename is to not use shell metacharacters.