Node.js is an asynchronous JavaScript runtime built on Chrome's V8 JavaScript engine. It allows JavaScript to be run on the server-side and is used for real-time web applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. The document discusses how to install Node.js and manage different versions using the nave package manager.
Vert.x – The problem of real-time data bindingAlex Derkach
As the popularity of any event-driven application increases, the number of concurrent connections may increase. Applications that employ thread-per-client architecture, frustrate scalability by exhausting a server’s memory with excessive allocations and by exhausting a server’s CPU with excessive context-switching. One of obvious solutions, is exorcising blocking operations from such applications. Vert.x is event driven and non blocking toolkit, which may help you to achive this goal. In this talk, we are going to cover it’s core features and develop a primitive application using WebSockets, RxJava and Vert.x.
ASFWS 2012 - Node.js Security – Old vulnerabilities in new dresses par Sven V...Cyber Security Alliance
New technologies are a good thing as they drive innovation. Especially in the web world, innovation is what lead to todays popularity of Sites like Google, Twitter and Facebook. Regarding security, new technologies also come with the possibility to avoid known security issues already in the design of a technology or for example a new programming language. Unfortunately most of the time, security is not a main focus and therefor also known faults are done over and over again. In addition to this, new technologies also tend to invent new vulnerability classes or at least open new ways to exploit known security issues.
In this talk I’ll take as a practical example the Node (Node.js) project which allows server side non-blocking JavaScript development. It’s great to have the same language for the frontend as for the backend as it makes things much easier to connect and also the frontend and backend developers can better understand each others work. Many people still think about JavaScript as static *.js files somewhere in a web accessible directory which is not security relevant as it’s static. This is simply not the case. In the past there where already a lot of reported security problems in JavaScript so the question is: Will those problems also affect Node? I will answer this and more questions during the talk but be assured, we’ll end up with a reverse shell
Vert.x – The problem of real-time data bindingAlex Derkach
As the popularity of any event-driven application increases, the number of concurrent connections may increase. Applications that employ thread-per-client architecture, frustrate scalability by exhausting a server’s memory with excessive allocations and by exhausting a server’s CPU with excessive context-switching. One of obvious solutions, is exorcising blocking operations from such applications. Vert.x is event driven and non blocking toolkit, which may help you to achive this goal. In this talk, we are going to cover it’s core features and develop a primitive application using WebSockets, RxJava and Vert.x.
ASFWS 2012 - Node.js Security – Old vulnerabilities in new dresses par Sven V...Cyber Security Alliance
New technologies are a good thing as they drive innovation. Especially in the web world, innovation is what lead to todays popularity of Sites like Google, Twitter and Facebook. Regarding security, new technologies also come with the possibility to avoid known security issues already in the design of a technology or for example a new programming language. Unfortunately most of the time, security is not a main focus and therefor also known faults are done over and over again. In addition to this, new technologies also tend to invent new vulnerability classes or at least open new ways to exploit known security issues.
In this talk I’ll take as a practical example the Node (Node.js) project which allows server side non-blocking JavaScript development. It’s great to have the same language for the frontend as for the backend as it makes things much easier to connect and also the frontend and backend developers can better understand each others work. Many people still think about JavaScript as static *.js files somewhere in a web accessible directory which is not security relevant as it’s static. This is simply not the case. In the past there where already a lot of reported security problems in JavaScript so the question is: Will those problems also affect Node? I will answer this and more questions during the talk but be assured, we’ll end up with a reverse shell
Save 10% off ANY FITC event with discount code 'slideshare' - http://www.fitc.ca
OVERVIEW
Node.js is a runtime environment and library for running JavaScript applications outside the browser. Node.js is mostly used to run real-time server applications and shines through its performance using non-blocking I/O and asynchronous events. This talk will introduce you to Node.js by showcasing the environment and its two most popular libraries: express and socket.io.
TARGET AUDIENCE
Beginner web developers
ASSUMED AUDIENCE KNOWLEDGE
Working knowledge of JavaScript and HTML5.
OBJECTIVE
Learn how to build a chat engine using Node.js and WebSockets.
FIVE THINGS AUDIENCE MEMBERS WILL LEARN
Node.js environment and basics
Node Package Manager overview
Web Framework, express, basics
WebSockets and Socket.io basics
Building a chat engine using Node.js
Introduction to node js - From "hello world" to deploying on azureColin Mackay
Slide deck from my talk on Node.js.
More information is available here: http://colinmackay.scot/2014/11/29/dunddd-2014-introduction-to-node-jsfrom-hello-world-to-deploying-on-azure/
Node.js and server side JavaScript are powerful technologies, although they do not stand on their own in enterprise environments, where Java has been the reigning force for many years. Bridging Node.js and Java provides a much sought after migration path for many Java developers who are moving to their systems to JavaScript. Last year we opened sourced J2V8, a rich set of bindings for Google's V8 JavaScript runtime, this year we built upon that work to bring Node.js to JVM.
In this talk we will introduce Node4J, our NodeJS bindings for the JVM and demonstrate it in action. We will explore the performance characteristics and highlight tools that will help you develop, debug and deploy NodeJS applications running directly on the JVM. We will explain how we integrated NodeJS, with Java through a JNI bridge, and demonstrate how you can use this technology to bridge the gap between JavaScript and Java.
Ansible: How to Get More Sleep and Require Less CoffeeSarah Z
Why you need automation, configuration management and remote execution in your life. An intro to Ansible and how it can make your life in Ops infinitely easier.
Oded Coster - Stack Overflow behind the scenes - how it's made - Codemotion M...Codemotion
Stack Overflow serves over 100 million unique visitors a month, serving a page in 20ms using 9 web servers and 2 database servers. In this talk I will cover how we develop, build, configure, deploy, monitor and maintain the site, as well as cover aspects of working in a team distributed around the world.
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsPablo Godel
Web applications are becoming increasingly more complex, so deployment is not just transferring files with FTP anymore. We will go over the different challenges and how to deploy our PHP applications effectively, safely and consistently with the latest tools and techniques. We will also look at tools that complement deployment with management, configuration and monitoring.
Original slides from Ryan Dahl's NodeJs intro talkAarti Parikh
These are the original slides from the nodejs talk. I was surprised not find them on slideshare so adding them. The video link is here https://www.youtube.com/watch?v=ztspvPYybIY
This is a presentation I prepared for a local meetup. The audience is a mix of web designers and developers who have a wide range of development experience.
Save 10% off ANY FITC event with discount code 'slideshare' - http://www.fitc.ca
OVERVIEW
Node.js is a runtime environment and library for running JavaScript applications outside the browser. Node.js is mostly used to run real-time server applications and shines through its performance using non-blocking I/O and asynchronous events. This talk will introduce you to Node.js by showcasing the environment and its two most popular libraries: express and socket.io.
TARGET AUDIENCE
Beginner web developers
ASSUMED AUDIENCE KNOWLEDGE
Working knowledge of JavaScript and HTML5.
OBJECTIVE
Learn how to build a chat engine using Node.js and WebSockets.
FIVE THINGS AUDIENCE MEMBERS WILL LEARN
Node.js environment and basics
Node Package Manager overview
Web Framework, express, basics
WebSockets and Socket.io basics
Building a chat engine using Node.js
Introduction to node js - From "hello world" to deploying on azureColin Mackay
Slide deck from my talk on Node.js.
More information is available here: http://colinmackay.scot/2014/11/29/dunddd-2014-introduction-to-node-jsfrom-hello-world-to-deploying-on-azure/
Node.js and server side JavaScript are powerful technologies, although they do not stand on their own in enterprise environments, where Java has been the reigning force for many years. Bridging Node.js and Java provides a much sought after migration path for many Java developers who are moving to their systems to JavaScript. Last year we opened sourced J2V8, a rich set of bindings for Google's V8 JavaScript runtime, this year we built upon that work to bring Node.js to JVM.
In this talk we will introduce Node4J, our NodeJS bindings for the JVM and demonstrate it in action. We will explore the performance characteristics and highlight tools that will help you develop, debug and deploy NodeJS applications running directly on the JVM. We will explain how we integrated NodeJS, with Java through a JNI bridge, and demonstrate how you can use this technology to bridge the gap between JavaScript and Java.
Ansible: How to Get More Sleep and Require Less CoffeeSarah Z
Why you need automation, configuration management and remote execution in your life. An intro to Ansible and how it can make your life in Ops infinitely easier.
Oded Coster - Stack Overflow behind the scenes - how it's made - Codemotion M...Codemotion
Stack Overflow serves over 100 million unique visitors a month, serving a page in 20ms using 9 web servers and 2 database servers. In this talk I will cover how we develop, build, configure, deploy, monitor and maintain the site, as well as cover aspects of working in a team distributed around the world.
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsPablo Godel
Web applications are becoming increasingly more complex, so deployment is not just transferring files with FTP anymore. We will go over the different challenges and how to deploy our PHP applications effectively, safely and consistently with the latest tools and techniques. We will also look at tools that complement deployment with management, configuration and monitoring.
Original slides from Ryan Dahl's NodeJs intro talkAarti Parikh
These are the original slides from the nodejs talk. I was surprised not find them on slideshare so adding them. The video link is here https://www.youtube.com/watch?v=ztspvPYybIY
This is a presentation I prepared for a local meetup. The audience is a mix of web designers and developers who have a wide range of development experience.
Guide to AngularJS Services - NOVA MEAN August 2014async_io
Presentation to the NOVA MEAN (Northern Virginia MongoDB/Express/AngularJS/NodeJS) meetup group August 19, 2014 on AngularJS services, what they are, and why and how to use them
Regardless of whether you're using chef or any other automated devops tool, you still need to consider where you are going to host things. Redundancy is good, so in this talk I will describe the tools I used as well as how and why I set up my own chef+git server to provide my own cauldron in which to cook up server deployments.
Presentation on MongoDB and Node.JS. We describe how to do basic CRUD operations (insert, remove, update, find) how to aggregate using node.js. We also discuss a bit of Meteor, MEAN Stack and other ODMs and projects on Javascript and MongoDB
Presentation I gave to the node.dc meetup group March 13, 2013 on using Promises and the Q library to make flow of control easier to reason about in Javascript code using async and callbacks
Node js is said to be an open source. It is the cross-platform JavaScript runtime to developing different types of applications and tools. Thus the best node js course js is not a JavaScript framework with its many of the core modules which are mainly written in the JavaScript and even the developers to writing a new module. It is also primarily used to develop the input and output web applications like single page applications, video streaming sites with other web applications.
Its a presentation about node.js. Here I have covered the basic things of node.js. Like what is node.js how it can be used. and explanation about some node.js frameworks
Leonid Vasilyev "Building, deploying and running production code at Dropbox"IT Event
Reproducible builds, fast and safe deployment process together with self-healing services form the basis of stable and maintainable infrastructure. In this talk I’d like to cover, from the Site Reliability Engineering (SRE) perspective, how Dropbox addresses above challenges, what technologies are used and what lessons were learnt during implementation process.
An introduction to developing with Node.js and some useful tools to help the development and deployment processes. This talk was given at Asyncjs in Brighton
http://asyncjs.com/intro-nodejs
An overview of the Node.JS platform from a security perspective. Offers guidance on how to secure node apps, as well as ways to test them as an infosec professional. Presented at Rochester Security Summit 2015.
Java script nirvana in netbeans [con5679]Ryan Cuprak
JavaOne 2016
NetBeans is not just a Java IDE. It supports JavaScript as a first-class citizen and provides a complete integrated development environment. It also provides project types for server-side JavaScript (Node.js) as well as web browsers and mobile (Apache Cordova). In addition, it supports Grunt, Mocha and Selenium, Angular and Knockout, and more. This session provides an update on NetBeans 8.1 and demonstrates the top new JavaScript features. You will see a Node.js application in action, look at the support for JavaScript unit testing, and also see how easy it is to debug an Apache Cordova application running on a tethered iPhone.
asp.net vNext is the next major version on .net on the server. It’s a completely new way to work with awesome possibilities ; It contains a new flexible and cross-platform runtime, new modular HTTP request pipeline, Cloud-ready CLR, an unified programming model that combines MVC, Web API, and Web Pages, a no-compilation dev experience, ability to self-host or host on IIS, …
Best of all : it’s Open source in GitHub (https://github.com/aspnet/Home)
In this presentation, I'm covering the topics
Node Package Manager (npm)
initializing a node project
dependencies and dev dependencies
Installation, listing and uninstallation of node packages
Importing of modules
Lions, Tigers and Deers: What building zoos can teach us about securing micro...Sysdig
How to secure microservices running in containers? Strategies for Docker, Kubernetes, Openshift, RancherOS, DC/OS Mesos.
Privileges, resources and visibility constrains with capabilities, cgroups and namespaces. Image vulnerability scanning and behaviour security monitoring with Sysdig Falco.
As modern, agile architects and developers we need to master several different languages and technologies all at once to build state-of-the-art solutions and yet be 100% productive. We define our development environments using Gradle. We implement our software in Java, Kotlin or another JVM based language. We use Groovy or Scala to test our code at different layers. We construct the build pipelines for our software using a Groovy DSL or JSON. We use YAML and Python to describe the infrastructure and the deployment for our applications. We document our architectures using AsciiDoc and JRuby. Welcome to Babel!
Making the right choices in the multitude of available languages and technologies is not easy. Randomly combining every hip technology out there will surely lead into chaos. What we need is a customized, streamlined tool chain and technology stack that fits the project, your team and the customer’s ecosystem all at once. This code intense, polyglot session is an opinionated journey into the modern era of software industrialization.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
UiPath Test Automation using UiPath Test Suite series, part 5
Dcjq node.js presentation
1. dcjq[5] Node.js: What Is It, How
Does It Work, and What Can I
Use It For Tomorrow?
April 28, 2011
Jonathan Altman
http://async.io/
@async_io
2. what we’ll cover
• What node is
• Why node is the way it is
• What you can do with it
• Set up a running framework to build web apps
• Dissect a simple node web application
3. node.js is:
• A non-browser Javascript toolkit/
framework started by Ryan Dahl
• Available for *nix-based systems: Linux, OS X, OpenSolaris (and Windows)
• Built on top of Google’s V8 Javascript engine
• Compatible with many common Javascript libraries out of the box via
CommonJS support (http://www.commonjs.org/)
• A batteries-included framework: HTTP and socket support baked into the
core of the framework
• A framework that is easy to build tooling on top of
• Most importantly: asynchronous from the ground up
4. node.js is:
• A non-browser Javascript toolkit/framework started by Ryan Dahl
• Available for *nix-based systems: Linux,
OS X, OpenSolaris (and Windows)
• Built on top of Google’s V8 Javascript engine
• Compatible with many common Javascript libraries out of the box via
CommonJS support (http://www.commonjs.org/)
• A batteries-included framework: HTTP and socket support baked into the core
of the framework
• A framework that is easy to build tooling on top of
• Most importantly: asynchronous from the ground up
5. node.js is:
• A non-browser Javascript toolkit/framework started by Ryan Dahl
• Available for *nix-based systems: Linux, OS X, OpenSolaris (and Windows)
• Built on top of Google’s V8 Javascript
engine
• Compatible with many common Javascript libraries out of the box via
CommonJS support (http://www.commonjs.org/)
• A batteries-included framework: HTTP and socket support baked into the
core of the framework
• A framework that is easy to build tooling on top of
• Most importantly: asynchronous from the ground up
6. node.js is:
• A non-browser Javascript toolkit/framework started by Ryan Dahl
• Available for *nix-based systems: Linux, OS X, OpenSolaris (and Windows)
• Built on top of Google’s V8 Javascript engine
• Compatible with many common Javascript
libraries out of the box via CommonJS
support (http://www.commonjs.org/)
• A batteries-included framework: HTTP and socket support baked into the core of
the framework
• A framework that is easy to build tooling on top of
• Most importantly: asynchronous from the ground up
7. node.js is:
• A non-browser Javascript toolkit/framework started by Ryan Dahl
• Available for *nix-based systems: Linux, OS X, OpenSolaris (and Windows)
• Built on top of Google’s V8 Javascript engine
• Compatible with many common Javascript libraries out of the box via CommonJS
support (http://www.commonjs.org/)
• A batteries-included framework: HTTP
and socket support baked into the core
of the framework
• A framework that is easy to build tooling on top of
• Most importantly: asynchronous from the ground up
8. node.js is:
• A non-browser Javascript toolkit/framework started by Ryan Dahl
• Available for *nix-based systems: Linux, OS X, OpenSolaris (and Windows)
• Built on top of Google’s V8 Javascript engine
• Compatible with many common Javascript libraries out of the box via
CommonJS support (http://www.commonjs.org/)
• A batteries-included framework: HTTP and socket support baked into the
core of the framework
• A framework that is easy to build
tooling on top of
• Most importantly: asynchronous from the ground up
9. node.js is:
• A non-browser Javascript toolkit/framework started by Ryan Dahl
• Available for *nix-based systems: Linux, OS X, OpenSolaris (and Windows)
• Built on top of Google’s V8 Javascript engine
• Compatible with many common Javascript libraries out of the box via
CommonJS support (http://www.commonjs.org/)
• A batteries-included framework: HTTP and socket support baked into the
core of the framework
• A framework that is easy to build tooling on top of
• Most importantly: asynchronous
from the ground up
12. whoa, back up: asynchronous?
• Core trait of the framework
• Provides scalability
• Long-running operations do not block your server
• Coding looks odd for server writers
13. whoa, back up: asynchronous?
• Core trait of the framework
• Provides scalability
• Long-running operations do not block your server
• Coding looks odd for server writers
14. whoa, back up: asynchronous?
• Core trait of the framework
• Provides scalability
• Long-running operations do not block
your server
• Coding looks odd for server writers
15. whoa, back up: asynchronous?
• Core trait of the framework
• Provides scalability
• Long-running operations do not block your server
• Coding looks odd for server writers
16. code looks odd?
• node: • jQuery:
var sys = require('sys'), $('.station_map').live("pagecreate", function() {
path = require('path'), if(navigator.geolocation) {
fs = require('fs'); navigator.geolocation.getCurrentPosition(function(position){
initializeMap(position.coords.latitude,position.coords.longit
var fileName = process.ARGV[2]; ude);
path.exists(fileName, function(exists) { });
if (!exists) { }
sys.puts(fileName + ' not found'); });
return; // snippet taken from https://github.com/mikeymckay/Capital-
} Bikeshare/blob/master/capitalbikeshare.js
sys.puts('w00t! ' + fileName + ' exists!');
});
// https://github.com/jonathana/dcjq_5_nodejs/blob/master/
node_async_example.js
Doesn’t the code look just like the event-driven javascript DHTML-
based web apps have been written in for years?
17. node: up and running
• node.js and its ecosystem still
evolves very fast
• Highly recommended to not put any of it in your
system paths
• We’ll use ~/local (lots of examples do so...)
18. node: up and running
• node.js and its ecosystem still evolves very fast
• Highly recommended to not put
any of it in your system paths
• We’ll use ~/local (lots of examples do so...)
19. node: up and running
• node.js and its ecosystem still evolves very fast
• Highly recommended to not put any of it in your
system paths
• We’ll use ~/local (lots of
examples do so...)
20. be careful for:
• Highly recommended not to
install node in “system”
locations yet
• Uncertain security/threat model
• Hide behind a reverse proxy
21. be careful for:
• Highly recommended not to install node in
“system” locations yet
• Uncertain security/threat model
• Hide behind a reverse proxy
22. be careful for:
• Highly recommended not to install node in
“system” locations yet
• Uncertain security/threat model
• Hide behind a reverse proxy
23. be careful for:
• Highly recommended not to install node in
“system” locations yet
• Uncertain security/threat model
• Hide behind a reverse proxy
• Everything in this presentation
could be wrong by now!
24. basic components
• node.js itself
• nave: manages multiple versions of node
• npm: node package manager. Like ruby’s gem or
python’s easy_install
25. basic components
• node.js itself
• nave: manages multiple versions
of node
• npm: node package manager. Like ruby’s gem or
python’s easy_install
26. basic components
• node.js itself
• nave: manages multiple versions of node
• npm: node package manager.
Like ruby’s gem or python’s
easy_install
27. managing versions-nave
• Again, node.js and its libraries
move fast
• Like python’s virtualenv or ruby’s rvm, there are
nave and nvm for node
• Let’s use nave
• Allows us to have a “stable” environment
• Allows us to test newer versions without risking
“stable”
28. managing versions-nave
• Again, node.js and its libraries move fast
• Like python’s virtualenv or
ruby’s rvm, there are nave and
nvm for node
• Let’s use nave
• Allows us to have a “stable” environment
• Allows us to test newer versions without risking
29. managing versions-nave
• Again, node.js and its libraries move fast
• Like python’s virtualenv or ruby’s rvm, there are
nave and nvm for node
• Let’s use nave
• Allows us to have a “stable” environment
• Allows us to test newer versions without risking
“stable”
30. managing versions-nave
• Again, node.js and its libraries move fast
• Like python’s virtualenv or ruby’s rvm, there are
nave and nvm for node
• Let’s use nave
• Allows us to have a “stable”
environment
• Allows us to test newer versions without risking
“stable”
31. managing versions-nave
• Again, node.js and its libraries move fast
• Like python’s virtualenv or ruby’s rvm, there are
nave and nvm for node
• Let’s use nave
• Allows us to have a “stable” environment
• Allows us to test newer
versions without risking “stable”
32. install node.js via nave
• node.js must be built from
source
• nave handles this for you. Examples:
nave use stable
nave use latest
nave use 0.4.6
• nave downloads, builds, and installs the node version
you asked for!
33. install node.js via nave
• node.js must be built from source
• nave handles this for you.
Examples:
nave use stable
nave use latest
nave use 0.4.6
• nave downloads, builds, and installs the node version
you asked for!
34. install node.js via nave
• node.js must be built from source
• nave handles this for you. Examples:
nave use stable
nave use latest
nave use 0.4.6
• nave downloads, builds, and installs
the node version you asked for!
41. let’s write a web app
var sys = require('sys'),
http = require('http');
http.createServer(function(req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.write('<h1>Hello World</h1>');
res.end();
}).listen(8000);
sys.puts('Server running at http://127.0.0.1:8000/');
//https://github.com/jonathana/dcjq_5_nodejs/blob/master/helloworld.js
42. let’s run the web app
jonathan@ubuntu:~/src/dcjq_5_nodejs$ nave use stable
Already installed: 0.4.7
using 0.4.7
jonathan@ubuntu:~/src/dcjq_5_nodejs$ PATH=$PATH:`npm
bin`
jonathan@ubuntu:~/src/dcjq_5_nodejs$ node
helloworld.js
Server running at http://0.0.0.0:8000/
• That PATH= command is for npm-installed executables
44. now let’s debug the web app
• node-inspector is an npm package for debugging node over http!
jonathan@ubuntu:~/src/dcjq_5_nodejs$ node-inspector &
[1] 6274
visit http://0.0.0.0:8080/debug?port=5858 to start debugging
jonathan@ubuntu:~/src/dcjq_5_nodejs$ node --debug
helloworld.js
debugger listening on port 5858
Server running at http://0.0.0.0:8000/
• The webkit javascript debugging engine works really well with this.
Debugging in Chrome FTW!
46. advantages of node
• Javascript makes callback-based
(“event”) programming familiar
• Fast: framework says take operations that normally block
webserver and make them asynchronous
• Same language on client and server
• Same libraries on client and server
• Long-running connections to lots of clients: Comet
47. advantages of node
• Javascript makes callback-based (“event”) programming familiar
• Fast: framework says take operations
that normally block webserver and
make them asynchronous
• Same language on client and server
• Same libraries on client and server
• Long-running connections to lots of clients: Comet
48. advantages of node
• Javascript makes callback-based (“event”) programming familiar
• Fast: framework says take operations that normally block
webserver and make them asynchronous
• Same language on client and server
• Same libraries on client and server
• Long-running connections to lots of clients: Comet
49. advantages of node
• Javascript makes callback-based (“event”) programming familiar
• Fast: framework says take operations that normally block
webserver and make them asynchronous
• Same language on client and server
• Same libraries on client and server
• Long-running connections to lots of clients: Comet
50. advantages of node
• Javascript makes callback-based (“event”) programming familiar
• Fast: framework says take operations that normally block
webserver and make them asynchronous
• Same language on client and server
• Same libraries on client and server
• Long-running connections to lots of
clients: Comet
52. sample web development stack
• node-inspector: debugging
• express (and connect): web framework, middleware, routing, controllers
• spark2: nice front-end for controlling node servers
• ejs templates: embedded javascript, for views
• connect-mongodb: mongoDB-backed sessions
• mongoose: mongoDB-based object mapper for models
• test: yeah, you should pick some packages and use them
• jsdom: manipulate html DOMs server-side
• jquery and/or YUI3: do cool stuff server side with the DOM
53. Examples/Sample App
• See https://github.com/jonathana/dcjq_5_nodejs for the
example code used in this presentation and a heavily-
commented simple web app built using many of the
packages on the previous slides
54. appendix: Resources
• Ryan Dahl: (http://tinyclouds.org/, https://github.com/ry)
• Ryan’s jsconf 2009 presentation: http://s3.amazonaws.com/four.livejournal/
20091117/jsconf.pdf
• Simon Willison’s blog post re: node.js: http://simonwillison.net/2009/Nov/23/node/
• node.js home: http://nodejs.org/, git repo: https://github.com/joyent/node/
• node modules: https://github.com/joyent/node/wiki/modules
• Isaac Schlueter: (npm and nave) https://github.com/isaacs/, http://blog.izs.me/
• Dav Glass’ mind-bending demonstration of using YUI server-side: http://
developer.yahoo.com/yui/theater/video.php?v=glass-node
• Nice list of some apps built using node.js + express: http://expressjs.com/
applications.html