I recently started on a new SSJS project, a WWW server I call Silk.
I'm only 2 days into it so far, but it's coming along quite nicely...
It's really a simple thing, sort of like NodeJS. From the command line, you run it like:
The server creates a global object for the script and places a res (global.res) and a req (global.req) object.
The req object contains the HTTP headers, method (e.g. GET, POST), the URI, IP address of the browser, etc. It will soon also contain the equivalent of $_REQUEST (PHP) variables and cookies.
My TODO list is amazingly short:
1) File uploads
2) Glue for Posix (e.g. core Linux functions: files, sockets, etc.)
3) Glue for MySQL
4) Keep-alive requests (this is a trivial bit of coding)
5) Implement include() and require() (commonJS style)
6) Optimize by precompiling scripts
7) Gzip output compression
8) Shared memory between chlidren/scripts.
9) Built-in cron
Without any real optimizations, the HTTP child processes do a lot of work. They create a SpiderMonkey Context, create the global object, stuff req/res objects into the global object, and does an eval() (basically) on the script.
Clearly Silk can be used to implement full blown WWW applications (include/require!).
I'm not entirely sure what I'm going to do with Silk when I get it to alpha or beta stage. More to come.
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us