Your SlideShare is downloading. ×
World of Node.JS
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

World of Node.JS

1,704

Published on

Small, no-design presentation for my VIP practice session at the nerdcamp, 24 april 2011.

Small, no-design presentation for my VIP practice session at the nerdcamp, 24 april 2011.

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,704
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Node.JS World
  • 2. Prerequisites
    Browser
    Account on http://c9.io
  • 3. Why JavaScript matters
    Large pool of programmers
    Large corporations throw a lot of money at making it more efficient. V8 (in Google Chrome) is one of the fastest dynamic engines.
    Universal language (every web programmer knows it - ruby, python, php etc.)
  • 4. Node.JS
    It is a set of non-blocking APIs for the OS, built on top of V8 interpreter.
    It is a command line tool, mostly for Linux. 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.
    HTTP/S is a first-class citizen.
    CommonJS module system.
  • 5. Asynchronous, Event-based
    JavaScript is single threaded
    Everything runs in parallel, except your code.
    You don't have to worry about code accessing the same data structures at the same time.
    Node.JS uses async mechanisms of the underlying OS (epoll, libeio)
    It’s natural to write it in JS (closures, etc).
  • 6. Hello world using Node.js
  • 7. Why it’s good
    It’s JavaScript – mentioned before +
    Code reuse (shared codebase with client side)
    Modern, unified language
    CommonJS module system
    Large, easily accessible library of modules
  • 8. Why it’s good
    Efficiency (time+memory): no thread switching/process switching costs + epoll + libev + libeio
    Conceptually easier - no multithreading issues.
    Massive concurrency.
  • 9.
  • 10. Fast development pace
    Large active community
    1754 packages/libraries in popular package manager
    ~150 coders in Russia
  • 11. Alternatives
    Python: Twisted, Tornado
    Erlang: erlycomet
    Ruby: EventMachine
    Perl: POE
    Java: JBossNetty (based on java.nio)
  • 12. Most notable modules
    npm: packager
    connect/express/ejs/jade/stylus: web stack
    socket.io: real-time communication with browser (WebSockets, etc)
    coffee-script: JavaScript 2.0
    jsdom+vows+zombie: Unit tests + browser emulation
  • 13. Socket.IO
    Library to simplify implementation of realtime communication with different browsers.
    WebSockets
    Flash
    Long polling
    Polling
    Users don’t need to know about it.
    A lot of connections can be kept due to Node.
  • 14. Unsolved problems
    No complete easy, standard solution for servers
    Single thread -> single core. No standard solution for CPU-intensive tasks.
  • 15. Additional reading
    http://nodejs.org/
    http://npmjs.org/
    https://github.com/
    http://vowsjs.org/
    http://nowjs.com/
    http://howtonode.org/
    http://nodejs.ru/

×