As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Today is 9/17/2011. As of today, what are the biggest reasons why Node.js is unstable, or not ready to use for everyone as a public facing server by itself.
A few things that I've come up with are:
Apps will shut down if unhandled exceptions occur
Libraries are still young and change a lot
Right now I plan on creating an e-commerce site using Node.js, Mongoose, Express, and forever -- and I need some solid reasons to consider so that I can be prepared for whatever comes along. I'd also like to look into how easy it would be to hack, but I'm not too concerned about that yet because it seems like it's quite improbable if I follow standard practices like sanitizing inputs.
Why is node.js unstable?
There are a few
node.js does not work stably on windows
node.js is simply not as tried and tested as say, nginx.
the core API hasn't frozen yet (although it's unlikely to change).
The reasons you mentioned are falicies.
Apps will shut down if unhandled exceptions occur
Yes of course they do. Unhandled exceptions (remember that exceptions are exceptional) crash and burn the server. This is why in production we have strong guards against this. We use clusters of nodes that restart any instances of your application if one crashes.
Libraries are still young and change a lot
Not really. Most of the libraries out there that are stable are indeed stable. There are plenty of libraries which carefully warn you that they are in development / unstable / not production-ready. The only difference is that in the open source community you get exposed to a lot more libraries that aren't ready. Where as in closed source communities you only see libraries when they are ready.
Honestly though 0.4.x is stable on linux and I would use it. I'd still probably also use node.js as a load balancer in front of other node's rather then use nginx but that might be considered risky.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
So it's my first time actually making a website and hosting it online--most of what I've done has been tutorials and class work. Now a friend and I want to make something professional and maybe evolve into a business.
1.) I want to be planning long-run but am kind of afraid of being committed to something I have rudimentary knowledge of. What do you think about starting with these technologies (CouchDB, Node.js)? The long-run goal is that it will be social networky and use search, hence noSQL. Will be using Linux + RoR. Node.js is still a bit elusive to me though I've read a lot about it.
2.) Do most web hosting services support these technologies or do I have to find specialized hosting services or host them myself?
3.) What about Cloudant and Nodejitsu/CloudOne--should I consider using these? Other suggestions much appreciated.
I would most certainly recommend a well established PAAS provider. Like maybe Heroku or AppFog. They will make sure you only have to worry about developing your next cool app rather than being a sysadmin.
Heroku also supports deployment by git which is nice. Another big advantage is If your application actually kicks off and you need to scale, scaling with these PAAS providers is often as simple as playing with a few sliders!
1 . There are a lot of noSQL databases available MongoDB and CouchDB are pretty good. They have good documentation. But make sure they fit your exact need before choosing either. RoR is again a great framework. Notably used by twitter. And of course leave the actual server administration to PAAS providers!
2. Checkout Heroku or AppFog. Both of them support RoR and are well reputable with good documentation and community available.
3. I would recommend using Node.js if you plan to build an app which handles a lot of concurrent connections. Like a chat app for example this is basically where Node.js shines.
And finally, Don't think too much into what the hip technologies are. Choose what you are familiar and comfortable with. And most importantly choose what fits your exact need.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I know node.js can build web apps that run super fast, but I just can't find enough info about how it would perform in a magazine or news style website. I know some CMS's like Joomla or Drupal (or even wordpress) are very good at it, but as the number of users grow, I'm seeing some performance issues. Naturally, the web server count but as I want to host it in the cloud, I guess working with node and just create a simple CMS based on it would suit the needs for a better user experience once many users can log in and do their social stuff parallel to the main side of the site that is just a news and reviews site. Does any node.js coder knows about it?
Agree that this is rather subjective, but that said having some experience with node I don't know that there is any particular advantage to using it in this instance. I think frameworks like Django (Python) and Rails (Ruby) are more or less built to accomodate this type of use-case and assuming you have PHP experience but not a lot of node experience, would likely be easier for you to build and deploy a working CMS with very quickly.
Based on what you've described I don't know that any of the advantages of using node will be particularly relevant, and it's unlikely that using node instead of any other modern framework and web server will have a huge impact on your site's performance.
I think this question is quite subjective, as the performance of any application written using modern and maintained languages will depend mostly on the skills of the developer(s), and if your website reaches a certain scale it will not depend only on the language but also on the architecture of your distributed system.
Some of the usual strengths of node are that it is event driven, single language for front-end, back-end thus developer integration should be easier. It's event-driven model gives it a nice and easy(subjective!) way to write and understand (for new devs) applications that make heavy use of concurrent operations such as data-intensive operation across distributed systems.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Until now I've been developing in PHP. Now I'm about to begin a couple of new projects, and I think node.js would be perfect for them. I read some general (internet-oriented) guides on the language, and I can understand them with no problem, but then it seems to become all extremely messy when it comes to put it all together in a real development situation (trough the usage of the many, many available frameworks).
The best guides that I could find looked really dated when I tried to follow them.
Therefore I came to ask in person if you could provide me with some recent and vaguely complete tutorials/resources on how to develop applications (both server side and client side) entirely in javascript.
I usually tend to work only in long term (and medium to large scale) projects and therefore I would like to keep the libraries to a minimum. But I'm also not a hackery type: I like to be able to focus on the logic of the programs, and usage of frameworks is totally accepted. I just wouldn't like to be overloaded with functions that I'm never going to use (or could easily implement myself).
Thanks a lot for your help!
Node.js is built from the ground up on the idea of having a lightweight core that can be extended with any number of libraries (i.e. node core vs. userland). Thus if you use node, you will - endogenically - end up using a lot of little libraries (or libraries that bundle a lot of libraries).
The brilliance here is that you get to choose yourself what kind of stack suits best the specific situation at hand. Node's package manager (npm) is superior in this fashion -- it let's you manage very heterogenous stacks with ease.
If you come from a more opinionated environment like PHP (or rails), the amount of different frameworks and libraries can be overwhelming at first. Node.js does not enforce you to use any specific stacks or conventions, which gives you more flexibility to do whatever you like. In fact you shouldn't even think of node.js as a framework -- it's a JavaScript runtime environment on top of which you can build web servers (and web frameworks).
if you are looking for popular ways people apply node.js, a good starting point is checking out how popular (and dependent on) are various packages in npm (see https://npmjs.org/). Based on the popularity (and dependence counts) of packages, one could recommend using the following kind of stack:
Use express.js (based on connect.js) as your web application framework
Write server-side markup with jade
Use request, async and underscore as helper libraries
Use mocha for writing tests
Optionally write your application in CoffeeScript
Use MongoDB as your database (and optionally redis for like sessions)
Please note this stack is just based on what kind of library choices are popular among npm users -- it doesn't tell you what kind of stack would best suit your specific situtation.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Benchmark
Hacker News Discussion
Hacker News Discussion 2
It's not like Node.js is even really dominant today (except in the Hacker News community of course), it hasn't even had a 1.0 release yet. Funny to be speculating on what might replace it already :)
Performance is nice (though micro-benchmarks are not the right way to judge that) but if that was the only thing that mattered we would all be writing custom web servers in C for every app. One of the other important things is the community support, which Node.js definitely has going for it at the moment. It has a very healthy open source (this being the key) community that has created a large library of tools.
I think Vert.x is interesting and has a different way of looking at things than Node.js which is great. If they are able to continue to make progress, get more people interested in it, and show that it is easier and faster to write web apps then who knows? Maybe in a few years we can have a discussion on what is going to threaten Vert.x's future.
There are some interesting things brought up by this micro-benchmark that may be worth addressing in Node, but it's very important to remember that nobody doing 100's of millions of hits per day (which these benchmarks show) does so on one machine. They do it on many machines.
There are certain levels where faster languages make a difference (see for example Twitter migrating their backend from Ruby to Java), but it's VERY rare to get to that position.
Most people need a language that is clean and easy to program in, and a good ecosystem.
Vert.x has no ecosystem to speak of. If you want a JVM based system you can get plenty of options there. If you want a Javascript based system the best option right now is Node.js. It's that simple.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I'm interested in choosing a best web server for node.js
Node.js is used to create, among other things, servers.
From Wikipedia:
Node.js is a software system designed for writing scalable internet applications, notably web servers.
So, you don't need to get another web server. You do need to get a machine that lets you install node. A lot of people prefer Amazon AWS which lets you run machines, and install whatever you want. Another popular option is Heroku which tries to take complexeties out of it. I, honestly, get more confused by it. Pretty sure you could also go with something like Rackspace.
node.js isn't "running" on neither its own nor apache/nginx, it doesn't need a webserver to run at all (imagine a node.js script that copies files for example). it depends on what you intend to use it for. however if you want you can write a webserver in node.js very easily, it has good HTTP support: http://nodejs.org/docs/latest/api/http.html
And sure you can (if you have written a webserver in node.js) put it behind apache/nginx to let them serve static files for example or to use https (since SSL support for node.js isn't very stable yet compared to apache/nginx)