SlideShare a Scribd company logo
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

More Related Content

What's hot

Serverless, The Middy Way - Workshop
Serverless, The Middy Way - WorkshopServerless, The Middy Way - Workshop
Serverless, The Middy Way - Workshop
Luciano 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 Queue
Richard Leland
 
Learning Dtrace
Learning DtraceLearning Dtrace
Learning Dtrace
JeongHun Byeon
 
Asynchronous programming done right - Node.js
Asynchronous programming done right - Node.jsAsynchronous programming done right - Node.js
Asynchronous programming done right - Node.js
Piotr Pelczar
 
Django Celery
Django Celery Django Celery
Django Celery
Mat Clayton
 
An Introduction to Celery
An Introduction to CeleryAn Introduction to Celery
An Introduction to Celery
Idan Gazit
 
Code generation with javac plugin
Code generation with javac pluginCode generation with javac plugin
Code generation with javac plugin
Oleksandr Radchykov
 
Django Celery - A distributed task queue
Django Celery - A distributed task queueDjango Celery - A distributed task queue
Django Celery - A distributed task queue
Alex 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 boto3
Luciano Mammino
 
DRYing to Monad in Java8
DRYing to Monad in Java8DRYing to Monad in Java8
DRYing to Monad in Java8
Dhaval Dalal
 
Finatra v2
Finatra v2Finatra v2
Finatra v2
Steve Cosenza
 
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
TechWell
 
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
Chris Bailey
 
Mirage For Beginners
Mirage For BeginnersMirage For Beginners
Mirage For Beginners
Wilson 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
 

What's hot (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
 

Viewers also liked

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
John 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 - US
Nils 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
 
5 essential steps flyer
5 essential steps flyer5 essential steps flyer
5 essential steps flyer
Stéphanie Font
 
Presentation resotel legrand RESOTEL
Presentation resotel legrand RESOTELPresentation resotel legrand RESOTEL
Presentation resotel legrand RESOTEL
Achille 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 think
Rachael 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 2015
Melissa Perri
 
หมาใจดำ
หมาใจดำหมาใจดำ
หมาใจดำ
Saran Thaosuwan
 
Daniels Gate Clients Home
Daniels Gate Clients HomeDaniels Gate Clients Home
Daniels Gate Clients Home
cyndifyke
 
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
Digital 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 - VARC
NWEA
 
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
Diaper 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 LinkedIn
LinkedIn
 
Презентация проекта Циклы в нашей жизни
Презентация проекта Циклы в нашей жизниПрезентация проекта Циклы в нашей жизни
Презентация проекта Циклы в нашей жизни
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
 

Viewers also liked (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
 

Similar to 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.js
Chris 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 Enhancement
up2soul
 
Advanced Debugging Using Java Bytecodes
Advanced Debugging Using Java BytecodesAdvanced Debugging Using Java Bytecodes
Advanced Debugging Using Java Bytecodes
Ganesh Samarthyam
 
Ch ch-changes cake php2
Ch ch-changes cake php2Ch ch-changes cake php2
Ch ch-changes cake php2
markstory
 
Price of an Error
Price of an ErrorPrice of an Error
Price of an Error
Andrey Karpov
 
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
Chris Bailey
 
Corephpcomponentpresentation 1211425966721657-8
Corephpcomponentpresentation 1211425966721657-8Corephpcomponentpresentation 1211425966721657-8
Corephpcomponentpresentation 1211425966721657-8PrinceGuru MS
 
Core Php Component Presentation
Core Php Component PresentationCore Php Component Presentation
Core Php Component Presentation
John Coonen
 
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
Michelangelo van Dam
 
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
Wesley 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.5
Wim 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 PHPStorm
Michelangelo 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 2017
Damien 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 파일 정독해보기
경주 전
 

Similar to 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
 
Corephpcomponentpresentation 1211425966721657-8
Corephpcomponentpresentation 1211425966721657-8Corephpcomponentpresentation 1211425966721657-8
Corephpcomponentpresentation 1211425966721657-8
 
Core Php Component Presentation
Core Php Component PresentationCore Php Component Presentation
Core Php Component Presentation
 
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 파일 정독해보기
 

Recently uploaded

Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
varshanayak241
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
KrzysztofKkol1
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Hivelance Technology
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
Sharepoint Designs
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
Jelle | Nordend
 

Recently uploaded (20)

Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 

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