The numbers are true. For serving static files, Apache is faster by about 10% on my laptop (where I did the benchmarks). However, I spun up an assortment of different instance types on Amazon AWS/EC2 and on more than half those instance types, SilkJS was faster than Apache by 10% or more. It really depends on the environment.
I did not intend for SilkJS to be an apache replacement, though. It was meant to be able to act as an application server for ExtJS and google closure library type applications. The serving of static content is a requirement to just kick off the page in the user's browser. The most useful thing about SilkJS is for responding to many Ajax requests from clients. For my applications' needs, and I suspect every RIA can benefit from this, I wanted near 0ms wait time on those requests so the RIA feels like a desktop application. With a server like Apache + PHP, there's a lot of penalty involved in starting up the PHP engine, including all the library files/classes, and so on. What I've seen is similar application logic for Apache + PHP 5.3 with APC runs 30x to 70x slower than similar application running in SIlkJS. Thanks to V8! This is the win. If you could help me right away, it would be to provide a detailed explanation of Isolates and how to use them. SilkJS is pure multi- process based, and some people have suggested it would be great to have it thread based. SilkJS was originally conceived as a C++ server and used pthreads instead of processes. I'd ideally like to use that model if I could. As focused as I am on performance, a little anecdote might amuse you. When implementing MySQL glue for SilkJS, I was astonished at how fast the C++ code performed queries. 450 records of 25 columns in just a few microseconds. Turning that result into a JavaScript array of 450 objects with 25 members each took 5-10 ms! After all, it was 450 Object::New() and 11,250 Object->Set() calls. I wrote a second implementation that used std::string and created one big long string of JSON describing the desired array of objects. Then in JavaScript, eval() it. 50% faster! And when I wrote the same code in PHP and ran it, the SilkJS version was 33% faster. On Dec 8, 12:08 am, Yang Guo <[email protected]> wrote: > Hi, > > this seems really great, especially if the performance numbers are as > good in real world use! Please do send us feedback on any issues you > have with V8 in the future :) > > Cheers, > > Yang > > On 6 Dez., 18:11, mykes <[email protected]> wrote: > > > > > > > > > I hope this is appropriate. > > > SilkJS is what I call a "Swiss Army Knife" for server side JavaScript, > > built on top of V8. It features a very fast HTTP server written > > almost entirely in JavaScript, but can be used as a general command > > processor (supports #!/usr/local/bin/SilkJS as first line of scripts). > > > Seehttp://www.sencha.com/forum/showthread.php?160128-Announcing-SilkJS > > for more details -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
