Create your own awesome maps

Even on the go

with our free apps for iPhone, iPad and Android

Get Started

Already have an account?
Log In

Test by Mind Map: Test
0.0 stars - reviews range from 0 to 5

Test

example application

see slides:

use package.json

follow common.js

usually doing exports in index.js

remember to expose the app using

module.exports.my_app = app;

example start web server using express

npm will install dependencies in node_modules

because we did require('<file name')

without relative path

about

sync threads vs async events

cons

sync threads, context switching, memory (stacks), synchronization, blocking I/O

same language/tools/staff

performance & scalability much much better

eg

Clarck(?)

pros

simplicity

code migrations

Japanese twitter clone, that dumped their JBoss async-io based servers farm & improved scalability with 1 server running 8 node.js processes

you need to know javascript (at least to read) because of the need to debug & handle failures

why coffeescript

readable great syntax

solves the error-prone javascript behavior

community

frameworks solving many needs

large user base

IRC channel

getting started

modules

asdasd, single file

complex

מצמצמצ.js

Single-threaded event-driven process with event loop

The claim is that while a 10ms call to DB is waiting, millions of operations can run

arch

standard library

node bindings

libio, libev, ...

v8

async events

CPU-intensive blocks the events loop, eg, service giving fibonacci answers, when called with large n, though, when modelled in EDA, you can solve it, example, EDA implementation of fibonacci

CoffeeScript

example application improved

update viewer, data for viewer in sockets if viewer.id isnt socket.id

test

hello

cool

wtf