Beginners level : Fundamentals of Nodes and getting started incrementally to build a real time web via Socket & WebRTC technology
Introduction
- http://getify.me
- You don't know JS : http://youdontknowjs.com
Into Node.js
- HTML5, nodejs, WebRTC
- Know enough Javascript -Higher level of abstraction is explained
HTML5 Facades
- LABjs - Script loader
- grips - templating engine
- asynquence -Promises, React etc
Storage API
- Cookies - sends data with each request
- Session Storage
- Session cookies - stores until browser is opened
- Local Storage
- Session storage - different tab session
- Storage event
-Local and session storage are listen by - Cross window messaging
technique
Canvas API
- renders graphics
getUserMedia
- video
- audio
- user stream screen sharing
requestAnimationFrame
- to make visual update, using css based - here is the function that is going to do the update & I would like you browser to call the function at the most optimal time to visual update to occur.
Web Sockets
- Persistent socket - keep it open - except the first request
- AJAX vs (Web socket - scaling)
Node.js Observations
- super efficient in communication for peer to peer
Hello World
- console.log("Hello world")
- process.stdout.write("Hello world")
Accepting Input
- var name = process.argv[2]
- console.log("Hello " + name)
Adding Help
File IO and Modules
Asynquence
Using Asynquence
Kickstarter Survey
Creating NPM Modules
Extending Modules
- UMD
Grunt and Gulp
-
node centric build process environment
-
Grunt is configuration based approach for build process
- Gulp is not config based approach for build process by code
File Streams
- It works in chunks
Piping Streams
- File Streams are pipe able
Node as a Webserver
Handling Requests
Framework Discussion
Simulating Asynchronicity
Adding Asynquence
Serving Static Files
Setting up socket.io
Making a Socket Connection
Sending Messages
User-triggered Messaging
Broadcasting Mouse Movement
Socket.io Wrap-up
WebRTC Introduction
RTCPeerConnection,Signaling, and DataChannels
Creating a WebRTC Application
Real-world WebRTC Demo