InfoQ

InfoQ

Presentation

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Recorded at:
Recorded at

Node.js: Asynchronous I/O for Fun and Profit

Presented by Stefan Tilkov on Sep 09, 2011 Length 01:00:35     Download: MP3
     Slides
Sections
Architecture & Design,
Development
Topics
Javascript ,
Web Development ,
Dynamic Languages ,
QCon London 2011 ,
Languages ,
QCon ,
Conferences ,
Programming ,
Node.js ,
Asynchronous Programming
The next QCon is in New York June 18-22, Join us!
 

How would you like to view the presentation?

In case you are having issues watching this video, please follow these simple steps to help us investigate the issue:
1. Right click on the video player and select Copy log
2. Paste the copied information in an email to video-issue@infoq.com (clicking this link will fill in the default details in most email clients).
Note: in case your email client hasn't automatically picked up the email subject, please include in your email the URL of the video too.
3. Done.
We will investigate the issue and get back to you as soon as possible. Thanks for helping us improve our site!
Summary
Stefan Tilkov presents what asynchronous I/O means and how it can be performed on servers and web clients using Node.js and other JavaScript tools and libraries.

Bio
Stefan Tilkov is co-founder and a principal consultant at InnoQ, a consulting firm with offices in Germany and Switzerland. Stefan focuses on enterprise architecture consulting for Fortune 1000 companies, which currently translates to assessing SOA maturity and deriving appropriate steps for a road map towards a service-oriented enterprise.

About the conference
QCon is a conference that is organized by the community, for the community.The result is a high quality conference experience where a tremendous amount of attention and investment has gone into having the best content on the most important topics presented by the leaders in our community.QCon is designed with the technical depth and enterprise focus of interest to technical team leads, architects, and project managers.
  • This article is part of a featured topic series on QCon
Handling Asynchronous Computations by Faisal Waris Posted
Re: Handling Asynchronous Computations by Axel Rauschmayer Posted
Re: Handling Asynchronous Computations by Tristan Slominski Posted
  1. Back to top

    Handling Asynchronous Computations

    by Faisal Waris

    While this is an interesting presentation, I chuckled a bit because managing asynchronous computations with javascript seems harder than it needs to be.

    Consider for example the F# async monad. To sequence three async calls with data dependencies between them is as simple as writing the following:

    async {
    let! data1 = asyncCall1()
    let! data2 = asyncCall2(data1)
    let! data3 = asyncCall2(data2)
    return data3
    } |> Async.Start

    Notice that no nesting of callbacks is required.

    And this is all statically type checked. Type inference means very little explicit type information is needed.

    Try-catch, sleep, timers, events, async io, etc., all work in async monads without thread blocking.

    Similarly fork-join of 3 independent calls is as simple as:
    [
    asyncCall1();
    asyncCall2();
    asyncCall3()
    ] |> Async.Parallel |> Async.Start

    You can compose async monads together for handling many complex scenarios.

    In moving off of java, the smart people at Node.js maybe should have cast the net a bit wider than just javascript.

    Anyone interested understanding the essence of monads can check out this post: fwaris.wordpress.com/2011/07/30/understanding-m...

  2. Back to top

    Re: Handling Asynchronous Computations

    by Axel Rauschmayer

    Improvements are coming: github.com/dherman/taskjs

  3. Back to top

    Re: Handling Asynchronous Computations

    by Tristan Slominski