Emerging Web App Architectures Using Java and Node.js
IMPORTANT info regarding IBM speaker guidelines and disclaimers • If your presentation has forward looking content, it is mandatory that you put the forward disclaimer as slide 2 in your presentation (this is the “Please Note” slide, third slide down in this template). • All presentations, whether they have future content or not, must include the mandatory “Notices and Disclaimers” – slides 8 and 9 in the template. Insert these slides just before the “Thank You” slide in your deck. • Please refer to the FAQ document in the Speaker Kit regarding additional legal guidance for use of photos, logos, customer references and analyst information. • It is recommended to have your material reviewed by Legal if you have any concerns regarding your content. • Please submit your final presentation, using the instructions in the online Speaker Kit, by February 5th, 2016. Post your final file in native format using the following naming convention: session code.ppt (For example, 1576.ppt) • Disclosures regarding forward guidance is embedded in the tool and also available through this link: • https://w3-03.ibm.com/finance/finsubp.nsf/WebPages/N01FF08SoftwareRevenueRecognitionGuidelinesRelatedtoProductDisclosures • Please remove these instructions before finalizing your presentation. 2
Please Note: 3 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information regarding potential future products is intended to outline our general product direction and it should not be relied on in making a purchasing decision. • The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any material, code or functionality. Information about potential future products may not be incorporated into any contract. • The development, release, and timing of any future features or functionality described for our products remains at our sole discretion. • Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user’s job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here.
© 2015 IBM Corporation4 1 STSM, IBM Runtime Development @Chris__Bailey @seabaylea
5 + Node.js and Java
6 Developer Productivity
7 API Package Support ● Node.js growth: ● 371 packages/day ● Java growth: ● 92 packages/day
8 Open Source Projects
9 Open Source Projects
10 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
11 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….
12 ● 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
13 ● 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
14 Node.js event based programming var http = require('http'); var server = http.createServer(); server.listen(8080); server.on('request', function(request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.write("Hello World!n"); response.end(); }); server.on('connection', function(socket) {}); server.on('close', function() {}); server.on('connect', function(socket) {}); server.on('upgrade', function(request, socket, head) {}); server.on('clientError', function(exception, socket) {});
15 0 500 1000 1500 2000 2500 3000 regex-dna n-body binary-trees	spectral-norm	fannkuch-redux reverse-com plim ent k-nucleo>de fasta Volume	of	Code Node.js Java ● Average 45% less code required for Node.js implementation Code required to implement benchmarks
16 “Fullstack” Development
17 ● The web has moved from Web Sites to Web Applications 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.... 18 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
19 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
20 Server Side Rendering ● Pre-Initialisation of the client UI on the server: ● Improves time for the first 
 elements appearing in the UI ● Has additional benefits: ● Search Engine Indexing ● Easier code maintenance
21 Variable Types
22 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
23 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
24 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
25 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
26 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
27 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
28 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
29 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
30 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
31 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
32 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
33 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
34 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
35 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
36 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
37 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
38 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
39 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
40 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
41 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
42 JavaScript Calculations > '5' + - '5' '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???
43 JavaScript Calculations > '5' + - '5' '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???
44 JavaScript Calculations > '5' + - '5' '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???
45 Performance
● JSON serialization of a newly instantiated object ● Maps - Key of message - Value of Hello, World! ● Example response: 46 Results from TechEmpower.com Round 9 tests (2014-05-01) JSON Serialisation
● JSON serialization of a newly instantiated object ● Maps - Key of message - Value of Hello, World! ● Example response: 47 Results from TechEmpower.com Round 9 tests (2014-05-01) JSON Serialisation Java JavaScript
48 -100 -80 -60 -40 -20 0 20 40 -75 Node.js Performance (Compared to Java) JSON Serialization %ageofJavaPerformance Node.js Web App Performance vs. Java
● Fetches single row from simple database table ● Row serialized as JSON ● Example response: 49 Results from TechEmpower.com Round 9 tests (2014-05-01) Single Query
● Fetches single row from simple database table ● Row serialized as JSON ● Example response: 50 Results from TechEmpower.com Round 9 tests (2014-05-01) Single Query Java JavaScript
51 -100 -80 -60 -40 -20 0 20 40 -75 Node.js Performance (Compared to Java) JSON Serialization %ageofJavaPerformance Node.js Web App Performance vs. Java
-100 -80 -60 -40 -20 0 20 40 -60.5 Node.js Performance (Compared to Java) JSON Serialization Single Query %ageofJavaPerformance 52 Node.js Web App Performance vs. Java
● Fetches multiple rows from a simple database table ● Rows serialized as JSON ● Example response: 53 Results from TechEmpower.com Round 9 tests (2014-05-01) Multiple Queries
● Fetches multiple rows from a simple database table ● Rows serialized as JSON ● Example response: 54 Results from TechEmpower.com Round 9 tests (2014-05-01) Multiple Queries Java JavaScript
-100 -80 -60 -40 -20 0 20 40 -60.5 Node.js Performance (Compared to Java) JSON Serialization Single Query %ageofJavaPerformance 55 Node.js Web App Performance vs. Java
56 Node.js Web App Performance vs. Java -100 -80 -60 -40 -20 0 20 40 -18 Node.js Performance (Compared to Java) JSON Serialization Single Query Multiple Queries %ageofJavaPerformance
● Fetches multiple rows from a table ● Converts rows to objects and modifies one attribute of each object ● Updates each associated row and serializes as JSON ● Example Response: 57 Results from TechEmpower.com Round 9 tests (2014-05-01) Data Updates
● Fetches multiple rows from a table ● Converts rows to objects and modifies one attribute of each object ● Updates each associated row and serializes as JSON ● Example Response: 58 Results from TechEmpower.com Round 9 tests (2014-05-01) Data Updates Java JavaScript
59 Node.js Web App Performance vs. Java -100 -80 -60 -40 -20 0 20 40 -18 Node.js Performance (Compared to Java) JSON Serialization Single Query Multiple Queries %ageofJavaPerformance
60 Node.js Web App Performance vs. Java -100 -80 -60 -40 -20 0 20 40 28 Node.js Performance (Compared to Java) JSON Serialization Single Query Multiple Queries Data Updates %ageofJavaPerformance
61 Node.js Web App Performance vs. Java -100 -80 -60 -40 -20 0 20 40 28 Node.js Performance (Compared to Java) JSON Serialization Single Query Multiple Queries Data Updates %ageofJavaPerformance More Computation More I/O
6217*IBM created open sourced benchmark, being considered for endorsement by Node Foundation Node.js Web App Performance • Results from Acme Air*: − Flight booking benchmark that includes large I/O component − https://github.com/acmeair/acmeair
63 ● JIT Compilers thrive on certainty ● Allows functions to be implemented as efficiently as possible
 ● Dynamic typing forces the JIT to do more work: ● Variables could be function, or data ● Variables must be tested to determine how to handle them ● Variable types can change over time Variable Typing and Just-In-Time (JIT) Compilation
64 Just-In-Time (JIT) Compilation: The ‘+’ operator int add(int a, int b) { return (a + b); }
65 Just-In-Time (JIT) Compilation: The ‘+’ operator int add(int a, int b) { return (a + b); } Add Instruction
66 Just-In-Time (JIT) Compilation: The ‘+’ operator int add(int a, int b) { return (a + b); } Add Instruction Return Result
67 Just-In-Time (JIT) Compilation: The ‘+’ operator var add = function (a, b) { return (a + b); }
68 Just-In-Time (JIT) Compilation: The ‘+’ operator var add = function (a, b) { return (a + b); } Check type of A
69 Just-In-Time (JIT) Compilation: The ‘+’ operator var add = function (a, b) { return (a + b); } Check type of A String Number
70 Just-In-Time (JIT) Compilation: The ‘+’ operator var add = function (a, b) { return (a + b); } Check type of A String NumberString Check type of B Number
71 Just-In-Time (JIT) Compilation: The ‘+’ operator var add = function (a, b) { return (a + b); } Check type of A String NumberString Check type of B Number Concatenate
72 Just-In-Time (JIT) Compilation: The ‘+’ operator var add = function (a, b) { return (a + b); } Check type of A String NumberString Check type of B Number Concatenate Concatenate
73 Just-In-Time (JIT) Compilation: The ‘+’ operator var add = function (a, b) { return (a + b); } Check type of A String NumberString Check type of B Number Concatenate Concatenate String Check type of B Number
74 Just-In-Time (JIT) Compilation: The ‘+’ operator var add = function (a, b) { return (a + b); } Check type of A String NumberString Check type of B Number Concatenate Concatenate String Check type of B Number Concatenate
75 Just-In-Time (JIT) Compilation: The ‘+’ operator var add = function (a, b) { return (a + b); } Check type of A String NumberString Check type of B Number Concatenate Concatenate String Check type of B Number Concatenate Floating
 Point or
 Normal NormalFloat
76 Just-In-Time (JIT) Compilation: The ‘+’ operator var add = function (a, b) { return (a + b); } Check type of A String NumberString Check type of B Number Concatenate Concatenate String Check type of B Number Concatenate Floating
 Point or
 Normal NormalFloat Add Instruction
77 Just-In-Time (JIT) Compilation: The ‘+’ operator var add = function (a, b) { return (a + b); } Check type of A String NumberString Check type of B Number Concatenate Concatenate String Check type of B Number Concatenate Floating
 Point or
 Normal NormalFloat Add InstructionFloat Calculation
78 Dynamically vs. Statically Typed Languages -70 -60 -50 -40 -30 -20 -10 0 Dynamic vs Statically Typed Language Performance JSON Single Multi Updates Bestdynamiccomparedtobeststaticasbaseline ● Best statically typed language much better than best dynamic
79 Language Selection
80 “Do one thing, and do it well” ● Services are small and targeted to their task ● Services are organized around capabilities ● Services are self contained, storing their own data Microservices Paradigm
81 Choosing the Right Language for the Service
82 Choosing the Right Language for the Service 0 500 1000 1500 2000 2500 3000 regex-dna n-body binary-trees	spectral-norm	fannkuch-redux reverse-com plim ent k-nucleo>de fasta Volume	of	Code Node.js Java
83 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 0 500 1000 1500 2000 2500 3000 regex-dna n-body binary-trees	spectral-norm	fannkuch-redux reverse-com plim ent k-nucleo>de fasta Volume	of	Code Node.js Java
84 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 0 500 1000 1500 2000 2500 3000 regex-dna n-body binary-trees	spectral-norm	fannkuch-redux reverse-com plim ent k-nucleo>de fasta Volume	of	Code Node.js Java Error: incompatible types ClassCastException
85 ● Higher performance for I/O ● Easier async programming ● Fullstack/isomorphic development Choosing the Right Language for the Service
86 Choosing the Right Language for the Service ● Higher processing performance ● Type safety for calculations ● Rich processing frameworks
87 ● Highly performant, scalable rich web applications ● Highly performant, reliable transaction processing ● Self-contained micro-service components Choosing the Right Language for the Service +
88 Emerging
 Architectures
89 Rich Web Applications
90 Rich Web Applications
91 Rich Web Applications HTTP
92 Rich Web Applications HTTP LoadBalancer
93 Rich Web Applications HTTP LoadBalancer
94 Operations and Management Admin Analytics LoadBalancer HTTP Rich Web Applications
95 Operations and Management Admin Analytics LoadBalancer HTTP Rich Web Applications
96 Operations and Management Admin Analytics LoadBalancer HTTP Rich Web Applications
97 Operations and Management Admin Analytics LoadBalancer HTTP Rich Web Applications LoadBalancer
98 MicroServices and API Economy
99 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy LoadBalancer
100 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy LoadBalancer
101 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy LoadBalancer
102 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy LoadBalancer
103 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy
104 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy
105 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy Services
106 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy Services
107 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy Services
108 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy Services
109 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy Services Client
110 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy Services Client Delivery
111 Operations and Management Admin Analytics LoadBalancer HTTP MicroServices and API Economy Client Delivery Aggregation Services
112 Questions?
Notices and Disclaimers 113 Copyright © 2016 by International Business Machines Corporation (IBM). No part of this document may be reproduced or transmitted in any form without written permission from IBM. U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM. Information in these presentations (including information relating to products that have not yet been announced by IBM) has been reviewed for accuracy as of the date of initial publication and could include unintentional technical or typographical errors. IBM shall have no responsibility to update this information. THIS DOCUMENT IS DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL IBM BE LIABLE FOR ANY DAMAGE ARISING FROM THE USE OF THIS INFORMATION, INCLUDING BUT NOT LIMITED TO, LOSS OF DATA, BUSINESS INTERRUPTION, LOSS OF PROFIT OR LOSS OF OPPORTUNITY. IBM products and services are warranted according to the terms and conditions of the agreements under which they are provided. Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawal without notice. Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual performance, cost, savings or other results in other operating environments may vary. References in this document to IBM products, programs, or services does not imply that IBM intends to make such products, programs or services available in all countries in which IBM operates or does business. Workshops, sessions and associated materials may have been prepared by independent session speakers, and do not necessarily reflect the views of IBM. All materials and discussions are provided for informational purposes only, and are neither intended to, nor shall constitute legal or other guidance or advice to any individual participant or their specific situation. It is the customer’s responsibility to insure its own compliance with legal requirements and to obtain advice of competent legal counsel as to the identification and interpretation of any relevant laws and regulatory requirements that may affect the customer’s business and any actions the customer may need to take to comply with such laws. IBM does not provide legal advice or represent or warrant that its services or products will ensure that the customer is in compliance with any law
Notices and Disclaimers Con’t. 114 Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products in connection with this publication and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. IBM does not warrant the quality of any third-party products, or the ability of any such third-party products to interoperate with IBM’s products. IBM EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. The provision of the information contained h erein is not intended to, and does not, grant any right or license under any IBM patents, copyrights, trademarks or other intellectual property right. IBM, the IBM logo, ibm.com, Aspera®, Bluemix, Blueworks Live, CICS, Clearcase, Cognos®, DOORS®, Emptoris®, Enterprise Document Management System™, FASP®, FileNet®, Global Business Services ®, Global Technology Services ®, IBM ExperienceOne™, IBM SmartCloud®, IBM Social Business®, Information on Demand, ILOG, Maximo®, MQIntegrator®, MQSeries®, Netcool®, OMEGAMON, OpenPower, PureAnalytics™, PureApplication®, pureCluster™, PureCoverage®, PureData®, PureExperience®, PureFlex®, pureQuery®, pureScale®, PureSystems®, QRadar®, Rational®, Rhapsody®, Smarter Commerce®, SoDA, SPSS, Sterling Commerce®, StoredIQ, Tealeaf®, Tivoli®, Trusteer®, Unica®, urban{code}®, Watson, WebSphere®, Worklight®, X-Force® and System z® Z/OS, are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at: www.ibm.com/legal/copytrade.shtml.
Thank You Your Feedback is Important! Access the InterConnect 2016 Conference Attendee Portal to complete your session surveys from your smartphone, laptop or conference kiosk.

InterConnect2016: WebApp Architectures with Java and Node.js

  • 1.
    Emerging Web AppArchitectures Using Java and Node.js
  • 2.
    IMPORTANT info regardingIBM speaker guidelines and disclaimers • If your presentation has forward looking content, it is mandatory that you put the forward disclaimer as slide 2 in your presentation (this is the “Please Note” slide, third slide down in this template). • All presentations, whether they have future content or not, must include the mandatory “Notices and Disclaimers” – slides 8 and 9 in the template. Insert these slides just before the “Thank You” slide in your deck. • Please refer to the FAQ document in the Speaker Kit regarding additional legal guidance for use of photos, logos, customer references and analyst information. • It is recommended to have your material reviewed by Legal if you have any concerns regarding your content. • Please submit your final presentation, using the instructions in the online Speaker Kit, by February 5th, 2016. Post your final file in native format using the following naming convention: session code.ppt (For example, 1576.ppt) • Disclosures regarding forward guidance is embedded in the tool and also available through this link: • https://w3-03.ibm.com/finance/finsubp.nsf/WebPages/N01FF08SoftwareRevenueRecognitionGuidelinesRelatedtoProductDisclosures • Please remove these instructions before finalizing your presentation. 2
  • 3.
    Please Note: 3 • IBM’sstatements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information regarding potential future products is intended to outline our general product direction and it should not be relied on in making a purchasing decision. • The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any material, code or functionality. Information about potential future products may not be incorporated into any contract. • The development, release, and timing of any future features or functionality described for our products remains at our sole discretion. • Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user’s job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here.
  • 4.
    © 2015 IBMCorporation4 1 STSM, IBM Runtime Development @Chris__Bailey @seabaylea
  • 5.
  • 6.
  • 7.
    7 API Package Support ●Node.js growth: ● 371 packages/day ● Java growth: ● 92 packages/day
  • 8.
  • 9.
  • 10.
    10 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
  • 11.
    11 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….
  • 12.
    12 ● 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
  • 13.
    13 ● One threadmultiplexes 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
  • 14.
    14 Node.js event basedprogramming var http = require('http'); var server = http.createServer(); server.listen(8080); server.on('request', function(request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.write("Hello World!n"); response.end(); }); server.on('connection', function(socket) {}); server.on('close', function() {}); server.on('connect', function(socket) {}); server.on('upgrade', function(request, socket, head) {}); server.on('clientError', function(exception, socket) {});
  • 15.
  • 16.
  • 17.
    17 ● The webhas moved from Web Sites to Web Applications From Web Sites to Web Apps
  • 18.
    ● JavaScript isubiquitous in the browser - Supported in every browser - Integration with HTML and CSS ● JavaScript is not affected by negative publicity.... 18 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
  • 19.
    19 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
  • 20.
    20 Server Side Rendering ●Pre-Initialisation of the client UI on the server: ● Improves time for the first 
 elements appearing in the UI ● Has additional benefits: ● Search Engine Indexing ● Easier code maintenance
  • 21.
  • 22.
    22 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
  • 23.
    23 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
  • 24.
    24 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
  • 25.
    25 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
  • 26.
    26 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
  • 27.
    27 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
  • 28.
    28 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
  • 29.
    29 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
  • 30.
    30 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
  • 31.
    31 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
  • 32.
    32 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
  • 33.
    33 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
  • 34.
    34 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
  • 35.
    35 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
  • 36.
    36 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
  • 37.
    37 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
  • 38.
    38 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
  • 39.
    39 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
  • 40.
    40 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
  • 41.
    41 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
  • 42.
    42 JavaScript Calculations > '5'+ - '5' '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???
  • 43.
    43 JavaScript Calculations > '5'+ - '5' '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???
  • 44.
    44 JavaScript Calculations > '5'+ - '5' '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???
  • 45.
  • 46.
    ● JSON serializationof a newly instantiated object ● Maps - Key of message - Value of Hello, World! ● Example response: 46 Results from TechEmpower.com Round 9 tests (2014-05-01) JSON Serialisation
  • 47.
    ● JSON serializationof a newly instantiated object ● Maps - Key of message - Value of Hello, World! ● Example response: 47 Results from TechEmpower.com Round 9 tests (2014-05-01) JSON Serialisation Java JavaScript
  • 48.
    48 -100 -80 -60 -40 -20 0 20 40 -75 Node.js Performance (Compared toJava) JSON Serialization %ageofJavaPerformance Node.js Web App Performance vs. Java
  • 49.
    ● Fetches singlerow from simple database table ● Row serialized as JSON ● Example response: 49 Results from TechEmpower.com Round 9 tests (2014-05-01) Single Query
  • 50.
    ● Fetches singlerow from simple database table ● Row serialized as JSON ● Example response: 50 Results from TechEmpower.com Round 9 tests (2014-05-01) Single Query Java JavaScript
  • 51.
    51 -100 -80 -60 -40 -20 0 20 40 -75 Node.js Performance (Compared toJava) JSON Serialization %ageofJavaPerformance Node.js Web App Performance vs. Java
  • 52.
    -100 -80 -60 -40 -20 0 20 40 -60.5 Node.js Performance (Compared toJava) JSON Serialization Single Query %ageofJavaPerformance 52 Node.js Web App Performance vs. Java
  • 53.
    ● Fetches multiplerows from a simple database table ● Rows serialized as JSON ● Example response: 53 Results from TechEmpower.com Round 9 tests (2014-05-01) Multiple Queries
  • 54.
    ● Fetches multiplerows from a simple database table ● Rows serialized as JSON ● Example response: 54 Results from TechEmpower.com Round 9 tests (2014-05-01) Multiple Queries Java JavaScript
  • 55.
    -100 -80 -60 -40 -20 0 20 40 -60.5 Node.js Performance (Compared toJava) JSON Serialization Single Query %ageofJavaPerformance 55 Node.js Web App Performance vs. Java
  • 56.
    56 Node.js Web AppPerformance vs. Java -100 -80 -60 -40 -20 0 20 40 -18 Node.js Performance (Compared to Java) JSON Serialization Single Query Multiple Queries %ageofJavaPerformance
  • 57.
    ● Fetches multiplerows from a table ● Converts rows to objects and modifies one attribute of each object ● Updates each associated row and serializes as JSON ● Example Response: 57 Results from TechEmpower.com Round 9 tests (2014-05-01) Data Updates
  • 58.
    ● Fetches multiplerows from a table ● Converts rows to objects and modifies one attribute of each object ● Updates each associated row and serializes as JSON ● Example Response: 58 Results from TechEmpower.com Round 9 tests (2014-05-01) Data Updates Java JavaScript
  • 59.
    59 Node.js Web AppPerformance vs. Java -100 -80 -60 -40 -20 0 20 40 -18 Node.js Performance (Compared to Java) JSON Serialization Single Query Multiple Queries %ageofJavaPerformance
  • 60.
    60 Node.js Web AppPerformance vs. Java -100 -80 -60 -40 -20 0 20 40 28 Node.js Performance (Compared to Java) JSON Serialization Single Query Multiple Queries Data Updates %ageofJavaPerformance
  • 61.
    61 Node.js Web AppPerformance vs. Java -100 -80 -60 -40 -20 0 20 40 28 Node.js Performance (Compared to Java) JSON Serialization Single Query Multiple Queries Data Updates %ageofJavaPerformance More Computation More I/O
  • 62.
    6217*IBM created opensourced benchmark, being considered for endorsement by Node Foundation Node.js Web App Performance • Results from Acme Air*: − Flight booking benchmark that includes large I/O component − https://github.com/acmeair/acmeair
  • 63.
    63 ● JIT Compilersthrive on certainty ● Allows functions to be implemented as efficiently as possible
 ● Dynamic typing forces the JIT to do more work: ● Variables could be function, or data ● Variables must be tested to determine how to handle them ● Variable types can change over time Variable Typing and Just-In-Time (JIT) Compilation
  • 64.
    64 Just-In-Time (JIT) Compilation:The ‘+’ operator int add(int a, int b) { return (a + b); }
  • 65.
    65 Just-In-Time (JIT) Compilation:The ‘+’ operator int add(int a, int b) { return (a + b); } Add Instruction
  • 66.
    66 Just-In-Time (JIT) Compilation:The ‘+’ operator int add(int a, int b) { return (a + b); } Add Instruction Return Result
  • 67.
    67 Just-In-Time (JIT) Compilation:The ‘+’ operator var add = function (a, b) { return (a + b); }
  • 68.
    68 Just-In-Time (JIT) Compilation:The ‘+’ operator var add = function (a, b) { return (a + b); } Check type of A
  • 69.
    69 Just-In-Time (JIT) Compilation:The ‘+’ operator var add = function (a, b) { return (a + b); } Check type of A String Number
  • 70.
    70 Just-In-Time (JIT) Compilation:The ‘+’ operator var add = function (a, b) { return (a + b); } Check type of A String NumberString Check type of B Number
  • 71.
    71 Just-In-Time (JIT) Compilation:The ‘+’ operator var add = function (a, b) { return (a + b); } Check type of A String NumberString Check type of B Number Concatenate
  • 72.
    72 Just-In-Time (JIT) Compilation:The ‘+’ operator var add = function (a, b) { return (a + b); } Check type of A String NumberString Check type of B Number Concatenate Concatenate
  • 73.
    73 Just-In-Time (JIT) Compilation:The ‘+’ operator var add = function (a, b) { return (a + b); } Check type of A String NumberString Check type of B Number Concatenate Concatenate String Check type of B Number
  • 74.
    74 Just-In-Time (JIT) Compilation:The ‘+’ operator var add = function (a, b) { return (a + b); } Check type of A String NumberString Check type of B Number Concatenate Concatenate String Check type of B Number Concatenate
  • 75.
    75 Just-In-Time (JIT) Compilation:The ‘+’ operator var add = function (a, b) { return (a + b); } Check type of A String NumberString Check type of B Number Concatenate Concatenate String Check type of B Number Concatenate Floating
 Point or
 Normal NormalFloat
  • 76.
    76 Just-In-Time (JIT) Compilation:The ‘+’ operator var add = function (a, b) { return (a + b); } Check type of A String NumberString Check type of B Number Concatenate Concatenate String Check type of B Number Concatenate Floating
 Point or
 Normal NormalFloat Add Instruction
  • 77.
    77 Just-In-Time (JIT) Compilation:The ‘+’ operator var add = function (a, b) { return (a + b); } Check type of A String NumberString Check type of B Number Concatenate Concatenate String Check type of B Number Concatenate Floating
 Point or
 Normal NormalFloat Add InstructionFloat Calculation
  • 78.
    78 Dynamically vs. StaticallyTyped Languages -70 -60 -50 -40 -30 -20 -10 0 Dynamic vs Statically Typed Language Performance JSON Single Multi Updates Bestdynamiccomparedtobeststaticasbaseline ● Best statically typed language much better than best dynamic
  • 79.
  • 80.
    80 “Do one thing,and do it well” ● Services are small and targeted to their task ● Services are organized around capabilities ● Services are self contained, storing their own data Microservices Paradigm
  • 81.
    81 Choosing the RightLanguage for the Service
  • 82.
    82 Choosing the RightLanguage for the Service 0 500 1000 1500 2000 2500 3000 regex-dna n-body binary-trees spectral-norm fannkuch-redux reverse-com plim ent k-nucleo>de fasta Volume of Code Node.js Java
  • 83.
    83 Node.js 0 - 4x + 1/3x Node.jsPerformanceRelativetoJava CPUBound I/O Bound * based on TechEmpower benchmark results Application Performance (higher is better) Choosing the Right Language for the Service 0 500 1000 1500 2000 2500 3000 regex-dna n-body binary-trees spectral-norm fannkuch-redux reverse-com plim ent k-nucleo>de fasta Volume of Code Node.js Java
  • 84.
    84 Node.js 0 - 4x + 1/3x Node.jsPerformanceRelativetoJava CPUBound I/O Bound * based on TechEmpower benchmark results Application Performance (higher is better) Choosing the Right Language for the Service 0 500 1000 1500 2000 2500 3000 regex-dna n-body binary-trees spectral-norm fannkuch-redux reverse-com plim ent k-nucleo>de fasta Volume of Code Node.js Java Error: incompatible types ClassCastException
  • 85.
    85 ● Higher performancefor I/O ● Easier async programming ● Fullstack/isomorphic development Choosing the Right Language for the Service
  • 86.
    86 Choosing the RightLanguage for the Service ● Higher processing performance ● Type safety for calculations ● Rich processing frameworks
  • 87.
    87 ● Highly performant,scalable rich web applications ● Highly performant, reliable transaction processing ● Self-contained micro-service components Choosing the Right Language for the Service +
  • 88.
  • 89.
  • 90.
  • 91.
  • 92.
  • 93.
  • 94.
    94 Operations and Management AdminAnalytics LoadBalancer HTTP Rich Web Applications
  • 95.
    95 Operations and Management AdminAnalytics LoadBalancer HTTP Rich Web Applications
  • 96.
    96 Operations and Management AdminAnalytics LoadBalancer HTTP Rich Web Applications
  • 97.
    97 Operations and Management AdminAnalytics LoadBalancer HTTP Rich Web Applications LoadBalancer
  • 98.
  • 99.
    99 Operations and Management AdminAnalytics LoadBalancer HTTP MicroServices and API Economy LoadBalancer
  • 100.
    100 Operations and Management AdminAnalytics LoadBalancer HTTP MicroServices and API Economy LoadBalancer
  • 101.
    101 Operations and Management AdminAnalytics LoadBalancer HTTP MicroServices and API Economy LoadBalancer
  • 102.
    102 Operations and Management AdminAnalytics LoadBalancer HTTP MicroServices and API Economy LoadBalancer
  • 103.
    103 Operations and Management AdminAnalytics LoadBalancer HTTP MicroServices and API Economy
  • 104.
    104 Operations and Management AdminAnalytics LoadBalancer HTTP MicroServices and API Economy
  • 105.
    105 Operations and Management AdminAnalytics LoadBalancer HTTP MicroServices and API Economy Services
  • 106.
    106 Operations and Management AdminAnalytics LoadBalancer HTTP MicroServices and API Economy Services
  • 107.
    107 Operations and Management AdminAnalytics LoadBalancer HTTP MicroServices and API Economy Services
  • 108.
    108 Operations and Management AdminAnalytics LoadBalancer HTTP MicroServices and API Economy Services
  • 109.
    109 Operations and Management AdminAnalytics LoadBalancer HTTP MicroServices and API Economy Services Client
  • 110.
    110 Operations and Management AdminAnalytics LoadBalancer HTTP MicroServices and API Economy Services Client Delivery
  • 111.
    111 Operations and Management AdminAnalytics LoadBalancer HTTP MicroServices and API Economy Client Delivery Aggregation Services
  • 112.
  • 113.
    Notices and Disclaimers 113 Copyright© 2016 by International Business Machines Corporation (IBM). No part of this document may be reproduced or transmitted in any form without written permission from IBM. U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM. Information in these presentations (including information relating to products that have not yet been announced by IBM) has been reviewed for accuracy as of the date of initial publication and could include unintentional technical or typographical errors. IBM shall have no responsibility to update this information. THIS DOCUMENT IS DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL IBM BE LIABLE FOR ANY DAMAGE ARISING FROM THE USE OF THIS INFORMATION, INCLUDING BUT NOT LIMITED TO, LOSS OF DATA, BUSINESS INTERRUPTION, LOSS OF PROFIT OR LOSS OF OPPORTUNITY. IBM products and services are warranted according to the terms and conditions of the agreements under which they are provided. Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawal without notice. Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual performance, cost, savings or other results in other operating environments may vary. References in this document to IBM products, programs, or services does not imply that IBM intends to make such products, programs or services available in all countries in which IBM operates or does business. Workshops, sessions and associated materials may have been prepared by independent session speakers, and do not necessarily reflect the views of IBM. All materials and discussions are provided for informational purposes only, and are neither intended to, nor shall constitute legal or other guidance or advice to any individual participant or their specific situation. It is the customer’s responsibility to insure its own compliance with legal requirements and to obtain advice of competent legal counsel as to the identification and interpretation of any relevant laws and regulatory requirements that may affect the customer’s business and any actions the customer may need to take to comply with such laws. IBM does not provide legal advice or represent or warrant that its services or products will ensure that the customer is in compliance with any law
  • 114.
    Notices and DisclaimersCon’t. 114 Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products in connection with this publication and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. IBM does not warrant the quality of any third-party products, or the ability of any such third-party products to interoperate with IBM’s products. IBM EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. The provision of the information contained h erein is not intended to, and does not, grant any right or license under any IBM patents, copyrights, trademarks or other intellectual property right. IBM, the IBM logo, ibm.com, Aspera®, Bluemix, Blueworks Live, CICS, Clearcase, Cognos®, DOORS®, Emptoris®, Enterprise Document Management System™, FASP®, FileNet®, Global Business Services ®, Global Technology Services ®, IBM ExperienceOne™, IBM SmartCloud®, IBM Social Business®, Information on Demand, ILOG, Maximo®, MQIntegrator®, MQSeries®, Netcool®, OMEGAMON, OpenPower, PureAnalytics™, PureApplication®, pureCluster™, PureCoverage®, PureData®, PureExperience®, PureFlex®, pureQuery®, pureScale®, PureSystems®, QRadar®, Rational®, Rhapsody®, Smarter Commerce®, SoDA, SPSS, Sterling Commerce®, StoredIQ, Tealeaf®, Tivoli®, Trusteer®, Unica®, urban{code}®, Watson, WebSphere®, Worklight®, X-Force® and System z® Z/OS, are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at: www.ibm.com/legal/copytrade.shtml.
  • 115.
    Thank You Your Feedbackis Important! Access the InterConnect 2016 Conference Attendee Portal to complete your session surveys from your smartphone, laptop or conference kiosk.