I have been using SilkJS for a few hobby projects of mine. So far, the performance is amazing, and I absolutely love being able to use JavaScript for both the front-end and the back-end. I am thinking about using it in some commercial projects, but I want to do my due diligence on the viability of such a decision. There are some questions I have, and would like some insight into.
1) What enterprise projects, if any, do you guys know using SilkJS?
2) What resources are available regarding the security of using SilkJS as a web-server, or other V8 based solutions? (history of vulnerabilities, average time to patch, etc).
3) What pitfalls have you guys faced with using SilkJS or other V8 based solutions as a web-server, and how, if possible, have you dealt with it?
4) Does SilkJS handle horizontal scaling well (distributing load across multiple servers)? Is your answer based on theoretical calculations, and field-tested examples?
5) What resources are you aware of regarding the building of a website using SilkJS as the web-server, besides the official website itself?
Before responding, let me first eliminate 80% of the responses I will get with the following constraints:
1) No, I will not use NodeJS. For both business and mental-health reasons, asynchronous call-back frenzied programming is not something I will use. Do not attempt to convince me that I will "get used to it and love it". It's not optimal for the type of projects I am working on. Yes, you heard me - asynchronous is not perfect for everything.
2) I am aware that synchronous programming can be simulated in NodeJS. No, I am not interested in that either. I am not using NodeJS - get over it.
3) I am fully aware that most applications are i/o bound and not cpu bound. As a result, yes, using PHP is usually fine. However, there are certain projects for which cpu optimzations due yield a sizeable return on investment. No, a company does not have to be Facebook for this to be true. This is not intended to be a discussion on "why PHP is okay". It is an exploration of the reliability of SilkJS for more commercial projects.
3) Yes, I know what Java is. No, I am not interested on why that would be great if I wanted to reduce the cpu bottleneck. Once again, this is not intended to be a discussion on "why other languages are okay". It is an exploration of the reliability of SilkJS and V8 based server-side solutions for more enterprise projects.
4) Yes, it is possible to have a best answer to this question. Whoever makes the best case for or against the use of SilkJS for use in an enterprise environment gets the correct answer vote.
Also, I am aware that despite my desire to avoid NodeJS, it does utilize V8. In that regard, I am open to security reviews and stability reviews for V8 on the server-side within the context of usage via NodeJS.
As for what I mean by "enterprise", think e-commerce sites with several hundred thousand hits per month and/or applications for which stability and up-time are essential and have hundred of thousands of users.
My goal here is not to bash SilkJS. I absolutely love it, and will continue using it when possible. However, as a professional programmer, I can't just use what I enjoy for every project. So, let the insight commence..
SilkJS should scale exactly like you would Apache+PHP. Load balancer in front of a farm of SilkJS servers. Scale a MySQL backend like you already know how.
SilkJS does not do GZIP or SSL. I think it would be a risk to trust an implementation of either or both of those in the wild, against all the various bots (hacker or otherwise), spiders, browser, custom perl programs, etc. You can trivially implement Apache as a reverse proxy in front of SilkJS to provide those functions.
In fact, you can shard your server side application and use apache as a reverse proxy to connect to the proper shard based upon URL requested.
I think if you post any security or other issues to the SilkJS google group, you will see a patch posted to the github repository in a timely manner.
Other than the SilkJS.net site, you might look for various repos on github that have example programs using SilkJS.
http://www.sencha.com/blog/discover-music-with-sencha-touch-2
That article discusses how Modus Create built an application for NPR using Sencha Touch as the front end and SilkJS as the back end. It says:
"The SilkJS servers are hosted on Amazon’s EC2 cloud, behind a load balancer for both speed and redundancy. Both SilkJS hosts are fed by the NPR API via cURL and are responsible for trimming more than 300KB out of the data package, bringing the average load to less than 200KB before being gzipped for transmission!"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With