SlideShare una empresa de Scribd logo
1 de 18
node.js dao Vova Miguro
What’s it all about?
[object Object],[object Object]
How? ,[object Object]
traditional I/O var  data = file.read( ‘image.png’ ); //zzz... doSomething(data); something not right here...
async I/O file.read( ‘image.png’ , function (data){ doSomething(image); }); doSomethingElse(); profit!
callback() callback() callback()
node.js internals ,[object Object],[object Object],[object Object]
it is only one thread! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
http server var  http = require( 'http' ); http.createServer( function  (req, res) { res.writeHead( 200 , { 'Content-Type' :  'text/plain' }); res.end( 'Hello World' ); }).listen( 3000 );
watch file var  fs = require( 'fs' ); fs.watchFile( 'system.log' , function  () { console.log( 'log changed!' ); });
 
node & mongo var  mongodb = require( 'mongodb' ); var  server =  new  Server( '127.0.0.1' ,  27017 , {}); new  Db( 'test' , server, {}).open( function  (error, client) { var  collection =  new  Collection(client,  'tmp' ); //insert doc collection.insert({a: 12 ,b: 'string' },{},function(){ //find doc collection.find({}, {limit: 10 }).toArray( function (err, docs) { //do smth with docs }); }); });
node & web sockets //server var  io = require( 'socket.io' ).listen( 80 ); io.sockets.on( 'connection' ,  function  (socket) { socket.emit( 'news' , {hello: 'world' }); }); //client var  socket = io.connect( ' http://localhost ' ); socket.on( 'news' ,  function  (data) { console.log(data); });
let’s see...
suited for... ,[object Object],[object Object],[object Object],[object Object]
do not use for this... ,[object Object],[object Object]
?

Más contenido relacionado

La actualidad más candente

node.js workshop- node.js middleware
node.js workshop- node.js middlewarenode.js workshop- node.js middleware
node.js workshop- node.js middlewareQiong Wu
 
Create a RESTful API with NodeJS, Express and MongoDB
Create a RESTful API with NodeJS, Express and MongoDBCreate a RESTful API with NodeJS, Express and MongoDB
Create a RESTful API with NodeJS, Express and MongoDBHengki Sihombing
 
Scalable Socket Server by Aryo
Scalable Socket Server by AryoScalable Socket Server by Aryo
Scalable Socket Server by AryoAgate Studio
 
Jan Čurn: Meteor: the full-stack JavaScript framework
Jan Čurn: Meteor: the full-stack JavaScript frameworkJan Čurn: Meteor: the full-stack JavaScript framework
Jan Čurn: Meteor: the full-stack JavaScript frameworkDevelcz
 
Server Side Event Driven Programming
Server Side Event Driven ProgrammingServer Side Event Driven Programming
Server Side Event Driven ProgrammingKamal Hussain
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsNodeXperts
 
All you need to know about the JavaScript event loop
All you need to know about the JavaScript event loopAll you need to know about the JavaScript event loop
All you need to know about the JavaScript event loopSaša Tatar
 
Make the prompt great again
Make the prompt great againMake the prompt great again
Make the prompt great againjtyr
 
IaC를 어쭙잖게 맛본 썰?! Ctrl + c/v vs Ansible
IaC를 어쭙잖게 맛본 썰?! Ctrl + c/v vs AnsibleIaC를 어쭙잖게 맛본 썰?! Ctrl + c/v vs Ansible
IaC를 어쭙잖게 맛본 썰?! Ctrl + c/v vs AnsibleNAVER SHOPPING
 
Доклад Антона Поварова "Go in Badoo" с Golang Meetup
Доклад Антона Поварова "Go in Badoo" с Golang MeetupДоклад Антона Поварова "Go in Badoo" с Golang Meetup
Доклад Антона Поварова "Go in Badoo" с Golang MeetupBadoo Development
 
Будь первым
Будь первымБудь первым
Будь первымFDConf
 
Introducing to node.js
Introducing to node.jsIntroducing to node.js
Introducing to node.jsJeongHun Byeon
 
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...mCloud
 
Odoo Performance Limits
Odoo Performance LimitsOdoo Performance Limits
Odoo Performance LimitsOdoo
 

La actualidad más candente (20)

node.js workshop- node.js middleware
node.js workshop- node.js middlewarenode.js workshop- node.js middleware
node.js workshop- node.js middleware
 
Create a RESTful API with NodeJS, Express and MongoDB
Create a RESTful API with NodeJS, Express and MongoDBCreate a RESTful API with NodeJS, Express and MongoDB
Create a RESTful API with NodeJS, Express and MongoDB
 
Scalable Socket Server by Aryo
Scalable Socket Server by AryoScalable Socket Server by Aryo
Scalable Socket Server by Aryo
 
Jan Čurn: Meteor: the full-stack JavaScript framework
Jan Čurn: Meteor: the full-stack JavaScript frameworkJan Čurn: Meteor: the full-stack JavaScript framework
Jan Čurn: Meteor: the full-stack JavaScript framework
 
Node.js Stream API
Node.js Stream APINode.js Stream API
Node.js Stream API
 
Server Side Event Driven Programming
Server Side Event Driven ProgrammingServer Side Event Driven Programming
Server Side Event Driven Programming
 
Node.js
Node.jsNode.js
Node.js
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
All you need to know about the JavaScript event loop
All you need to know about the JavaScript event loopAll you need to know about the JavaScript event loop
All you need to know about the JavaScript event loop
 
Ferrara Linux Day 2011
Ferrara Linux Day 2011Ferrara Linux Day 2011
Ferrara Linux Day 2011
 
Make the prompt great again
Make the prompt great againMake the prompt great again
Make the prompt great again
 
IaC를 어쭙잖게 맛본 썰?! Ctrl + c/v vs Ansible
IaC를 어쭙잖게 맛본 썰?! Ctrl + c/v vs AnsibleIaC를 어쭙잖게 맛본 썰?! Ctrl + c/v vs Ansible
IaC를 어쭙잖게 맛본 썰?! Ctrl + c/v vs Ansible
 
Доклад Антона Поварова "Go in Badoo" с Golang Meetup
Доклад Антона Поварова "Go in Badoo" с Golang MeetupДоклад Антона Поварова "Go in Badoo" с Golang Meetup
Доклад Антона Поварова "Go in Badoo" с Golang Meetup
 
Будь первым
Будь первымБудь первым
Будь первым
 
Node36
Node36Node36
Node36
 
Introducing to node.js
Introducing to node.jsIntroducing to node.js
Introducing to node.js
 
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
 
Node.js and Ruby
Node.js and RubyNode.js and Ruby
Node.js and Ruby
 
Odoo Performance Limits
Odoo Performance LimitsOdoo Performance Limits
Odoo Performance Limits
 
Comets notes
Comets notesComets notes
Comets notes
 

Destacado

S 004 Border Security
S 004 Border SecurityS 004 Border Security
S 004 Border Securitymaxsmi
 
Fashion trend forecast
Fashion trend forecastFashion trend forecast
Fashion trend forecastMahfuza Mili
 
Forecasting
ForecastingForecasting
Forecasting3abooodi
 
The Fashion Channel - A case Analysis
The Fashion Channel - A case AnalysisThe Fashion Channel - A case Analysis
The Fashion Channel - A case AnalysisDevanand Hariperumal
 

Destacado (6)

S 004 Border Security
S 004 Border SecurityS 004 Border Security
S 004 Border Security
 
Fashion Forecasting
Fashion ForecastingFashion Forecasting
Fashion Forecasting
 
Fashion trend forecast
Fashion trend forecastFashion trend forecast
Fashion trend forecast
 
Forecasting
ForecastingForecasting
Forecasting
 
The Fashion Channel
The Fashion ChannelThe Fashion Channel
The Fashion Channel
 
The Fashion Channel - A case Analysis
The Fashion Channel - A case AnalysisThe Fashion Channel - A case Analysis
The Fashion Channel - A case Analysis
 

Similar a Владимир Мигуро "Дао Node.js"

node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backendDavid Padbury
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applicationsTom Croucher
 
How and why i roll my own node.js framework
How and why i roll my own node.js frameworkHow and why i roll my own node.js framework
How and why i roll my own node.js frameworkBen Lin
 
Going crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPGoing crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPMariano Iglesias
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.Mike Brevoort
 
Web program-peformance-optimization
Web program-peformance-optimizationWeb program-peformance-optimization
Web program-peformance-optimizationxiaojueqq12345
 
Matthew Eernisse, NodeJs, .toster {webdev}
Matthew Eernisse, NodeJs, .toster {webdev}Matthew Eernisse, NodeJs, .toster {webdev}
Matthew Eernisse, NodeJs, .toster {webdev}.toster
 
Node js presentation
Node js presentationNode js presentation
Node js presentationmartincabrera
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineRicardo Silva
 
Future Decoded - Node.js per sviluppatori .NET
Future Decoded - Node.js per sviluppatori .NETFuture Decoded - Node.js per sviluppatori .NET
Future Decoded - Node.js per sviluppatori .NETGianluca Carucci
 
soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch
 
Original slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talkOriginal slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talkAarti Parikh
 
Node js
Node jsNode js
Node jshazzaz
 

Similar a Владимир Мигуро "Дао Node.js" (20)

node.js dao
node.js daonode.js dao
node.js dao
 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backend
 
NodeJS
NodeJSNodeJS
NodeJS
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications
 
How and why i roll my own node.js framework
How and why i roll my own node.js frameworkHow and why i roll my own node.js framework
How and why i roll my own node.js framework
 
Going crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPGoing crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHP
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Web program-peformance-optimization
Web program-peformance-optimizationWeb program-peformance-optimization
Web program-peformance-optimization
 
Matthew Eernisse, NodeJs, .toster {webdev}
Matthew Eernisse, NodeJs, .toster {webdev}Matthew Eernisse, NodeJs, .toster {webdev}
Matthew Eernisse, NodeJs, .toster {webdev}
 
Node js presentation
Node js presentationNode js presentation
Node js presentation
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 Engine
 
About Node.js
About Node.jsAbout Node.js
About Node.js
 
NodeJS
NodeJSNodeJS
NodeJS
 
Future Decoded - Node.js per sviluppatori .NET
Future Decoded - Node.js per sviluppatori .NETFuture Decoded - Node.js per sviluppatori .NET
Future Decoded - Node.js per sviluppatori .NET
 
soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.js
 
Original slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talkOriginal slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talk
 
Node js
Node jsNode js
Node js
 
node.js - Fast event based web application development
node.js - Fast event based web application developmentnode.js - Fast event based web application development
node.js - Fast event based web application development
 
Node.js - A Quick Tour
Node.js - A Quick TourNode.js - A Quick Tour
Node.js - A Quick Tour
 

Más de EPAM Systems

“Xcore (library) for android platform” by Uladzimir Klyshevich
“Xcore (library) for android platform” by Uladzimir Klyshevich“Xcore (library) for android platform” by Uladzimir Klyshevich
“Xcore (library) for android platform” by Uladzimir KlyshevichEPAM Systems
 
"Как общаться эффективнее" by Natallia Kapatsevich
"Как общаться эффективнее" by Natallia Kapatsevich"Как общаться эффективнее" by Natallia Kapatsevich
"Как общаться эффективнее" by Natallia KapatsevichEPAM Systems
 
"Connections: Что общего у Шотландии и Дональда Трампа?" by Yevgeniy Rozenblat
"Connections: Что общего у Шотландии и Дональда Трампа?" by Yevgeniy Rozenblat "Connections: Что общего у Шотландии и Дональда Трампа?" by Yevgeniy Rozenblat
"Connections: Что общего у Шотландии и Дональда Трампа?" by Yevgeniy Rozenblat EPAM Systems
 
ДмитрийРадченко, "Brief introduction to dundas"
ДмитрийРадченко, "Brief introduction to dundas"ДмитрийРадченко, "Brief introduction to dundas"
ДмитрийРадченко, "Brief introduction to dundas"EPAM Systems
 
Абрамович Максим, "Rad studio xe4"
Абрамович Максим, "Rad studio xe4"Абрамович Максим, "Rad studio xe4"
Абрамович Максим, "Rad studio xe4"EPAM Systems
 
Miniq 11: Time management by Anton Zolotarev & Andrei Artisheuski
Miniq 11: Time management by Anton Zolotarev & Andrei ArtisheuskiMiniq 11: Time management by Anton Zolotarev & Andrei Artisheuski
Miniq 11: Time management by Anton Zolotarev & Andrei ArtisheuskiEPAM Systems
 
Reporting куда как-зачем by Anton Stoliar
Reporting   куда как-зачем by Anton StoliarReporting   куда как-зачем by Anton Stoliar
Reporting куда как-зачем by Anton StoliarEPAM Systems
 
Pool and billiards by Olga Nikolaeva
Pool and billiards by Olga NikolaevaPool and billiards by Olga Nikolaeva
Pool and billiards by Olga NikolaevaEPAM Systems
 
The Way of Creating Presentations: Just do it!
The Way of Creating Presentations: Just do it!The Way of Creating Presentations: Just do it!
The Way of Creating Presentations: Just do it!EPAM Systems
 
E-mail Communication: How and Why
E-mail Communication: How and WhyE-mail Communication: How and Why
E-mail Communication: How and WhyEPAM Systems
 
николай фролов, “Gamification“
николай фролов, “Gamification“николай фролов, “Gamification“
николай фролов, “Gamification“EPAM Systems
 
Real time bidding by Danil Melnikov
Real time bidding by Danil MelnikovReal time bidding by Danil Melnikov
Real time bidding by Danil MelnikovEPAM Systems
 
Никита Манько “Code review”
Никита Манько “Code review”Никита Манько “Code review”
Никита Манько “Code review”EPAM Systems
 
Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”EPAM Systems
 
Демидюк Павел , “Continuous integration with the real traffic light in m&e of...
Демидюк Павел , “Continuous integration with the real traffic light in m&e of...Демидюк Павел , “Continuous integration with the real traffic light in m&e of...
Демидюк Павел , “Continuous integration with the real traffic light in m&e of...EPAM Systems
 
Agile retrospectives by nick frolov miniq
Agile retrospectives by nick frolov   miniqAgile retrospectives by nick frolov   miniq
Agile retrospectives by nick frolov miniqEPAM Systems
 
Other way to travel by Anna Lukyanenka
Other way to travel by Anna LukyanenkaOther way to travel by Anna Lukyanenka
Other way to travel by Anna LukyanenkaEPAM Systems
 
Computer as a musical instrument by Sergey Moiseychik
Computer as a musical instrument by Sergey MoiseychikComputer as a musical instrument by Sergey Moiseychik
Computer as a musical instrument by Sergey MoiseychikEPAM Systems
 
Антон Золотарев, Екатерина Невельская "По следам SQA days"
Антон Золотарев, Екатерина Невельская "По следам SQA days"Антон Золотарев, Екатерина Невельская "По следам SQA days"
Антон Золотарев, Екатерина Невельская "По следам SQA days"EPAM Systems
 
Сергей Семашко "End to end test: cheap and effective"
Сергей Семашко "End to end test: cheap and effective"Сергей Семашко "End to end test: cheap and effective"
Сергей Семашко "End to end test: cheap and effective"EPAM Systems
 

Más de EPAM Systems (20)

“Xcore (library) for android platform” by Uladzimir Klyshevich
“Xcore (library) for android platform” by Uladzimir Klyshevich“Xcore (library) for android platform” by Uladzimir Klyshevich
“Xcore (library) for android platform” by Uladzimir Klyshevich
 
"Как общаться эффективнее" by Natallia Kapatsevich
"Как общаться эффективнее" by Natallia Kapatsevich"Как общаться эффективнее" by Natallia Kapatsevich
"Как общаться эффективнее" by Natallia Kapatsevich
 
"Connections: Что общего у Шотландии и Дональда Трампа?" by Yevgeniy Rozenblat
"Connections: Что общего у Шотландии и Дональда Трампа?" by Yevgeniy Rozenblat "Connections: Что общего у Шотландии и Дональда Трампа?" by Yevgeniy Rozenblat
"Connections: Что общего у Шотландии и Дональда Трампа?" by Yevgeniy Rozenblat
 
ДмитрийРадченко, "Brief introduction to dundas"
ДмитрийРадченко, "Brief introduction to dundas"ДмитрийРадченко, "Brief introduction to dundas"
ДмитрийРадченко, "Brief introduction to dundas"
 
Абрамович Максим, "Rad studio xe4"
Абрамович Максим, "Rad studio xe4"Абрамович Максим, "Rad studio xe4"
Абрамович Максим, "Rad studio xe4"
 
Miniq 11: Time management by Anton Zolotarev & Andrei Artisheuski
Miniq 11: Time management by Anton Zolotarev & Andrei ArtisheuskiMiniq 11: Time management by Anton Zolotarev & Andrei Artisheuski
Miniq 11: Time management by Anton Zolotarev & Andrei Artisheuski
 
Reporting куда как-зачем by Anton Stoliar
Reporting   куда как-зачем by Anton StoliarReporting   куда как-зачем by Anton Stoliar
Reporting куда как-зачем by Anton Stoliar
 
Pool and billiards by Olga Nikolaeva
Pool and billiards by Olga NikolaevaPool and billiards by Olga Nikolaeva
Pool and billiards by Olga Nikolaeva
 
The Way of Creating Presentations: Just do it!
The Way of Creating Presentations: Just do it!The Way of Creating Presentations: Just do it!
The Way of Creating Presentations: Just do it!
 
E-mail Communication: How and Why
E-mail Communication: How and WhyE-mail Communication: How and Why
E-mail Communication: How and Why
 
николай фролов, “Gamification“
николай фролов, “Gamification“николай фролов, “Gamification“
николай фролов, “Gamification“
 
Real time bidding by Danil Melnikov
Real time bidding by Danil MelnikovReal time bidding by Danil Melnikov
Real time bidding by Danil Melnikov
 
Никита Манько “Code review”
Никита Манько “Code review”Никита Манько “Code review”
Никита Манько “Code review”
 
Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”
 
Демидюк Павел , “Continuous integration with the real traffic light in m&e of...
Демидюк Павел , “Continuous integration with the real traffic light in m&e of...Демидюк Павел , “Continuous integration with the real traffic light in m&e of...
Демидюк Павел , “Continuous integration with the real traffic light in m&e of...
 
Agile retrospectives by nick frolov miniq
Agile retrospectives by nick frolov   miniqAgile retrospectives by nick frolov   miniq
Agile retrospectives by nick frolov miniq
 
Other way to travel by Anna Lukyanenka
Other way to travel by Anna LukyanenkaOther way to travel by Anna Lukyanenka
Other way to travel by Anna Lukyanenka
 
Computer as a musical instrument by Sergey Moiseychik
Computer as a musical instrument by Sergey MoiseychikComputer as a musical instrument by Sergey Moiseychik
Computer as a musical instrument by Sergey Moiseychik
 
Антон Золотарев, Екатерина Невельская "По следам SQA days"
Антон Золотарев, Екатерина Невельская "По следам SQA days"Антон Золотарев, Екатерина Невельская "По следам SQA days"
Антон Золотарев, Екатерина Невельская "По следам SQA days"
 
Сергей Семашко "End to end test: cheap and effective"
Сергей Семашко "End to end test: cheap and effective"Сергей Семашко "End to end test: cheap and effective"
Сергей Семашко "End to end test: cheap and effective"
 

Último

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 

Último (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Владимир Мигуро "Дао Node.js"

  • 3.
  • 4.
  • 5. traditional I/O var data = file.read( ‘image.png’ ); //zzz... doSomething(data); something not right here...
  • 6. async I/O file.read( ‘image.png’ , function (data){ doSomething(image); }); doSomethingElse(); profit!
  • 8.
  • 9.
  • 10. http server var http = require( 'http' ); http.createServer( function (req, res) { res.writeHead( 200 , { 'Content-Type' : 'text/plain' }); res.end( 'Hello World' ); }).listen( 3000 );
  • 11. watch file var fs = require( 'fs' ); fs.watchFile( 'system.log' , function () { console.log( 'log changed!' ); });
  • 12.  
  • 13. node & mongo var mongodb = require( 'mongodb' ); var server = new Server( '127.0.0.1' , 27017 , {}); new Db( 'test' , server, {}).open( function (error, client) { var collection = new Collection(client, 'tmp' ); //insert doc collection.insert({a: 12 ,b: 'string' },{},function(){ //find doc collection.find({}, {limit: 10 }).toArray( function (err, docs) { //do smth with docs }); }); });
  • 14. node & web sockets //server var io = require( 'socket.io' ).listen( 80 ); io.sockets.on( 'connection' , function (socket) { socket.emit( 'news' , {hello: 'world' }); }); //client var socket = io.connect( ' http://localhost ' ); socket.on( 'news' , function (data) { console.log(data); });
  • 16.
  • 17.
  • 18. ?