background preloader

Node.js

Facebook Twitter

Understanding node.js » Debuggable Ltd. Node.js has generally caused two reactions in people I've introduced it to.

Understanding node.js » Debuggable Ltd

Basically people either "got it" right away, or they ended up being very confused. If you have been in the second group so far, here is my attempt to explain node: It is a command line tool. You download a tarball, compile and install the source.It let's you run JavaScript programs by typing 'node my_app.js' in your terminal.The JS is executed by the V8 javascript engine (the thing that makes Google Chrome so fast).Node provides a JavaScript API to access the network and file system "But I can do everything I need in: ruby, python, php, java, ... ! ". Node.js Step by Step: Blogging Application. In the previous episode in this session, you were introduced to Node.js by creating a simple web server that displayed the obligatory "Hello world" text.

Node.js Step by Step: Blogging Application

Today, we'll take our knowledge to the next level as we begin the implementation of our blog engine application. During the course of this, episode we'll be adding our very first route and view. To do this, we'll learn a little more about Node's predilection for asynchronous behavior, and we'll also take a look at the File System ('fs') module for reading our first view into our application.

By the end of this portion of our series, you'll have a little better understanding of Node and of one of its libraries that makes it possible to use Node for scripting. Node.js From the Enterprise Java Perspective. Node.js currently is getting much attention because it uses a concurrency model that shows great promise in scalability: event-driven asynchronous Input/Output.

Node.js From the Enterprise Java Perspective

This model can handle thousands of concurrent user-requests and do that with a tiny memory footprint, things that cannot be done with the traditional multi-threaded concurrency model of Enterprise Java. This article explains this new approach from the viewpoint of an Enterprise Java developer. Steven Wittens - Acko.net. I've been administering Unix machines for many years now, and frankly, it kinda sucks.

Steven Wittens - Acko.net

It makes me wonder, when sitting in front of a crisp, 2.3 million pixel display (i.e. a laptop) why I'm telling those pixels to draw me a computer terminal from the 80s. And yet, that's what us tech nerds do every day. The default Unix toolchain, marked in time by the 1970 epoch, operates in a world where data is either binary or text, and text is displayed in monospace chunks. The interaction is strictly limited to a linear flow of keystrokes, always directed at only one process. And that process is capable of communicating only in short little grunts of text, perhaps coalescing into a cutesy little ASCII art imitation of things that grown-ups call "dialogs", "progress bars", "tables" and "graphs". The Unix philosophy talks about software as a toolset, about tiny programs that can be composed seamlessly. In the meantime, we've gotten a lot better at displaying information. Web console with node.js « Gonzalo Ayuso.

Node.js Tutorial Roundup. Javascript has always been important but usually it just hangs around in your browser, getting stuff done.

Node.js Tutorial Roundup

Learning Node.js « JTeam Blog / JTeam: Enterprise Java, Open Source, software solutions, Amsterdam. For projects and for some experiments I want to get a better way to do server push.

Learning Node.js « JTeam Blog / JTeam: Enterprise Java, Open Source, software solutions, Amsterdam

With the new HTML 5 becoming the standard and therefore WebSockets becoming available in all mayor browsers, it seems that WebSockets is the way forward. Nicolas Cannasse Blog - Is NodeJS Wrong ? NodeJS is pretty popular these days, so I took some time to have a in-depth look at it and analyze the pro/cons of using it against another server-side technology.

Nicolas Cannasse Blog - Is NodeJS Wrong ?

The first issue I can see is not technical : you have to rewrite all your programs and libraries by passing callback methods. This is a bit annoying since if you want to make three async requests you have to write the following : async1(function(result1) { async2(function(result2) { async3(function(result3) { }); }); }) You also have to adopt the same style as soon as you make a regular function call that will itself make an async call. There is one possibility however to convert this code into the following : var result1 = async1(); var result2 = async2(); var result3 = async3(); This involves using Continuation Passing Style transformation (CPS).

Once the syntax issues are solved, let's see how NodeJS is implemented : Codes from the Underground - Endtable, an ORM for CouchDB on Node.JS. Diving into Node.js – Very First App. What do I have till now?

Diving into Node.js – Very First App

After Node.js is istalled, described in my previous post, I can simply run this command: stoimenpopov:~# node server.js and this will start the server with the code within server.js. But what’s the code of server.js? Following the instructions of Node’s homepage and most of the tutorials I’ve found, I can simply copy/paste the code from the first lines of Node’s page: There are several things I find interesting in this code, making it different from JavaScript as we know it. Var http = require(‘http’) Diving into Node.js – Introduction & Installation.

Why I Need Something Like Node.js?

Diving into Node.js – Introduction & Installation

First of all the use of some software is needed not because of itself, but because of the need of some specific functionality. In my case this was the need of real time news feed. Node.js: A Beginner’s Perspective. I’d been curious about node.js for a while.

Node.js: A Beginner’s Perspective

Finding Twitter all atwitter about it at any particular moment isn’t difficult. People are experimenting with it and other JavaScript technologies, like WebSockets. Yahoo even showcased a multi-core HTTP server written in it a few months back. I already had a decent working knowledge of JavaScript. (If you don’t, check out Eloquent JavaScript or Crockford’s JavaScript to get up to speed.) Learning Javascript with Object Graphs. HEADS UP! This article was written for an older version of node. James Carr » Blog Archive » Lessons Learned With My Recent Node.js App. Recently I created a little web app for a friend’s conference to accept talk submissions and gather votes on those submissions to rank the top ones. For this task I used heroku’s node.js beta preview to host the application and a free couchone instance for the data store. JSAN - JooseX.CPS 0.11.

JooseX.CPS - Implementation of the Continuation Passing Style 1 for JavaScript, plus some syntax sugar, simplifying its usage in Joose methods and method modifiers Stand-alone usage: The same in OOP: Isaacs's npm at master - GitHub. JSAN - Joose 3.011. Joose - A postmodern class system for JavaScript Joose is a self-hosting meta object system for JavaScript with support for classes, inheritance, roles (aka traits), method modifiers and much more. The main goal of Joose is to make JavaScript Object Oriented Programming easier, more consistent and less tedious. With Joose you can to think more about what you want to do and less about the mechanics of OOP. The Joose framework has been successfully used in multiple production systems for twelve months now and has been proven to be very stable.

Joose is being tested using an automated unit-test suite that is being run in all major browsers (Firefox, IE, Safari, Opera and Chrome). Joose core package is only 8kb (YUI+gz). New to Joose? If you're new to Joose, the best place to start is the Joose.Manual docs, followed by the Joose.Cookbook. The cookbook recipes on Joose basics will get you up to speed with many of Joose's features quickly. This.SUPER(arg1, arg2, ...) Joose - advanced meta-class system for JavaScript. Geddy web framework for Node.js. Reid's node-jslint at master - GitHub. Limiting Concurrency in Node.js. Lets say you are writing your new awesome web application in Node.js, because you know, Node.js is the new hotness and awesome. Lets also say, your new Node.js web application does non-trivial things, and hits a limited backend resource.

You can't rewrite this backend system in the new hotness of async Node.js yet, so it can only handle 10 concurrent clients. This should be a very common situation unless you happen to be at a new startup and are green fielding your entire application stack. If thats your case, Lucky you! But for everyone else, you need to control the amount of concurrency that Node.js applies to your backend.

I am going to examine the simplest case of an HTTP server, which hits a backend resource, transforms it, and returns it to the client. All of the source code for the examples can be found inside my node-examples repository on github. Basic Reverse Proxy Limiting Outgoing Connections I have to say, ew! Limiting by accepting less Share. Node.js. Node.js Knockout. Building a Scrabble MMO in 48 hours » Startup Monkeys.

Last weekend, I was lucky enough to be able to participate in the first Node Knockout. The rules are simple: you have 48 hours to code someone amazing using the Node.js platform. Planning ahead is allowed, however it has to be all on paper (no digital assets, designs, etc) I’m not sure what it is about these weekend coding competitions, but they’ve always fascinated me. I love seeing real life demonstrations of the fact that technology has progressed to the point where you can go from a harebrained idea to deployed and functional product in a few intense dev days. Or maybe it’s because I remember my previous life as an ASP.NET developer where the first week of a project would barely cover the schema design and data access layer. Having also competed as a solo team in Rails Rumble the last few rounds with decent results, I had a good idea of what to expect. The Final Product.

Moving the Server to the Browser. I think that it’s well-established by now that the majority of desktop software will move to the browser at some point. It happened to e-mail, calendar, word processing and many more applications already. But here’s a crazy idea: what if we move the server to the browser as well? Hummingbird - Millisecond Real-time Web Analytics with Node.js. Hummingbird lets you see how visitors are interacting with your website in real time. And by “real time” we don’t mean it refreshes every 5 minutes—WebSockets enable Hummingbird to update 20 times per second.