SlideShare ist ein Scribd-Unternehmen logo
1 von 50
Downloaden Sie, um offline zu lesen
I S O M O R P H I C R E A LT I M E
A P P S W I T H
FA C E B O O K - Q U A L I T Y A P P S W I T H O U T FA C E B O O K ’ S M O N E Y
METE R
Stephan Hochhaus
@yauh
T H E R O A D S O FA R
• Applications in the browser
• JavaScript everywhere
• Overwhelming tools
A P P S I N T H E B R O W S E R
U S E R S E X P E C T M O R E
J AVA S C R I P T C O N Q U E R E D T H E S E R V E R
N O D E . J S
J AVA S C R I P T C O N Q U E R E D T H E S E R V E R
N O D E . J S
J AVA S C R I P T C O N Q U E R E D T H E S E R V E R
N O D E . J S
J AVA S C R I P T C O N Q U E R E D T H E S E R V E R
N O D E . J S
J AVA S C R I P T C O N Q U E R E D T H E S E R V E R
N O D E . J S
J AVA S C R I P T C O N Q U E R E D T H E S E R V E R
N O D E . J S
J AVA S C R I P T C O N Q U E R E D T H E S E R V E R
N O D E . J S
W E B D E V I S R O C K E T S C I E N C E
L A R G E T E A M S B U I L D L A R G E A P P S
A M E T E O R A P P E A R E D
N O W
A M E T E O R A P P E A R E D
N O W
– N I C K M A R T I N
At Meteor, we hope to democratize web app development by
empowering anyone, anywhere to create apps.
T H E M E T E O R S TA C K
N O T O N LY F O R R O C K S TA R S
T H E M E T E O R S TA C K
N O T O N LY F O R R O C K S TA R S
The Database
The Server Engine
Bunch of Libs
T H E M E T E O R S TA C K
N O T O N LY F O R R O C K S TA R S
The CLI Tool
The Database
The Server Engine
Bunch of Libs
T H E M E T E O R S TA C K
N O T O N LY F O R R O C K S TA R S
The CLI Tool
The Database
The Server Engine
Bunch of Libs
1. I S O M O R P H I S M
2. S Y N C H R O N I C I T Y
3. R E A C T I V I T Y
4. S M A R T C L I E N T S
W H Y I S I T E A S Y T O L E A R N ?
D O C U M E N T- B A S E D D ATA B A S E S
M O N G O D B - T H E K E Y T O I S O M O R P H I S M
D O C U M E N T- B A S E D D ATA B A S E S
M O N G O D B - T H E K E Y T O I S O M O R P H I S M
A collection
D O C U M E N T- B A S E D D ATA B A S E S
M O N G O D B - T H E K E Y T O I S O M O R P H I S M
A collection
A document
Lots of fields
DB Server Client
SELECT name
FROM users
WHERE id = 12345
GET
http://server/users/

name/12345
var name =
response.name;
A C C E S S I N G D A TA T H R O U G H O U T T H E S TA C K
I S O M O R P H I C A P P L I C AT I O N S
DB Server Client
SELECT name
FROM users
WHERE id = 12345
GET
http://server/users/

name/12345
var name =
response.name;
A C C E S S I N G D A TA T H R O U G H O U T T H E S TA C K
Users.find(
{_id: 12345},
{fields:
{name : 1}
}
)
Users.find(
{_id: 12345},
{fields:
{name : 1}
}
)
Users.find(
{_id: 12345},
{fields:
{name : 1}
}
)
E V E N T E D A P P L I C AT I O N S N E E D C A L L B A C K S
N O D E . J S A N D T H E E V E N T L O O P
Event
queue
Event
Event
Event
Event
…
Node.js
Event Loop
Thread
pool
Disk
Network
Process
…
Single threaded
processing
Callback
split off to a
child process
C A L L B A C K H E L L
T H E D O W N S I D E O F N O D E J S
DB.connect(options, function(err, connection){
connection.query(something, function(err, document){
ExternalAPI.makeCall(document, function(err, apiResult){
connection.save(apiResult, function(err, saveResult){
request.end(saveResult);
});
});
});
});
S Y N C H R O N I C I T Y W I T H M E T E O R
T H E P O W E R O F F I B E R S
DB.connect(options, function (err, con) {
connection = con;
});
connection.query(something, function (err, doc) {
document = doc;
});
ExternalAPI.makeCall(document, function (err, res) {
apiResult = res;
});
connection.save(apiResult, function (err, res) {
saveResult = res;
});
request.end(saveResult);
Fiber #1
0 10 20 30 40
milliseconds
By default Meteor
creates one fiber
per client
DB.connect
Wait
(idle CPU time)
Event Loop
connection.query
ExternalAPI.makeCall
connection.save
request.end
S Y N C H R O N I C I T Y W I T H M E T E O R
T H E P O W E R O F F I B E R S
N O M O R E E V E N T- S PA G H E T T I S
R E A C T I V I T Y
R E A C T I V I T Y
R E A C T I V I T Y
Traditional programming
•var a = 2;
var b = 5;
var c = a + b;
console.log(c);
# c is 7
R E A C T I V I T Y
Traditional programming
•var a = 2;
var b = 5;
var c = a + b;
console.log(c);
# c is 7
•a = 5;
console.log(c);
# c is still 7
R E A C T I V I T Y
Traditional programming
•var a = 2;
var b = 5;
var c = a + b;
console.log(c);
# c is 7
•a = 5;
console.log(c);
# c is still 7
•c = a + b;
console.log(c);
# c is finally 10
R E A C T I V I T Y
Traditional programming
•var a = 2;
var b = 5;
var c = a + b;
console.log(c);
# c is 7
•a = 5;
console.log(c);
# c is still 7
•c = a + b;
console.log(c);
# c is finally 10
Reactive programming
•var a = 2;
var b = 5;
var c = a + b;
console.log(c);
# c is 7
R E A C T I V I T Y
Traditional programming
•var a = 2;
var b = 5;
var c = a + b;
console.log(c);
# c is 7
•a = 5;
console.log(c);
# c is still 7
•c = a + b;
console.log(c);
# c is finally 10
Reactive programming
•var a = 2;
var b = 5;
var c = a + b;
console.log(c);
# c is 7
•a = 5;
console.log(c);
# c is magically 10
S M A R T C L I E N T S
R E M O T E A P P S W I T H B I - D I R E C T I O N A L C O M M U N I C A T I O N
M E T E O R C O M M U N I C AT E S
R E M O T E A P P S W I T H B I - D I R E C T I O N A L C O M M U N I C A T I O N
App
Database
Server
Livequery
App
MiniDB
Client
Blaze
Tracker
HTTP
M E T E O R C O M M U N I C AT E S
R E M O T E A P P S W I T H B I - D I R E C T I O N A L C O M M U N I C A T I O N
App
Database
Server
Livequery
App
MiniDB
Client
Blaze
Tracker
HTTP
Static assets
HTML, JS, CSS, JPG, PNG, etc
The initial request and all static resources are transferred via HTTP
M E T E O R C O M M U N I C AT E S
R E M O T E A P P S W I T H B I - D I R E C T I O N A L C O M M U N I C A T I O N
App
Database
Server
Livequery
App
MiniDB
Client
Blaze
Tracker
HTTP
Remote Procedure Calls
Data subscriptions
DDP via WebSocket
Clients call server functions remotely via DDP
and the server returns data as JSON objects
M E T E O R C O M M U N I C AT E S
R E M O T E A P P S W I T H B I - D I R E C T I O N A L C O M M U N I C A T I O N
App
Database
Server
Livequery
App
MiniDB
Client
Blaze
Tracker
HTTP
Remote Procedure Calls
Data subscriptions
DDP via WebSocket
Clients call server functions remotely via DDP
and the server returns data as JSON objects
LiveQuery watches for
changes and pushes
data to all subscribed
clients
M E T E O R C O M M U N I C AT E S
R E M O T E A P P S W I T H B I - D I R E C T I O N A L C O M M U N I C A T I O N
App
Database
Server
Livequery
App
MiniDB
Client
Blaze
Tracker
HTTP
Remote Procedure Calls
Data subscriptions
DDP via WebSocket
Clients call server functions remotely via DDP
and the server returns data as JSON objects
LiveQuery watches for
changes and pushes
data to all subscribed
clients
Tracker triggers reactive
updates, e.g. in the UI
powered by Blaze
C O D E & PA C K A G E S
E X T E N D I N G M E T E O R
C O D E & PA C K A G E S
E X T E N D I N G M E T E O R
Our code
C O D E & PA C K A G E S
E X T E N D I N G M E T E O R
Packages
Our code
I N S TA L L M E T E O R
L E T ’ S B U I L D
Linux, Mac:
$ curl https://install.meteor.com/ | sh
Windows:
https://www.meteor.com/install
TA L K I N G T O T H E T W I T T E R A P I
E X T E N D I N G M E T E O R W I T H O A U T H
External API
Using a
package
M U LT I P L E P L AT F O R M S
A S I N G L E C O D E B A S E - M A N Y D E P L O Y M E N T S
M U LT I P L E P L AT F O R M S
A S I N G L E C O D E B A S E - M A N Y D E P L O Y M E N T S
Server/
Client
M U LT I P L E P L AT F O R M S
A S I N G L E C O D E B A S E - M A N Y D E P L O Y M E N T S
Mobile
Server/
Client

Weitere ähnliche Inhalte

Was ist angesagt?

Smart Contracts Technical Overview - Meetup Roma - 17/09/19
Smart Contracts Technical Overview - Meetup Roma - 17/09/19Smart Contracts Technical Overview - Meetup Roma - 17/09/19
Smart Contracts Technical Overview - Meetup Roma - 17/09/19Federico Tenga
 
The Case for Competitive Mobile Gaming - Peter Heinrich
The Case for Competitive Mobile Gaming - Peter HeinrichThe Case for Competitive Mobile Gaming - Peter Heinrich
The Case for Competitive Mobile Gaming - Peter HeinrichAmazon Web Services
 
Getting Started with the Amazon GameOn API - Peter Heinrich
Getting Started with the Amazon GameOn API - Peter HeinrichGetting Started with the Amazon GameOn API - Peter Heinrich
Getting Started with the Amazon GameOn API - Peter HeinrichAmazon Web Services
 
톰캣 #02-설치환경
톰캣 #02-설치환경톰캣 #02-설치환경
톰캣 #02-설치환경GyuSeok Lee
 
Svelte (adjective): Attractively thin, graceful, and stylish
Svelte (adjective): Attractively thin, graceful, and stylishSvelte (adjective): Attractively thin, graceful, and stylish
Svelte (adjective): Attractively thin, graceful, and stylishThe Software House
 
Xcode Survival Guide
Xcode Survival GuideXcode Survival Guide
Xcode Survival GuideKristina Fox
 
Consistency, Availability, Partition: Make Your Choice
Consistency, Availability, Partition: Make Your ChoiceConsistency, Availability, Partition: Make Your Choice
Consistency, Availability, Partition: Make Your ChoiceAndrea Giuliano
 
A Prettier Printer
A Prettier PrinterA Prettier Printer
A Prettier Printerjlongster2
 
Asynchronous data processing
Asynchronous data processingAsynchronous data processing
Asynchronous data processingAndrea Giuliano
 
Productivity tips for developers
Productivity tips for developersProductivity tips for developers
Productivity tips for developersSebastian Witowski
 
Call Execute For Everyone
Call Execute For EveryoneCall Execute For Everyone
Call Execute For EveryoneDaniel Boisvert
 
Plone ♥︎ Python 3
Plone ♥︎ Python 3Plone ♥︎ Python 3
Plone ♥︎ Python 3Philip Bauer
 
Easy HTML Tables in RStudio with Tabyl and kableExtra
Easy HTML Tables in RStudio with Tabyl and kableExtraEasy HTML Tables in RStudio with Tabyl and kableExtra
Easy HTML Tables in RStudio with Tabyl and kableExtraBarry DeCicco
 
Demystifying Unicode - Longhorn PHP 2021
Demystifying Unicode - Longhorn PHP 2021Demystifying Unicode - Longhorn PHP 2021
Demystifying Unicode - Longhorn PHP 2021Colin O'Dell
 
Whitepaper - Spinbackup Overview
Whitepaper - Spinbackup OverviewWhitepaper - Spinbackup Overview
Whitepaper - Spinbackup OverviewSpinbackup
 

Was ist angesagt? (18)

Smart Contracts Technical Overview - Meetup Roma - 17/09/19
Smart Contracts Technical Overview - Meetup Roma - 17/09/19Smart Contracts Technical Overview - Meetup Roma - 17/09/19
Smart Contracts Technical Overview - Meetup Roma - 17/09/19
 
The Case for Competitive Mobile Gaming - Peter Heinrich
The Case for Competitive Mobile Gaming - Peter HeinrichThe Case for Competitive Mobile Gaming - Peter Heinrich
The Case for Competitive Mobile Gaming - Peter Heinrich
 
Getting Started with the Amazon GameOn API - Peter Heinrich
Getting Started with the Amazon GameOn API - Peter HeinrichGetting Started with the Amazon GameOn API - Peter Heinrich
Getting Started with the Amazon GameOn API - Peter Heinrich
 
톰캣 #02-설치환경
톰캣 #02-설치환경톰캣 #02-설치환경
톰캣 #02-설치환경
 
Svelte (adjective): Attractively thin, graceful, and stylish
Svelte (adjective): Attractively thin, graceful, and stylishSvelte (adjective): Attractively thin, graceful, and stylish
Svelte (adjective): Attractively thin, graceful, and stylish
 
Xcode Survival Guide
Xcode Survival GuideXcode Survival Guide
Xcode Survival Guide
 
wreewrer
wreewrerwreewrer
wreewrer
 
Consistency, Availability, Partition: Make Your Choice
Consistency, Availability, Partition: Make Your ChoiceConsistency, Availability, Partition: Make Your Choice
Consistency, Availability, Partition: Make Your Choice
 
A Prettier Printer
A Prettier PrinterA Prettier Printer
A Prettier Printer
 
Asynchronous data processing
Asynchronous data processingAsynchronous data processing
Asynchronous data processing
 
Productivity tips for developers
Productivity tips for developersProductivity tips for developers
Productivity tips for developers
 
Call Execute For Everyone
Call Execute For EveryoneCall Execute For Everyone
Call Execute For Everyone
 
Crack.ba
Crack.baCrack.ba
Crack.ba
 
Put Down That Mouse
Put Down That MousePut Down That Mouse
Put Down That Mouse
 
Plone ♥︎ Python 3
Plone ♥︎ Python 3Plone ♥︎ Python 3
Plone ♥︎ Python 3
 
Easy HTML Tables in RStudio with Tabyl and kableExtra
Easy HTML Tables in RStudio with Tabyl and kableExtraEasy HTML Tables in RStudio with Tabyl and kableExtra
Easy HTML Tables in RStudio with Tabyl and kableExtra
 
Demystifying Unicode - Longhorn PHP 2021
Demystifying Unicode - Longhorn PHP 2021Demystifying Unicode - Longhorn PHP 2021
Demystifying Unicode - Longhorn PHP 2021
 
Whitepaper - Spinbackup Overview
Whitepaper - Spinbackup OverviewWhitepaper - Spinbackup Overview
Whitepaper - Spinbackup Overview
 

Ähnlich wie Build Facebook-Quality Apps with Meteor

Angular server side rendering with NodeJS - In Pursuit Of Speed
Angular server side rendering with NodeJS - In Pursuit Of SpeedAngular server side rendering with NodeJS - In Pursuit Of Speed
Angular server side rendering with NodeJS - In Pursuit Of SpeedIlia Idakiev
 
Monitoring and Logging in Wonderland
Monitoring and Logging in WonderlandMonitoring and Logging in Wonderland
Monitoring and Logging in WonderlandPaul Seiffert
 
Azure: Finding Success Beyond Test/Dev
Azure: Finding Success Beyond Test/DevAzure: Finding Success Beyond Test/Dev
Azure: Finding Success Beyond Test/DevHostway|HOSTING
 
Web Development for Managers
Web Development for ManagersWeb Development for Managers
Web Development for ManagersRandy Connolly
 
Spring Roo 2.0 Preview at Spring I/O 2016
Spring Roo 2.0 Preview at Spring I/O 2016 Spring Roo 2.0 Preview at Spring I/O 2016
Spring Roo 2.0 Preview at Spring I/O 2016 DISID
 
AWS Seminar Series 2015 Melbourne
AWS Seminar Series 2015 MelbourneAWS Seminar Series 2015 Melbourne
AWS Seminar Series 2015 MelbourneAmazon Web Services
 
Simple Crossplatform REST-Service with .NET, Vagrant and Docker
Simple Crossplatform REST-Service with .NET, Vagrant and DockerSimple Crossplatform REST-Service with .NET, Vagrant and Docker
Simple Crossplatform REST-Service with .NET, Vagrant and DockerAndreas Mosti
 
AWS Seminar Series 2015 Brisbane
AWS Seminar Series 2015 BrisbaneAWS Seminar Series 2015 Brisbane
AWS Seminar Series 2015 BrisbaneAmazon Web Services
 
SharePoint Saturday Redmond - Building solutions with the future in mind
SharePoint Saturday Redmond - Building solutions with the future in mindSharePoint Saturday Redmond - Building solutions with the future in mind
SharePoint Saturday Redmond - Building solutions with the future in mindChris Johnson
 
Zend con 2016 - Asynchronous Prorgamming in PHP
Zend con 2016 - Asynchronous Prorgamming in PHPZend con 2016 - Asynchronous Prorgamming in PHP
Zend con 2016 - Asynchronous Prorgamming in PHPAdam Englander
 
Puppet Camp Sydney 2014 - Evolving Design Patterns in AWS
Puppet Camp Sydney 2014 - Evolving Design Patterns in AWSPuppet Camp Sydney 2014 - Evolving Design Patterns in AWS
Puppet Camp Sydney 2014 - Evolving Design Patterns in AWSjohnpainter_id_au
 
Microservices With Spring Boot and Spring Cloud Netflix
Microservices With Spring Boot and Spring Cloud NetflixMicroservices With Spring Boot and Spring Cloud Netflix
Microservices With Spring Boot and Spring Cloud NetflixKrzysztof Sobkowiak
 
Nuno Job - what's next for software - ANDdigital tech summit
Nuno Job - what's next for software - ANDdigital tech summitNuno Job - what's next for software - ANDdigital tech summit
Nuno Job - what's next for software - ANDdigital tech summitGreta Strolyte
 
Keynote - AWS Summit Milano 2018
Keynote - AWS Summit Milano 2018Keynote - AWS Summit Milano 2018
Keynote - AWS Summit Milano 2018Amazon Web Services
 

Ähnlich wie Build Facebook-Quality Apps with Meteor (20)

Vb & asp
Vb & aspVb & asp
Vb & asp
 
Angular server side rendering with NodeJS - In Pursuit Of Speed
Angular server side rendering with NodeJS - In Pursuit Of SpeedAngular server side rendering with NodeJS - In Pursuit Of Speed
Angular server side rendering with NodeJS - In Pursuit Of Speed
 
Monitoring and Logging in Wonderland
Monitoring and Logging in WonderlandMonitoring and Logging in Wonderland
Monitoring and Logging in Wonderland
 
AWS SEMINAR SERIES 2015 Perth
AWS SEMINAR SERIES 2015 PerthAWS SEMINAR SERIES 2015 Perth
AWS SEMINAR SERIES 2015 Perth
 
Fast api
Fast apiFast api
Fast api
 
Azure: Finding Success Beyond Test/Dev
Azure: Finding Success Beyond Test/DevAzure: Finding Success Beyond Test/Dev
Azure: Finding Success Beyond Test/Dev
 
Web Development for Managers
Web Development for ManagersWeb Development for Managers
Web Development for Managers
 
Spring Roo 2.0 Preview at Spring I/O 2016
Spring Roo 2.0 Preview at Spring I/O 2016 Spring Roo 2.0 Preview at Spring I/O 2016
Spring Roo 2.0 Preview at Spring I/O 2016
 
AWS Seminar Series 2015 Melbourne
AWS Seminar Series 2015 MelbourneAWS Seminar Series 2015 Melbourne
AWS Seminar Series 2015 Melbourne
 
Simple Crossplatform REST-Service with .NET, Vagrant and Docker
Simple Crossplatform REST-Service with .NET, Vagrant and DockerSimple Crossplatform REST-Service with .NET, Vagrant and Docker
Simple Crossplatform REST-Service with .NET, Vagrant and Docker
 
AWS SeMINAR SERIES 2015 Sydney
AWS SeMINAR SERIES 2015 SydneyAWS SeMINAR SERIES 2015 Sydney
AWS SeMINAR SERIES 2015 Sydney
 
Auckland AWS Seminar Series
Auckland AWS Seminar SeriesAuckland AWS Seminar Series
Auckland AWS Seminar Series
 
AWS Seminar Series 2015 Brisbane
AWS Seminar Series 2015 BrisbaneAWS Seminar Series 2015 Brisbane
AWS Seminar Series 2015 Brisbane
 
SharePoint Saturday Redmond - Building solutions with the future in mind
SharePoint Saturday Redmond - Building solutions with the future in mindSharePoint Saturday Redmond - Building solutions with the future in mind
SharePoint Saturday Redmond - Building solutions with the future in mind
 
Zend con 2016 - Asynchronous Prorgamming in PHP
Zend con 2016 - Asynchronous Prorgamming in PHPZend con 2016 - Asynchronous Prorgamming in PHP
Zend con 2016 - Asynchronous Prorgamming in PHP
 
Puppet Camp Sydney 2014 - Evolving Design Patterns in AWS
Puppet Camp Sydney 2014 - Evolving Design Patterns in AWSPuppet Camp Sydney 2014 - Evolving Design Patterns in AWS
Puppet Camp Sydney 2014 - Evolving Design Patterns in AWS
 
Microservices With Spring Boot and Spring Cloud Netflix
Microservices With Spring Boot and Spring Cloud NetflixMicroservices With Spring Boot and Spring Cloud Netflix
Microservices With Spring Boot and Spring Cloud Netflix
 
Nuno Job - what's next for software - ANDdigital tech summit
Nuno Job - what's next for software - ANDdigital tech summitNuno Job - what's next for software - ANDdigital tech summit
Nuno Job - what's next for software - ANDdigital tech summit
 
Keynote - AWS Summit Milano 2018
Keynote - AWS Summit Milano 2018Keynote - AWS Summit Milano 2018
Keynote - AWS Summit Milano 2018
 
GraphQL, l'avenir du REST ?
GraphQL, l'avenir du REST ?GraphQL, l'avenir du REST ?
GraphQL, l'avenir du REST ?
 

Mehr von Stephan Hochhaus

Erfolgreich trotz Daten - Wie datengetriebene Unternehmen funktionieren
Erfolgreich trotz Daten - Wie datengetriebene Unternehmen funktionierenErfolgreich trotz Daten - Wie datengetriebene Unternehmen funktionieren
Erfolgreich trotz Daten - Wie datengetriebene Unternehmen funktionierenStephan Hochhaus
 
Weltvermessen mit OpenDataCam - Wie ich einmal eine Viertelmillionen Autos ge...
Weltvermessen mit OpenDataCam - Wie ich einmal eine Viertelmillionen Autos ge...Weltvermessen mit OpenDataCam - Wie ich einmal eine Viertelmillionen Autos ge...
Weltvermessen mit OpenDataCam - Wie ich einmal eine Viertelmillionen Autos ge...Stephan Hochhaus
 
Business Value - Stop working for the trash can
Business Value - Stop working for the trash canBusiness Value - Stop working for the trash can
Business Value - Stop working for the trash canStephan Hochhaus
 
Walk of Claim - A Meteor Meetup presentation
Walk of Claim - A Meteor Meetup presentationWalk of Claim - A Meteor Meetup presentation
Walk of Claim - A Meteor Meetup presentationStephan Hochhaus
 
Introduction to Meteor - revised edition
Introduction to Meteor - revised editionIntroduction to Meteor - revised edition
Introduction to Meteor - revised editionStephan Hochhaus
 
Automatisierte infrastruktur mit ansible
Automatisierte infrastruktur mit ansibleAutomatisierte infrastruktur mit ansible
Automatisierte infrastruktur mit ansibleStephan Hochhaus
 
Testing MeteorJS using CasperJS
Testing MeteorJS using CasperJSTesting MeteorJS using CasperJS
Testing MeteorJS using CasperJSStephan Hochhaus
 
LaTeX für Geisteswissenschaftler
LaTeX für GeisteswissenschaftlerLaTeX für Geisteswissenschaftler
LaTeX für GeisteswissenschaftlerStephan Hochhaus
 

Mehr von Stephan Hochhaus (8)

Erfolgreich trotz Daten - Wie datengetriebene Unternehmen funktionieren
Erfolgreich trotz Daten - Wie datengetriebene Unternehmen funktionierenErfolgreich trotz Daten - Wie datengetriebene Unternehmen funktionieren
Erfolgreich trotz Daten - Wie datengetriebene Unternehmen funktionieren
 
Weltvermessen mit OpenDataCam - Wie ich einmal eine Viertelmillionen Autos ge...
Weltvermessen mit OpenDataCam - Wie ich einmal eine Viertelmillionen Autos ge...Weltvermessen mit OpenDataCam - Wie ich einmal eine Viertelmillionen Autos ge...
Weltvermessen mit OpenDataCam - Wie ich einmal eine Viertelmillionen Autos ge...
 
Business Value - Stop working for the trash can
Business Value - Stop working for the trash canBusiness Value - Stop working for the trash can
Business Value - Stop working for the trash can
 
Walk of Claim - A Meteor Meetup presentation
Walk of Claim - A Meteor Meetup presentationWalk of Claim - A Meteor Meetup presentation
Walk of Claim - A Meteor Meetup presentation
 
Introduction to Meteor - revised edition
Introduction to Meteor - revised editionIntroduction to Meteor - revised edition
Introduction to Meteor - revised edition
 
Automatisierte infrastruktur mit ansible
Automatisierte infrastruktur mit ansibleAutomatisierte infrastruktur mit ansible
Automatisierte infrastruktur mit ansible
 
Testing MeteorJS using CasperJS
Testing MeteorJS using CasperJSTesting MeteorJS using CasperJS
Testing MeteorJS using CasperJS
 
LaTeX für Geisteswissenschaftler
LaTeX für GeisteswissenschaftlerLaTeX für Geisteswissenschaftler
LaTeX für Geisteswissenschaftler
 

Kürzlich hochgeladen

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
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...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

Build Facebook-Quality Apps with Meteor

  • 1. I S O M O R P H I C R E A LT I M E A P P S W I T H FA C E B O O K - Q U A L I T Y A P P S W I T H O U T FA C E B O O K ’ S M O N E Y METE R Stephan Hochhaus @yauh
  • 2. T H E R O A D S O FA R • Applications in the browser • JavaScript everywhere • Overwhelming tools
  • 3. A P P S I N T H E B R O W S E R U S E R S E X P E C T M O R E
  • 4. J AVA S C R I P T C O N Q U E R E D T H E S E R V E R N O D E . J S
  • 5. J AVA S C R I P T C O N Q U E R E D T H E S E R V E R N O D E . J S
  • 6. J AVA S C R I P T C O N Q U E R E D T H E S E R V E R N O D E . J S
  • 7. J AVA S C R I P T C O N Q U E R E D T H E S E R V E R N O D E . J S
  • 8. J AVA S C R I P T C O N Q U E R E D T H E S E R V E R N O D E . J S
  • 9. J AVA S C R I P T C O N Q U E R E D T H E S E R V E R N O D E . J S
  • 10. J AVA S C R I P T C O N Q U E R E D T H E S E R V E R N O D E . J S
  • 11. W E B D E V I S R O C K E T S C I E N C E L A R G E T E A M S B U I L D L A R G E A P P S
  • 12. A M E T E O R A P P E A R E D N O W
  • 13. A M E T E O R A P P E A R E D N O W
  • 14.
  • 15. – N I C K M A R T I N At Meteor, we hope to democratize web app development by empowering anyone, anywhere to create apps.
  • 16. T H E M E T E O R S TA C K N O T O N LY F O R R O C K S TA R S
  • 17. T H E M E T E O R S TA C K N O T O N LY F O R R O C K S TA R S The Database The Server Engine Bunch of Libs
  • 18. T H E M E T E O R S TA C K N O T O N LY F O R R O C K S TA R S The CLI Tool The Database The Server Engine Bunch of Libs
  • 19. T H E M E T E O R S TA C K N O T O N LY F O R R O C K S TA R S The CLI Tool The Database The Server Engine Bunch of Libs
  • 20. 1. I S O M O R P H I S M 2. S Y N C H R O N I C I T Y 3. R E A C T I V I T Y 4. S M A R T C L I E N T S W H Y I S I T E A S Y T O L E A R N ?
  • 21. D O C U M E N T- B A S E D D ATA B A S E S M O N G O D B - T H E K E Y T O I S O M O R P H I S M
  • 22. D O C U M E N T- B A S E D D ATA B A S E S M O N G O D B - T H E K E Y T O I S O M O R P H I S M A collection
  • 23. D O C U M E N T- B A S E D D ATA B A S E S M O N G O D B - T H E K E Y T O I S O M O R P H I S M A collection A document Lots of fields
  • 24. DB Server Client SELECT name FROM users WHERE id = 12345 GET http://server/users/
 name/12345 var name = response.name; A C C E S S I N G D A TA T H R O U G H O U T T H E S TA C K
  • 25. I S O M O R P H I C A P P L I C AT I O N S DB Server Client SELECT name FROM users WHERE id = 12345 GET http://server/users/
 name/12345 var name = response.name; A C C E S S I N G D A TA T H R O U G H O U T T H E S TA C K Users.find( {_id: 12345}, {fields: {name : 1} } ) Users.find( {_id: 12345}, {fields: {name : 1} } ) Users.find( {_id: 12345}, {fields: {name : 1} } )
  • 26. E V E N T E D A P P L I C AT I O N S N E E D C A L L B A C K S N O D E . J S A N D T H E E V E N T L O O P Event queue Event Event Event Event … Node.js Event Loop Thread pool Disk Network Process … Single threaded processing Callback split off to a child process
  • 27. C A L L B A C K H E L L T H E D O W N S I D E O F N O D E J S DB.connect(options, function(err, connection){ connection.query(something, function(err, document){ ExternalAPI.makeCall(document, function(err, apiResult){ connection.save(apiResult, function(err, saveResult){ request.end(saveResult); }); }); }); });
  • 28. S Y N C H R O N I C I T Y W I T H M E T E O R T H E P O W E R O F F I B E R S DB.connect(options, function (err, con) { connection = con; }); connection.query(something, function (err, doc) { document = doc; }); ExternalAPI.makeCall(document, function (err, res) { apiResult = res; }); connection.save(apiResult, function (err, res) { saveResult = res; }); request.end(saveResult);
  • 29. Fiber #1 0 10 20 30 40 milliseconds By default Meteor creates one fiber per client DB.connect Wait (idle CPU time) Event Loop connection.query ExternalAPI.makeCall connection.save request.end S Y N C H R O N I C I T Y W I T H M E T E O R T H E P O W E R O F F I B E R S
  • 30. N O M O R E E V E N T- S PA G H E T T I S R E A C T I V I T Y
  • 31. R E A C T I V I T Y
  • 32. R E A C T I V I T Y Traditional programming •var a = 2; var b = 5; var c = a + b; console.log(c); # c is 7
  • 33. R E A C T I V I T Y Traditional programming •var a = 2; var b = 5; var c = a + b; console.log(c); # c is 7 •a = 5; console.log(c); # c is still 7
  • 34. R E A C T I V I T Y Traditional programming •var a = 2; var b = 5; var c = a + b; console.log(c); # c is 7 •a = 5; console.log(c); # c is still 7 •c = a + b; console.log(c); # c is finally 10
  • 35. R E A C T I V I T Y Traditional programming •var a = 2; var b = 5; var c = a + b; console.log(c); # c is 7 •a = 5; console.log(c); # c is still 7 •c = a + b; console.log(c); # c is finally 10 Reactive programming •var a = 2; var b = 5; var c = a + b; console.log(c); # c is 7
  • 36. R E A C T I V I T Y Traditional programming •var a = 2; var b = 5; var c = a + b; console.log(c); # c is 7 •a = 5; console.log(c); # c is still 7 •c = a + b; console.log(c); # c is finally 10 Reactive programming •var a = 2; var b = 5; var c = a + b; console.log(c); # c is 7 •a = 5; console.log(c); # c is magically 10
  • 37. S M A R T C L I E N T S R E M O T E A P P S W I T H B I - D I R E C T I O N A L C O M M U N I C A T I O N
  • 38. M E T E O R C O M M U N I C AT E S R E M O T E A P P S W I T H B I - D I R E C T I O N A L C O M M U N I C A T I O N App Database Server Livequery App MiniDB Client Blaze Tracker HTTP
  • 39. M E T E O R C O M M U N I C AT E S R E M O T E A P P S W I T H B I - D I R E C T I O N A L C O M M U N I C A T I O N App Database Server Livequery App MiniDB Client Blaze Tracker HTTP Static assets HTML, JS, CSS, JPG, PNG, etc The initial request and all static resources are transferred via HTTP
  • 40. M E T E O R C O M M U N I C AT E S R E M O T E A P P S W I T H B I - D I R E C T I O N A L C O M M U N I C A T I O N App Database Server Livequery App MiniDB Client Blaze Tracker HTTP Remote Procedure Calls Data subscriptions DDP via WebSocket Clients call server functions remotely via DDP and the server returns data as JSON objects
  • 41. M E T E O R C O M M U N I C AT E S R E M O T E A P P S W I T H B I - D I R E C T I O N A L C O M M U N I C A T I O N App Database Server Livequery App MiniDB Client Blaze Tracker HTTP Remote Procedure Calls Data subscriptions DDP via WebSocket Clients call server functions remotely via DDP and the server returns data as JSON objects LiveQuery watches for changes and pushes data to all subscribed clients
  • 42. M E T E O R C O M M U N I C AT E S R E M O T E A P P S W I T H B I - D I R E C T I O N A L C O M M U N I C A T I O N App Database Server Livequery App MiniDB Client Blaze Tracker HTTP Remote Procedure Calls Data subscriptions DDP via WebSocket Clients call server functions remotely via DDP and the server returns data as JSON objects LiveQuery watches for changes and pushes data to all subscribed clients Tracker triggers reactive updates, e.g. in the UI powered by Blaze
  • 43. C O D E & PA C K A G E S E X T E N D I N G M E T E O R
  • 44. C O D E & PA C K A G E S E X T E N D I N G M E T E O R Our code
  • 45. C O D E & PA C K A G E S E X T E N D I N G M E T E O R Packages Our code
  • 46. I N S TA L L M E T E O R L E T ’ S B U I L D Linux, Mac: $ curl https://install.meteor.com/ | sh Windows: https://www.meteor.com/install
  • 47. TA L K I N G T O T H E T W I T T E R A P I E X T E N D I N G M E T E O R W I T H O A U T H External API Using a package
  • 48. M U LT I P L E P L AT F O R M S A S I N G L E C O D E B A S E - M A N Y D E P L O Y M E N T S
  • 49. M U LT I P L E P L AT F O R M S A S I N G L E C O D E B A S E - M A N Y D E P L O Y M E N T S Server/ Client
  • 50. M U LT I P L E P L AT F O R M S A S I N G L E C O D E B A S E - M A N Y D E P L O Y M E N T S Mobile Server/ Client