I was intrigued by reports of nide, a web-based IDE for Node.js. It was one of the entries in the Node.js Knockout challenge last summer.
So how do you install it? One line on Linux; but I did not want to put it on my web server and I re-purposed my spare Linux machine last year after one of my other servers broke.
I decided to run up a Debian install on a Hyper-V server that has a little spare capacity.
I then followed the setups here for setting up Node.js and npm (Node Package Manager). I also installed nginx which I have been meaning to try for a while. Linux on Hyper-V works fine, though you have to use a “Legacy” network adapter which compromises performance a bit, unless you are willing to tackle installing Microsoft’s Hyper-V integration components for Linux, which do not support Debian though it is said to work. I do not need a GUI and the legacy network adapter is OK for this.
Nide is a simple affair which is essentially a file manager. Projects are displayed in a tree view, and you select a file to view or edit it. The icons at the bottom left of the screen let you create and delete files and folders.
The smartest feature is version management. Files are saved automatically and you can easily compare versions and revert if necessary. The “Go backward in time” button shows that auto-saves are quite frequent.
There is also a GUI for npm built-in. Pretty good for a competition entry, though I had a few problems.
If you are interested in web-based IDEs, another interesting one is Orion, an Eclipse project. Executive Director Mike Milinkovich says Orion will ship a 1.0 release later this year.
Microsoft will port node.js to Windows in partnership with Joyent. This will work on Windows Azure as well as other versions of Windows back to Server 2003.
But can you not already run node.js on Windows? This is possible using Cygwin and instructions are here. Cygwin makes Windows more like Linux by providing familiar Linux tools and a Linux API layer. Cygwin is a great tool, though it can be an awkward dependency, but a true Windows port should be higher performance and more robust, particularly as the intention is to use the IOCP API. See here for an explanation of IOCP:
With IOCP, you don’t need to supply a completion function, wait on an event handle to signal, or poll the status of the overlapped operation. Once you create the IOCP and add your overlapped socket handle to the IOCP, you can start the overlapped operation by using any of the I/O APIs mentioned above (except recv, recvfrom, send, or sendto). You will have your worker thread block on GetQueuedCompletionStatus API waiting for an I/O completion packet. When an overlapped I/O completes, an I/O completion packet arrives at the IOCP and GetQueuedCompletionStatus returns.
IOCP is the Windows NT Operating System support for writing a scalable, high throughput server using very simple threading and blocking code on overlapped I/O operations. Thus there can be a significant performance advantage of using overlapped socket I/O with Windows NT IOCPs.
I have been meaning to post about VMWare’s Cloud Foundry, a new cloud platform for Spring Java, Ruby on Rails and Node.js applications. Good, incidentally, to see Node.js getting increasing attention – see my post from December when I heard Ryan Dahl present on the subject. I signed up for Cloud Foundry when it was announced, since it has free participation in the current beta.
Today my account went live and I spent just a few minutes creating a first application using the steps here. Well, my first app is indistinguishable from a static web page; but having been immersed in Windows Azure for the last few days, with its accounts and subscriptions and certificates and the portal and the ServiceConfiguration.cscfg and the ServiceDefinition.csdef and all the rest of it, I admit to having a pleasant sense of “is that it?” when deploying the Cloud Foundry app.
I typed a few lines of Ruby code, saved the file to a directory, and then typed vmc push.
Let me add that I like what Microsoft is doing with Azure, and that in combination with Visual Studio it makes an impressive cloud development platform that, from what I have seen, works very well; I think it is of major importance. I also like the fact that Microsoft has pushed down the cost of entry, with its Extra Small instances and more generous offers to MSDN subscribers, partners and others. It easier to experiment a bit with Azure than it used to be.
Nevertheless, Azure lacks the delightful simplicity of getting started that you can see in Cloud Foundry. After doing my Hello World app I look forward to trying something more advanced; and while I am sure that the delightful simplicity soon disappears as the lines of Ruby code increase, and as you try to make your application scalable and transactional and secure and all those good things, the fact that it draws you in is an advantage.
I’m just back from Dreamforce in San Francisco, where one of the sessions I enjoyed most was from Ryan Dahl in the Cloudstock pre-conference event.
What was Dahl doing at a Dreamforce conference? That was a question that puzzled me, until later in the week when it was announced that Salesforce.com is acquiring Heroku. Heroku has been experimenting with running node.js on its hosted infrastructure for Ruby applications, and may come up with a Ruby wrapper.