SlideShare uma empresa Scribd logo
1 de 87
Baixar para ler offline
Emerging Web App Architectures
Using Java and Node.js
2
@stevewallin
Steve Wallin
JCP EC member
Program Director, IBM
3
Learning to code as a product of the 80’s
4
Learning to code as a product of the 80’s
5
Learning to code as a product of the 80’s
6
Learning to code as a product of the 80’s
7
Learning to code as a product of the 80’s
8
Learning to code as a product of the 80’s / 90’s
9
Learning to code as a product of the 80’s / 90’s
10
3-Tier Web Applications
11
3-Tier Web Applications
HTTP
12
3-Tier Web Applications
HTTP
LoadBalancer
13
3-Tier Web Applications
HTTP
LoadBalancer
14
Operations and Management
Admin Analytics
LoadBalancer
HTTP
3-Tier Web Applications
15
Java and JEE based Web Applications
16
From Web Sites to Web Apps
● JavaScript is ubiquitous in the browser
- Supported in every browser
- Integration with HTML and CSS
● JavaScript is not affected by negative publicity....
17
Unless it is absolutely necessary to run Java in web browsers, disable it as
described below, even after updating to 7u11. This will help mitigate other Java
vulnerabilities that may be discovered in the future.
This and previous Java vulnerabilities have been widely targeted by attackers, and
new Java vulnerabilities are likely to be discovered. To defend against this and future
Java vulnerabilities, consider disabling Java in web browsers…
Programming in the Browser
18
FullStack JavaScript Development
● Reuse of programming skills and teams
● Reuse of skills for both client and server side code
● Reuse of “isomorphic” code components
● Reuse of code for both client and server
● Write One Run Anywhere
● Faster user experience performance
● Use of server side rendering
19
Fashion and trends
20
+
Node.js and Java
21
Language selection
22
Language selection
23
API Package Support
● Node.js:
● 300K+ packages
● 430 packages/day
● Java growth:
● 150K packages
● 100 packages/day
24
● Average 45% less code required for Node.js implementation
Code required to implement benchmarks
25
var cluster = require('cluster');
var cpus = require('os').cpus().length;
var http = require('http');
if (cluster.isMaster) {
for (var i = 0; i < cpus; i++) {
cluster.fork();
}
cluster.on('death', function(worker) {
console.log("Worker" + worker.pid + "died");
});
} else {
http.createServer(function(request, response) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.write("Hello World!n");
response.end();
}).listen(8080);
}
Writing a HTTP Server
26
var cluster = require('cluster');
var cpus = require('os').cpus().length;
var http = require('http');
if (cluster.isMaster) {
for (var i = 0; i < cpus; i++) {
cluster.fork();
}
cluster.on('death', function(worker) {
console.log("Worker" + worker.pid + "died");
});
} else {
http.createServer(function(request, response) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.write("Hello World!n");
response.end();
}).listen(8080);
}
And Clustering It….
27
● One thread (or process) per connection
- Each thread waits on a response
- Scalability determined by the number of
threads
● Each thread:
- consumes memory
- is relatively idle
● Concurrency determined by number of depot
workers
Typical Java Approach to Scalable I/O
28
● One thread multiplexes for multiple requests
- No waiting for a response
- Handles return from I/O when notified
● Scalability determined by:
- CPU usage
- “Back end” responsiveness
● Concurrency determined by how fast the food
server can work
Node.js approach to Scalable I/O
29
Algorithmic Performance
30
Algorithmic Performance
31
Web App Performance
More
Computation
More
I/O
32
Web App Performance
More
Computation
More
I/O
33
Web App Performance
More
Computation
More
I/O
34
Web App Performance
More
Computation
More
I/O
35
Simple Calculation: 5 + 3
private static void add (int a, int b){
System.out.println(a + b);
}
public static void main(String[] args){
int a = 5;
int b = 3;
add(a, b);
}
> javac app.java
> java app
> 8
var add = function (a, b) {
console.log(a + b);
}
var a = 5;
var b = 3;
add(a, b);
> node app.js
> 8
36
Simple Calculation: 5 + 3
private static void add (int a, int b){
System.out.println(a + b);
}
public static void main(String[] args){
int a = 5;
int b = 3;
add(a, b);
}
> javac app.java
> java app
> 8
var add = function (a, b) {
console.log(a + b);
}
var a = 5;
var b = 3;
add(a, b);
> node app.js
> 8
37
Simple Calculation: 5 + 3
private static void add (int a, int b){
System.out.println(a + b);
}
public static void main(String[] args){
int a = 5;
int b = 3;
add(a, b);
}
> javac app.java
> java app
> 8
var add = function (a, b) {
console.log(a + b);
}
var a = 5;
var b = 3;
add(a, b);
> node app.js
> 8
38
Simple Calculation: 5 + 3
private static void add (int a, int b){
System.out.println(a + b);
}
public static void main(String[] args){
int a = 5;
int b = 3;
add(a, b);
}
> javac app.java
> java app
> 8
var add = function (a, b) {
console.log(a + b);
}
var a = 5;
var b = 3;
add(a, b);
> node app.js
> 8
39
Simple Calculation: 5 + 3
private static void add (int a, int b){
System.out.println(a + b);
}
public static void main(String[] args){
int a = 5;
int b = 3;
add(a, b);
}
> javac app.java
> java app
> 8
var add = function (a, b) {
console.log(a + b);
}
var a = 5;
var b = 3;
add(a, b);
> node app.js
> 8
40
Simple Calculation: 5 + 3
private static void add (int a, int b){
System.out.println(a + b);
}
public static void main(String[] args){
String a = new String(“5”);
int b = 3;
add(a, b);
}
> javac app.java
> java app
> 8
var add = function (a, b) {
console.log(a + b);
}
var a = ‘5’;
var b = 3;
add(a, b);
> node app.js
> 8
41
Simple Calculation: 5 + 3
private static void add (int a, int b){
System.out.println(a + b);
}
public static void main(String[] args){
String a = new String(“5”);
int b = 3;
add(a, b);
}
> javac app.java
> java app
> 8
var add = function (a, b) {
console.log(a + b);
}
var a = ‘5’;
var b = 3;
add(a, b);
> node app.js
> 8
42
Simple Calculation: 5 + 3
private static void add (int a, int b){
System.out.println(a + b);
}
public static void main(String[] args){
String a = new String(“5”);
int b = 3;
add(a, b);
}
> javac app.java
Error: incompatible types: String
cannot be converted to int
add(a, b);
^
var add = function (a, b) {
console.log(a + b);
}
var a = ‘5’;
var b = 3;
add(a, b);
> node app.js
> 8
43
Simple Calculation: 5 + 3
private static void add (int a, int b){
System.out.println(a + b);
}
public static void main(String[] args){
String a = new String(“5”);
int b = 3;
add(a, b);
}
> javac app.java
Error: incompatible types: String
cannot be converted to int
add(a, b);
^
var add = function (a, b) {
console.log(a + b);
}
var a = ‘5’;
var b = 3;
add(a, b);
> node app.js
> 53
44
JavaScript Calculations
> 5 + 3
8
> '5' + 3
'53'
> '5' – 3
2 // Weak typing, implicit conversion
> '5' – '4'
1 // String minus String = Integer??
> '5' + + '4'
54 // Multiple +'s are ok
> 'Hello' + 'World'
'HelloWorld' // Ok, that's expected
> 'Hello' + + 'World'
'HelloNaN' // ...but that isn't
45
JavaScript Calculations
> 5 + 3
8
> '5' + 3
'53'
> '5' – 3
2 // Weak typing, implicit conversion
> '5' – '4'
1 // String minus String = Integer??
> '5' + + '4'
54 // Multiple +'s are ok
> 'Hello' + 'World'
'HelloWorld' // Ok, that's expected
> 'Hello' + + 'World'
'HelloNaN' // ...but that isn't
46
JavaScript Calculations
> 5 + 3
8
> '5' + 3
'53'
> '5' – 3
2 // String is converted to a number for subtraction
> '5' – '4'
1 // String minus String = Integer??
> '5' + + '4'
54 // Multiple +'s are ok
> 'Hello' + 'World'
'HelloWorld' // Ok, that's expected
> 'Hello' + + 'World'
'HelloNaN' // ...but that isn't
47
JavaScript Calculations
> 5 + 3
8
> '5' + 3
'53'
> '5' – 3
2 // String is converted to a number for subtraction
> '5' – '4'
1 // String minus String = Integer??
> '5' + + '4'
54 // Multiple +'s are ok
> 'Hello' + 'World'
'HelloWorld' // Ok, that's expected
> 'Hello' + + 'World'
'HelloNaN' // ...but that isn't
48
JavaScript Calculations
> 5 + 3
8
> '5' + 3
'53'
> '5' – 3
2 // String is converted to a number for subtraction
> '5' – '4'
1 // Both Strings converted to number for subtraction
> '5' + + '4'
54 // Multiple +'s are ok
> 'Hello' + 'World'
'HelloWorld' // Ok, that's expected
> 'Hello' + + 'World'
'HelloNaN' // ...but that isn't
49
JavaScript Calculations
> 5 + 3
8
> '5' + 3
'53'
> '5' – 3
2 // String is converted to a number for subtraction
> '5' – '4'
1 // Both Strings converted to number for subtraction
> '5' + + '4'
54 // Multiple +'s are ok
> 'Hello' + 'World'
'HelloWorld' // Ok, that's expected
> 'Hello' + + 'World'
'HelloNaN' // ...but that isn't
50
JavaScript Calculations
> 5 + 3
8
> '5' + 3
'53'
> '5' – 3
2 // String is converted to a number for subtraction
> '5' – '4'
1 // Both Strings converted to number for subtraction
> '5' + + '4'
54 // Multiple +'s are ok
> 'Hello' + 'World'
'HelloWorld' // Ok, that's expected
> 'Hello' + + 'World'
'HelloNaN' // ...but that isn't
51
JavaScript Calculations
> 5 + 3
8
> '5' + 3
'53'
> '5' – 3
2 // String is converted to a number for subtraction
> '5' – '4'
1 // Both Strings converted to number for subtraction
> '5' + + '4'
54 // Multiple +'s are ok
> 'Hello' + 'World'
'HelloWorld' // Ok, that's expected
> 'Hello' + + 'World'
'HelloNaN' // ...but that isn't
52
JavaScript Calculations
> 5 + 3
8
> '5' + 3
'53'
> '5' – 3
2 // String is converted to a number for subtraction
> '5' – '4'
1 // Both Strings converted to number for subtraction
> '5' + + '4'
54 // Multiple +'s are ok
> 'Hello' + 'World'
'HelloWorld' // Ok, that's expected
> 'Hello' + + 'World'
'HelloNaN' // ...but that isn't
53
JavaScript Calculations
> 5 + 3
8
> '5' + 3
'53'
> '5' – 3
2 // String is converted to a number for subtraction
> '5' – '4'
1 // Both Strings converted to number for subtraction
> '5' + + '4'
54 // Multiple +'s are ok
> 'Hello' + 'World'
'HelloWorld' // Ok, that's expected
> 'Hello' + + 'World'
'HelloNaN' // ...but that isn't
54
JavaScript Calculations
> 5 + 3
8
> '5' + 3
'53'
> '5' – 3
2 // String is converted to a number for subtraction
> '5' – '4'
1 // Both Strings converted to number for subtraction
> '5' + + '4'
54 // Multiple +'s are ok
> 'Hello' + 'World'
'HelloWorld' // Ok, that's expected
> 'Hello' + + 'World'
'HelloNaN' // Multiple plus must cause String to number conversion
55
JavaScript Calculations
> '5' + - '2'
'5-2' // I can just about see that works
> var x = 3
undefined
> '5' – x + x
5 // Ok, that makes sense
> var x = 3
undefined
> '5' + x - x
50 // What???
56
JavaScript Calculations
> '5' + - '2'
'5-2' // I can just about see that works
> var x = 3
> '5' – x + x
5 // Ok, that makes sense
> var x = 3
undefined
> '5' + x - x
50 // What???
57
JavaScript Calculations
> '5' + - '2'
'5-2' // I can just about see that works
> var x = 3
> '5' – x + x
5 // Ok, that makes sense
> var x = 3
> '5' + x - x
50 // What???
58
Language
Selection
59
Choosing the Right Language for the Service
60
Choosing the Right Language for the Service
61
Node.js
0
- 4x
+ 1/3x
Node.jsPerformanceRelativetoJava
CPU Bound I/O Bound
* based on TechEmpower benchmark results
Application Performance
(higher is better)
Choosing the Right Language for the Service
62
Node.js
0
- 4x
+ 1/3x
Node.jsPerformanceRelativetoJava
CPU Bound I/O Bound
* based on TechEmpower benchmark results
Application Performance
(higher is better)
Choosing the Right Language for the Service
Error: incompatible types
ClassCastException
63
Monolithic and Micro Services
Services are small and targeted to their task
Services are organized around capabilities
Services are self contained, storing their own data
“Do one thing, and do it well”
64
● Higher performance for I/O
● Easier async programming
● Fullstack/isomorphic development
Choosing the Right Language for the Service
65
Choosing the Right Language for the Service
● Higher processing performance
● Type safety for calculations
● Transaction processing frameworks
66
● Highly performant, scalable rich web applications
● Highly performant, reliable transaction processing
● Self-contained micro-service components
Choosing the Right Language for the Service
+
67
Emerging
Architectures
68
Forrester 4-Tier Applications
69
Operations and Management
Admin Analytics
LoadBalancer
HTTP
3-Tier Web Applications
70
Operations and Management
Admin Analytics
LoadBalancer
HTTP
Rich Web Applications
71
Operations and Management
Admin Analytics
LoadBalancer
HTTP
Rich Web Applications
72
Operations and Management
Admin Analytics
LoadBalancer
HTTP
Rich Web Applications
LoadBalancer
73
Operations and Management
Admin Analytics
LoadBalancer
HTTP
MicroServices and API Economy
LoadBalancer
74
Operations and Management
Admin Analytics
LoadBalancer
HTTP
MicroServices and API Economy
LoadBalancer
75
Operations and Management
Admin Analytics
LoadBalancer
HTTP
MicroServices and API Economy
LoadBalancer
76
Operations and Management
Admin Analytics
LoadBalancer
HTTP
MicroServices and API Economy
LoadBalancer
77
Operations and Management
Admin Analytics
LoadBalancer
HTTP
MicroServices and API Economy
78
Operations and Management
Admin Analytics
LoadBalancer
HTTP
MicroServices and API Economy
79
Operations and Management
Admin Analytics
LoadBalancer
HTTP
MicroServices and API Economy
Services
80
Operations and Management
Admin Analytics
LoadBalancer
HTTP
MicroServices and API Economy
Services
81
Operations and Management
Admin Analytics
LoadBalancer
HTTP
MicroServices and API Economy
Services
82
Operations and Management
Admin Analytics
LoadBalancer
HTTP
MicroServices and API Economy
Services
83
Operations and Management
Admin Analytics
LoadBalancer
HTTP
MicroServices and API Economy
Services
Client
84
Operations and Management
Admin Analytics
LoadBalancer
HTTP
MicroServices and API Economy
Services
Client
Delivery
85
Operations and Management
Admin Analytics
LoadBalancer
HTTP
MicroServices and API Economy
Client
Delivery
Aggregation
Services
86
Node.js and Java
+
Get a Java Docker
container today !
hub.docker.com
ibmjava
@stevewallin
Come and see us at the booth
nodereport
appmetrics

Mais conteúdo relacionado

Mais procurados

Serverless, The Middy Way - Workshop
Serverless, The Middy Way - WorkshopServerless, The Middy Way - Workshop
Serverless, The Middy Way - WorkshopLuciano Mammino
 
Middy.js - A powerful Node.js middleware framework for your lambdas​
Middy.js - A powerful Node.js middleware framework for your lambdas​ Middy.js - A powerful Node.js middleware framework for your lambdas​
Middy.js - A powerful Node.js middleware framework for your lambdas​ Luciano Mammino
 
Celery: The Distributed Task Queue
Celery: The Distributed Task QueueCelery: The Distributed Task Queue
Celery: The Distributed Task QueueRichard Leland
 
Asynchronous programming done right - Node.js
Asynchronous programming done right - Node.jsAsynchronous programming done right - Node.js
Asynchronous programming done right - Node.jsPiotr Pelczar
 
An Introduction to Celery
An Introduction to CeleryAn Introduction to Celery
An Introduction to CeleryIdan Gazit
 
Code generation with javac plugin
Code generation with javac pluginCode generation with javac plugin
Code generation with javac pluginOleksandr Radchykov
 
Django Celery - A distributed task queue
Django Celery - A distributed task queueDjango Celery - A distributed task queue
Django Celery - A distributed task queueAlex Eftimie
 
Callbacks, promises, generators - asynchronous javascript
Callbacks, promises, generators - asynchronous javascriptCallbacks, promises, generators - asynchronous javascript
Callbacks, promises, generators - asynchronous javascriptŁukasz Kużyński
 
How to send gzipped requests with boto3
How to send gzipped requests with boto3How to send gzipped requests with boto3
How to send gzipped requests with boto3Luciano Mammino
 
DRYing to Monad in Java8
DRYing to Monad in Java8DRYing to Monad in Java8
DRYing to Monad in Java8Dhaval Dalal
 
Threads, Queues, and More: Async Programming in iOS
Threads, Queues, and More: Async Programming in iOSThreads, Queues, and More: Async Programming in iOS
Threads, Queues, and More: Async Programming in iOSTechWell
 
InterConnect: Server Side Swift for Java Developers
InterConnect:  Server Side Swift for Java DevelopersInterConnect:  Server Side Swift for Java Developers
InterConnect: Server Side Swift for Java DevelopersChris Bailey
 
Mirage For Beginners
Mirage For BeginnersMirage For Beginners
Mirage For BeginnersWilson Su
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoinknight1128
 
Node.js API 서버 성능 개선기
Node.js API 서버 성능 개선기Node.js API 서버 성능 개선기
Node.js API 서버 성능 개선기JeongHun Byeon
 

Mais procurados (20)

Serverless, The Middy Way - Workshop
Serverless, The Middy Way - WorkshopServerless, The Middy Way - Workshop
Serverless, The Middy Way - Workshop
 
Middy.js - A powerful Node.js middleware framework for your lambdas​
Middy.js - A powerful Node.js middleware framework for your lambdas​ Middy.js - A powerful Node.js middleware framework for your lambdas​
Middy.js - A powerful Node.js middleware framework for your lambdas​
 
Celery: The Distributed Task Queue
Celery: The Distributed Task QueueCelery: The Distributed Task Queue
Celery: The Distributed Task Queue
 
Learning Dtrace
Learning DtraceLearning Dtrace
Learning Dtrace
 
Asynchronous programming done right - Node.js
Asynchronous programming done right - Node.jsAsynchronous programming done right - Node.js
Asynchronous programming done right - Node.js
 
Django Celery
Django Celery Django Celery
Django Celery
 
An Introduction to Celery
An Introduction to CeleryAn Introduction to Celery
An Introduction to Celery
 
Code generation with javac plugin
Code generation with javac pluginCode generation with javac plugin
Code generation with javac plugin
 
Django Celery - A distributed task queue
Django Celery - A distributed task queueDjango Celery - A distributed task queue
Django Celery - A distributed task queue
 
My java file
My java fileMy java file
My java file
 
Callbacks, promises, generators - asynchronous javascript
Callbacks, promises, generators - asynchronous javascriptCallbacks, promises, generators - asynchronous javascript
Callbacks, promises, generators - asynchronous javascript
 
How to send gzipped requests with boto3
How to send gzipped requests with boto3How to send gzipped requests with boto3
How to send gzipped requests with boto3
 
DRYing to Monad in Java8
DRYing to Monad in Java8DRYing to Monad in Java8
DRYing to Monad in Java8
 
Finatra v2
Finatra v2Finatra v2
Finatra v2
 
Threads, Queues, and More: Async Programming in iOS
Threads, Queues, and More: Async Programming in iOSThreads, Queues, and More: Async Programming in iOS
Threads, Queues, and More: Async Programming in iOS
 
InterConnect: Server Side Swift for Java Developers
InterConnect:  Server Side Swift for Java DevelopersInterConnect:  Server Side Swift for Java Developers
InterConnect: Server Side Swift for Java Developers
 
Mirage For Beginners
Mirage For BeginnersMirage For Beginners
Mirage For Beginners
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoin
 
Node.js API 서버 성능 개선기
Node.js API 서버 성능 개선기Node.js API 서버 성능 개선기
Node.js API 서버 성능 개선기
 
Little Big Ruby
Little Big RubyLittle Big Ruby
Little Big Ruby
 

Destaque

Accelerating Innovation with Java: The Future is Today
Accelerating Innovation with Java: The Future is TodayAccelerating Innovation with Java: The Future is Today
Accelerating Innovation with Java: The Future is TodayJohn Duimovich
 
Taking friction out of banking white paper - US
Taking friction out of banking white paper - USTaking friction out of banking white paper - US
Taking friction out of banking white paper - USNils Mork-Ulnes
 
DAVID-CAMERON-IS-A-C-WORD
DAVID-CAMERON-IS-A-C-WORDDAVID-CAMERON-IS-A-C-WORD
DAVID-CAMERON-IS-A-C-WORDFay Longley
 
Presentation resotel legrand RESOTEL
Presentation resotel legrand RESOTELPresentation resotel legrand RESOTEL
Presentation resotel legrand RESOTELAchille Enone
 
Is social media as powerful as we think
Is social media as powerful as we thinkIs social media as powerful as we think
Is social media as powerful as we thinkRachael Nagelberg
 
The Bad Idea Terminator - QCon London 2015
The Bad Idea Terminator - QCon London 2015The Bad Idea Terminator - QCon London 2015
The Bad Idea Terminator - QCon London 2015Melissa Perri
 
Daniels Gate Clients Home
Daniels Gate Clients HomeDaniels Gate Clients Home
Daniels Gate Clients Homecyndifyke
 
Digital marketing and the music entrepreneur 2011
Digital marketing and the music entrepreneur 2011Digital marketing and the music entrepreneur 2011
Digital marketing and the music entrepreneur 2011Digital Consultant
 
Towards a Reputation Economy: How Openness and Transparency Become a Central ...
Towards a Reputation Economy: How Openness and Transparency Become a Central ...Towards a Reputation Economy: How Openness and Transparency Become a Central ...
Towards a Reputation Economy: How Openness and Transparency Become a Central ...Robert J. Stein
 
New York Town Hall Value Added - VARC
New York Town Hall Value Added - VARCNew York Town Hall Value Added - VARC
New York Town Hall Value Added - VARCNWEA
 
Tips on Saving Money on Diapers: An Infographic
Tips on Saving Money on Diapers: An InfographicTips on Saving Money on Diapers: An Infographic
Tips on Saving Money on Diapers: An InfographicDiaper Buys
 
Recruiter Next Generation - A ferramenta de recrutamento do LinkedIn
Recruiter Next Generation - A ferramenta de recrutamento do LinkedInRecruiter Next Generation - A ferramenta de recrutamento do LinkedIn
Recruiter Next Generation - A ferramenta de recrutamento do LinkedInLinkedIn
 
Презентация проекта Циклы в нашей жизни
Презентация проекта Циклы в нашей жизниПрезентация проекта Циклы в нашей жизни
Презентация проекта Циклы в нашей жизниgalina_pr
 
Soft skills : U2ES, une formation pour booster ses compétences
Soft skills : U2ES, une formation pour booster ses compétences Soft skills : U2ES, une formation pour booster ses compétences
Soft skills : U2ES, une formation pour booster ses compétences AKASIAS
 

Destaque (16)

Accelerating Innovation with Java: The Future is Today
Accelerating Innovation with Java: The Future is TodayAccelerating Innovation with Java: The Future is Today
Accelerating Innovation with Java: The Future is Today
 
Taking friction out of banking white paper - US
Taking friction out of banking white paper - USTaking friction out of banking white paper - US
Taking friction out of banking white paper - US
 
DAVID-CAMERON-IS-A-C-WORD
DAVID-CAMERON-IS-A-C-WORDDAVID-CAMERON-IS-A-C-WORD
DAVID-CAMERON-IS-A-C-WORD
 
5 essential steps flyer
5 essential steps flyer5 essential steps flyer
5 essential steps flyer
 
Presentation resotel legrand RESOTEL
Presentation resotel legrand RESOTELPresentation resotel legrand RESOTEL
Presentation resotel legrand RESOTEL
 
Is social media as powerful as we think
Is social media as powerful as we thinkIs social media as powerful as we think
Is social media as powerful as we think
 
The Bad Idea Terminator - QCon London 2015
The Bad Idea Terminator - QCon London 2015The Bad Idea Terminator - QCon London 2015
The Bad Idea Terminator - QCon London 2015
 
หมาใจดำ
หมาใจดำหมาใจดำ
หมาใจดำ
 
Daniels Gate Clients Home
Daniels Gate Clients HomeDaniels Gate Clients Home
Daniels Gate Clients Home
 
Digital marketing and the music entrepreneur 2011
Digital marketing and the music entrepreneur 2011Digital marketing and the music entrepreneur 2011
Digital marketing and the music entrepreneur 2011
 
Towards a Reputation Economy: How Openness and Transparency Become a Central ...
Towards a Reputation Economy: How Openness and Transparency Become a Central ...Towards a Reputation Economy: How Openness and Transparency Become a Central ...
Towards a Reputation Economy: How Openness and Transparency Become a Central ...
 
New York Town Hall Value Added - VARC
New York Town Hall Value Added - VARCNew York Town Hall Value Added - VARC
New York Town Hall Value Added - VARC
 
Tips on Saving Money on Diapers: An Infographic
Tips on Saving Money on Diapers: An InfographicTips on Saving Money on Diapers: An Infographic
Tips on Saving Money on Diapers: An Infographic
 
Recruiter Next Generation - A ferramenta de recrutamento do LinkedIn
Recruiter Next Generation - A ferramenta de recrutamento do LinkedInRecruiter Next Generation - A ferramenta de recrutamento do LinkedIn
Recruiter Next Generation - A ferramenta de recrutamento do LinkedIn
 
Презентация проекта Циклы в нашей жизни
Презентация проекта Циклы в нашей жизниПрезентация проекта Циклы в нашей жизни
Презентация проекта Циклы в нашей жизни
 
Soft skills : U2ES, une formation pour booster ses compétences
Soft skills : U2ES, une formation pour booster ses compétences Soft skills : U2ES, une formation pour booster ses compétences
Soft skills : U2ES, une formation pour booster ses compétences
 

Semelhante a JavaOne 2016 -Emerging Web App Architectures using Java and node.js

InterConnect2016: WebApp Architectures with Java and Node.js
InterConnect2016: WebApp Architectures with Java and Node.jsInterConnect2016: WebApp Architectures with Java and Node.js
InterConnect2016: WebApp Architectures with Java and Node.jsChris Bailey
 
Planet-HTML5-Game-Engine Javascript Performance Enhancement
Planet-HTML5-Game-Engine Javascript Performance EnhancementPlanet-HTML5-Game-Engine Javascript Performance Enhancement
Planet-HTML5-Game-Engine Javascript Performance Enhancementup2soul
 
Advanced Debugging Using Java Bytecodes
Advanced Debugging Using Java BytecodesAdvanced Debugging Using Java Bytecodes
Advanced Debugging Using Java BytecodesGanesh Samarthyam
 
Ch ch-changes cake php2
Ch ch-changes cake php2Ch ch-changes cake php2
Ch ch-changes cake php2markstory
 
IBM Cloud University: Java, Node.js and Swift
IBM Cloud University: Java, Node.js and SwiftIBM Cloud University: Java, Node.js and Swift
IBM Cloud University: Java, Node.js and SwiftChris Bailey
 
Core Php Component Presentation
Core Php Component PresentationCore Php Component Presentation
Core Php Component PresentationJohn Coonen
 
Corephpcomponentpresentation 1211425966721657-8
Corephpcomponentpresentation 1211425966721657-8Corephpcomponentpresentation 1211425966721657-8
Corephpcomponentpresentation 1211425966721657-8PrinceGuru MS
 
Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12Michelangelo van Dam
 
fog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the Cloudfog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the CloudWesley Beary
 
The why and how of moving to php 5.4/5.5
The why and how of moving to php 5.4/5.5The why and how of moving to php 5.4/5.5
The why and how of moving to php 5.4/5.5Wim Godden
 
Quality assurance for php projects with PHPStorm
Quality assurance for php projects with PHPStormQuality assurance for php projects with PHPStorm
Quality assurance for php projects with PHPStormMichelangelo van Dam
 
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)Wesley Beary
 
Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Michelangelo van Dam
 
Review unknown code with static analysis Zend con 2017
Review unknown code with static analysis  Zend con 2017Review unknown code with static analysis  Zend con 2017
Review unknown code with static analysis Zend con 2017Damien Seguy
 
Windows Server 2008 (PowerShell Scripting Uygulamaları)
Windows Server 2008 (PowerShell Scripting Uygulamaları)Windows Server 2008 (PowerShell Scripting Uygulamaları)
Windows Server 2008 (PowerShell Scripting Uygulamaları)ÇözümPARK
 
{{more}} Kibana4
{{more}} Kibana4{{more}} Kibana4
{{more}} Kibana4琛琳 饶
 
.gradle 파일 정독해보기
.gradle 파일 정독해보기.gradle 파일 정독해보기
.gradle 파일 정독해보기경주 전
 

Semelhante a JavaOne 2016 -Emerging Web App Architectures using Java and node.js (20)

InterConnect2016: WebApp Architectures with Java and Node.js
InterConnect2016: WebApp Architectures with Java and Node.jsInterConnect2016: WebApp Architectures with Java and Node.js
InterConnect2016: WebApp Architectures with Java and Node.js
 
Planet-HTML5-Game-Engine Javascript Performance Enhancement
Planet-HTML5-Game-Engine Javascript Performance EnhancementPlanet-HTML5-Game-Engine Javascript Performance Enhancement
Planet-HTML5-Game-Engine Javascript Performance Enhancement
 
Advanced Debugging Using Java Bytecodes
Advanced Debugging Using Java BytecodesAdvanced Debugging Using Java Bytecodes
Advanced Debugging Using Java Bytecodes
 
Ch ch-changes cake php2
Ch ch-changes cake php2Ch ch-changes cake php2
Ch ch-changes cake php2
 
Price of an Error
Price of an ErrorPrice of an Error
Price of an Error
 
IBM Cloud University: Java, Node.js and Swift
IBM Cloud University: Java, Node.js and SwiftIBM Cloud University: Java, Node.js and Swift
IBM Cloud University: Java, Node.js and Swift
 
Core Php Component Presentation
Core Php Component PresentationCore Php Component Presentation
Core Php Component Presentation
 
Corephpcomponentpresentation 1211425966721657-8
Corephpcomponentpresentation 1211425966721657-8Corephpcomponentpresentation 1211425966721657-8
Corephpcomponentpresentation 1211425966721657-8
 
Real
RealReal
Real
 
Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12
 
Java
Java Java
Java
 
fog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the Cloudfog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the Cloud
 
The why and how of moving to php 5.4/5.5
The why and how of moving to php 5.4/5.5The why and how of moving to php 5.4/5.5
The why and how of moving to php 5.4/5.5
 
Quality assurance for php projects with PHPStorm
Quality assurance for php projects with PHPStormQuality assurance for php projects with PHPStorm
Quality assurance for php projects with PHPStorm
 
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
 
Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012
 
Review unknown code with static analysis Zend con 2017
Review unknown code with static analysis  Zend con 2017Review unknown code with static analysis  Zend con 2017
Review unknown code with static analysis Zend con 2017
 
Windows Server 2008 (PowerShell Scripting Uygulamaları)
Windows Server 2008 (PowerShell Scripting Uygulamaları)Windows Server 2008 (PowerShell Scripting Uygulamaları)
Windows Server 2008 (PowerShell Scripting Uygulamaları)
 
{{more}} Kibana4
{{more}} Kibana4{{more}} Kibana4
{{more}} Kibana4
 
.gradle 파일 정독해보기
.gradle 파일 정독해보기.gradle 파일 정독해보기
.gradle 파일 정독해보기
 

Último

Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 

Último (20)

Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 

JavaOne 2016 -Emerging Web App Architectures using Java and node.js

  • 1. Emerging Web App Architectures Using Java and Node.js
  • 2. 2 @stevewallin Steve Wallin JCP EC member Program Director, IBM
  • 3. 3 Learning to code as a product of the 80’s
  • 4. 4 Learning to code as a product of the 80’s
  • 5. 5 Learning to code as a product of the 80’s
  • 6. 6 Learning to code as a product of the 80’s
  • 7. 7 Learning to code as a product of the 80’s
  • 8. 8 Learning to code as a product of the 80’s / 90’s
  • 9. 9 Learning to code as a product of the 80’s / 90’s
  • 14. 14 Operations and Management Admin Analytics LoadBalancer HTTP 3-Tier Web Applications
  • 15. 15 Java and JEE based Web Applications
  • 16. 16 From Web Sites to Web Apps
  • 17. ● JavaScript is ubiquitous in the browser - Supported in every browser - Integration with HTML and CSS ● JavaScript is not affected by negative publicity.... 17 Unless it is absolutely necessary to run Java in web browsers, disable it as described below, even after updating to 7u11. This will help mitigate other Java vulnerabilities that may be discovered in the future. This and previous Java vulnerabilities have been widely targeted by attackers, and new Java vulnerabilities are likely to be discovered. To defend against this and future Java vulnerabilities, consider disabling Java in web browsers… Programming in the Browser
  • 18. 18 FullStack JavaScript Development ● Reuse of programming skills and teams ● Reuse of skills for both client and server side code ● Reuse of “isomorphic” code components ● Reuse of code for both client and server ● Write One Run Anywhere ● Faster user experience performance ● Use of server side rendering
  • 23. 23 API Package Support ● Node.js: ● 300K+ packages ● 430 packages/day ● Java growth: ● 150K packages ● 100 packages/day
  • 24. 24 ● Average 45% less code required for Node.js implementation Code required to implement benchmarks
  • 25. 25 var cluster = require('cluster'); var cpus = require('os').cpus().length; var http = require('http'); if (cluster.isMaster) { for (var i = 0; i < cpus; i++) { cluster.fork(); } cluster.on('death', function(worker) { console.log("Worker" + worker.pid + "died"); }); } else { http.createServer(function(request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.write("Hello World!n"); response.end(); }).listen(8080); } Writing a HTTP Server
  • 26. 26 var cluster = require('cluster'); var cpus = require('os').cpus().length; var http = require('http'); if (cluster.isMaster) { for (var i = 0; i < cpus; i++) { cluster.fork(); } cluster.on('death', function(worker) { console.log("Worker" + worker.pid + "died"); }); } else { http.createServer(function(request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.write("Hello World!n"); response.end(); }).listen(8080); } And Clustering It….
  • 27. 27 ● One thread (or process) per connection - Each thread waits on a response - Scalability determined by the number of threads ● Each thread: - consumes memory - is relatively idle ● Concurrency determined by number of depot workers Typical Java Approach to Scalable I/O
  • 28. 28 ● One thread multiplexes for multiple requests - No waiting for a response - Handles return from I/O when notified ● Scalability determined by: - CPU usage - “Back end” responsiveness ● Concurrency determined by how fast the food server can work Node.js approach to Scalable I/O
  • 35. 35 Simple Calculation: 5 + 3 private static void add (int a, int b){ System.out.println(a + b); } public static void main(String[] args){ int a = 5; int b = 3; add(a, b); } > javac app.java > java app > 8 var add = function (a, b) { console.log(a + b); } var a = 5; var b = 3; add(a, b); > node app.js > 8
  • 36. 36 Simple Calculation: 5 + 3 private static void add (int a, int b){ System.out.println(a + b); } public static void main(String[] args){ int a = 5; int b = 3; add(a, b); } > javac app.java > java app > 8 var add = function (a, b) { console.log(a + b); } var a = 5; var b = 3; add(a, b); > node app.js > 8
  • 37. 37 Simple Calculation: 5 + 3 private static void add (int a, int b){ System.out.println(a + b); } public static void main(String[] args){ int a = 5; int b = 3; add(a, b); } > javac app.java > java app > 8 var add = function (a, b) { console.log(a + b); } var a = 5; var b = 3; add(a, b); > node app.js > 8
  • 38. 38 Simple Calculation: 5 + 3 private static void add (int a, int b){ System.out.println(a + b); } public static void main(String[] args){ int a = 5; int b = 3; add(a, b); } > javac app.java > java app > 8 var add = function (a, b) { console.log(a + b); } var a = 5; var b = 3; add(a, b); > node app.js > 8
  • 39. 39 Simple Calculation: 5 + 3 private static void add (int a, int b){ System.out.println(a + b); } public static void main(String[] args){ int a = 5; int b = 3; add(a, b); } > javac app.java > java app > 8 var add = function (a, b) { console.log(a + b); } var a = 5; var b = 3; add(a, b); > node app.js > 8
  • 40. 40 Simple Calculation: 5 + 3 private static void add (int a, int b){ System.out.println(a + b); } public static void main(String[] args){ String a = new String(“5”); int b = 3; add(a, b); } > javac app.java > java app > 8 var add = function (a, b) { console.log(a + b); } var a = ‘5’; var b = 3; add(a, b); > node app.js > 8
  • 41. 41 Simple Calculation: 5 + 3 private static void add (int a, int b){ System.out.println(a + b); } public static void main(String[] args){ String a = new String(“5”); int b = 3; add(a, b); } > javac app.java > java app > 8 var add = function (a, b) { console.log(a + b); } var a = ‘5’; var b = 3; add(a, b); > node app.js > 8
  • 42. 42 Simple Calculation: 5 + 3 private static void add (int a, int b){ System.out.println(a + b); } public static void main(String[] args){ String a = new String(“5”); int b = 3; add(a, b); } > javac app.java Error: incompatible types: String cannot be converted to int add(a, b); ^ var add = function (a, b) { console.log(a + b); } var a = ‘5’; var b = 3; add(a, b); > node app.js > 8
  • 43. 43 Simple Calculation: 5 + 3 private static void add (int a, int b){ System.out.println(a + b); } public static void main(String[] args){ String a = new String(“5”); int b = 3; add(a, b); } > javac app.java Error: incompatible types: String cannot be converted to int add(a, b); ^ var add = function (a, b) { console.log(a + b); } var a = ‘5’; var b = 3; add(a, b); > node app.js > 53
  • 44. 44 JavaScript Calculations > 5 + 3 8 > '5' + 3 '53' > '5' – 3 2 // Weak typing, implicit conversion > '5' – '4' 1 // String minus String = Integer?? > '5' + + '4' 54 // Multiple +'s are ok > 'Hello' + 'World' 'HelloWorld' // Ok, that's expected > 'Hello' + + 'World' 'HelloNaN' // ...but that isn't
  • 45. 45 JavaScript Calculations > 5 + 3 8 > '5' + 3 '53' > '5' – 3 2 // Weak typing, implicit conversion > '5' – '4' 1 // String minus String = Integer?? > '5' + + '4' 54 // Multiple +'s are ok > 'Hello' + 'World' 'HelloWorld' // Ok, that's expected > 'Hello' + + 'World' 'HelloNaN' // ...but that isn't
  • 46. 46 JavaScript Calculations > 5 + 3 8 > '5' + 3 '53' > '5' – 3 2 // String is converted to a number for subtraction > '5' – '4' 1 // String minus String = Integer?? > '5' + + '4' 54 // Multiple +'s are ok > 'Hello' + 'World' 'HelloWorld' // Ok, that's expected > 'Hello' + + 'World' 'HelloNaN' // ...but that isn't
  • 47. 47 JavaScript Calculations > 5 + 3 8 > '5' + 3 '53' > '5' – 3 2 // String is converted to a number for subtraction > '5' – '4' 1 // String minus String = Integer?? > '5' + + '4' 54 // Multiple +'s are ok > 'Hello' + 'World' 'HelloWorld' // Ok, that's expected > 'Hello' + + 'World' 'HelloNaN' // ...but that isn't
  • 48. 48 JavaScript Calculations > 5 + 3 8 > '5' + 3 '53' > '5' – 3 2 // String is converted to a number for subtraction > '5' – '4' 1 // Both Strings converted to number for subtraction > '5' + + '4' 54 // Multiple +'s are ok > 'Hello' + 'World' 'HelloWorld' // Ok, that's expected > 'Hello' + + 'World' 'HelloNaN' // ...but that isn't
  • 49. 49 JavaScript Calculations > 5 + 3 8 > '5' + 3 '53' > '5' – 3 2 // String is converted to a number for subtraction > '5' – '4' 1 // Both Strings converted to number for subtraction > '5' + + '4' 54 // Multiple +'s are ok > 'Hello' + 'World' 'HelloWorld' // Ok, that's expected > 'Hello' + + 'World' 'HelloNaN' // ...but that isn't
  • 50. 50 JavaScript Calculations > 5 + 3 8 > '5' + 3 '53' > '5' – 3 2 // String is converted to a number for subtraction > '5' – '4' 1 // Both Strings converted to number for subtraction > '5' + + '4' 54 // Multiple +'s are ok > 'Hello' + 'World' 'HelloWorld' // Ok, that's expected > 'Hello' + + 'World' 'HelloNaN' // ...but that isn't
  • 51. 51 JavaScript Calculations > 5 + 3 8 > '5' + 3 '53' > '5' – 3 2 // String is converted to a number for subtraction > '5' – '4' 1 // Both Strings converted to number for subtraction > '5' + + '4' 54 // Multiple +'s are ok > 'Hello' + 'World' 'HelloWorld' // Ok, that's expected > 'Hello' + + 'World' 'HelloNaN' // ...but that isn't
  • 52. 52 JavaScript Calculations > 5 + 3 8 > '5' + 3 '53' > '5' – 3 2 // String is converted to a number for subtraction > '5' – '4' 1 // Both Strings converted to number for subtraction > '5' + + '4' 54 // Multiple +'s are ok > 'Hello' + 'World' 'HelloWorld' // Ok, that's expected > 'Hello' + + 'World' 'HelloNaN' // ...but that isn't
  • 53. 53 JavaScript Calculations > 5 + 3 8 > '5' + 3 '53' > '5' – 3 2 // String is converted to a number for subtraction > '5' – '4' 1 // Both Strings converted to number for subtraction > '5' + + '4' 54 // Multiple +'s are ok > 'Hello' + 'World' 'HelloWorld' // Ok, that's expected > 'Hello' + + 'World' 'HelloNaN' // ...but that isn't
  • 54. 54 JavaScript Calculations > 5 + 3 8 > '5' + 3 '53' > '5' – 3 2 // String is converted to a number for subtraction > '5' – '4' 1 // Both Strings converted to number for subtraction > '5' + + '4' 54 // Multiple +'s are ok > 'Hello' + 'World' 'HelloWorld' // Ok, that's expected > 'Hello' + + 'World' 'HelloNaN' // Multiple plus must cause String to number conversion
  • 55. 55 JavaScript Calculations > '5' + - '2' '5-2' // I can just about see that works > var x = 3 undefined > '5' – x + x 5 // Ok, that makes sense > var x = 3 undefined > '5' + x - x 50 // What???
  • 56. 56 JavaScript Calculations > '5' + - '2' '5-2' // I can just about see that works > var x = 3 > '5' – x + x 5 // Ok, that makes sense > var x = 3 undefined > '5' + x - x 50 // What???
  • 57. 57 JavaScript Calculations > '5' + - '2' '5-2' // I can just about see that works > var x = 3 > '5' – x + x 5 // Ok, that makes sense > var x = 3 > '5' + x - x 50 // What???
  • 59. 59 Choosing the Right Language for the Service
  • 60. 60 Choosing the Right Language for the Service
  • 61. 61 Node.js 0 - 4x + 1/3x Node.jsPerformanceRelativetoJava CPU Bound I/O Bound * based on TechEmpower benchmark results Application Performance (higher is better) Choosing the Right Language for the Service
  • 62. 62 Node.js 0 - 4x + 1/3x Node.jsPerformanceRelativetoJava CPU Bound I/O Bound * based on TechEmpower benchmark results Application Performance (higher is better) Choosing the Right Language for the Service Error: incompatible types ClassCastException
  • 63. 63 Monolithic and Micro Services Services are small and targeted to their task Services are organized around capabilities Services are self contained, storing their own data “Do one thing, and do it well”
  • 64. 64 ● Higher performance for I/O ● Easier async programming ● Fullstack/isomorphic development Choosing the Right Language for the Service
  • 65. 65 Choosing the Right Language for the Service ● Higher processing performance ● Type safety for calculations ● Transaction processing frameworks
  • 66. 66 ● Highly performant, scalable rich web applications ● Highly performant, reliable transaction processing ● Self-contained micro-service components Choosing the Right Language for the Service +
  • 69. 69 Operations and Management Admin Analytics LoadBalancer HTTP 3-Tier Web Applications
  • 70. 70 Operations and Management Admin Analytics LoadBalancer HTTP Rich Web Applications
  • 71. 71 Operations and Management Admin Analytics LoadBalancer HTTP Rich Web Applications
  • 72. 72 Operations and Management Admin Analytics LoadBalancer HTTP Rich Web Applications LoadBalancer
  • 73. 73 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy LoadBalancer
  • 74. 74 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy LoadBalancer
  • 75. 75 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy LoadBalancer
  • 76. 76 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy LoadBalancer
  • 77. 77 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy
  • 78. 78 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy
  • 79. 79 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy Services
  • 80. 80 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy Services
  • 81. 81 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy Services
  • 82. 82 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy Services
  • 83. 83 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy Services Client
  • 84. 84 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy Services Client Delivery
  • 85. 85 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy Client Delivery Aggregation Services
  • 87. Get a Java Docker container today ! hub.docker.com ibmjava @stevewallin Come and see us at the booth nodereport appmetrics