enterprise javascript with ibm sdk for node - share.confex.com · using node.js for.. • back-end...
TRANSCRIPT
![Page 1: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/1.jpg)
Insert
Custom
Session
QR if
Desired.
Enterprise JavaScript with
IBM SDK for Node.js
Joran Siu – IBM SDK for Node.js Development
Session 16762
Wed, March 4, 2015: 08:30 AM - 09:30 AM
![Page 2: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/2.jpg)
333
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.
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of other IBM trademarks is available on the web at "Copyright and trademark information" at http://www.ibm.com/legal/copytrade.shtml
Other company, product, or service names may be trademarks or service marks of others.
THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY. WHILE EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED IN THIS PRESENTATION, IT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. IN ADDITION, THIS INFORMATION IS BASED ON IBM’S CURRENT PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM WITHOUT NOTICE. IBM SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION. NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, NOR SHALL HAVE THE EFFECT OF, CREATING ANY WARRANTIES OR REPRESENTATIONS FROM IBM (OR ITS SUPPLIERS OR LICENSORS), OR ALTERING THE TERMS AND CONDITIONS OF ANY AGREEMENT OR LICENSE GOVERNING THE USE OF IBM PRODUCTS OR SOFTWARE.
© Copyright International Business Machines Corporation 2015. All rights reserved.
Trademarks, Copyrights, Disclaimers
![Page 3: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/3.jpg)
JavaScript
• Netscape, 1995
• Scripting language for their Navigator
browser
• Standardized as ECMAScript
(currently v5.1)
• Client-side interaction dynamism to
enhance HTML experience
• Realization only within the browser
client-side...
43/3/2015
![Page 4: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/4.jpg)
5
"Hotwheels - Enzo Ferrari" by Leap Kye is licensed under CC BY 2.0 “Tripping on a Magic Carpet” by wackystuff is licensed under CC BY 2.0
![Page 5: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/5.jpg)
Java != JavaScript
3/3/2015 6
![Page 6: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/6.jpg)
JavaScript – Syntax fun> ‘5’ - 3
2 // weak typing, implicit conversions
7
> ‘5’ + 3
‘53’ // sigh, consistency would be nice
> ‘5’ – ‘4’
1 // string – string = integer huh?
> ‘5’ + + ‘4’
‘54’ // multiple +’s are ok
> ‘Hello’ + ‘World’
‘HelloWorld’ // ah, again things make sense
> ‘Hello’ + + ‘World’
‘HelloNaN’ // we fell off the truck again
![Page 7: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/7.jpg)
JavaScript – Syntax fun> ‘5’ + - ‘2’
‘5-2’ // really confused
8
> var x = 3
undefined
> ‘5’ – x + x
5 // Makes sense
> var x = 3
undefined
> ‘5’ + x - x
50 // WHAT?!
![Page 8: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/8.jpg)
Asynchronous JavaScript and XML (AJAX)
• Since about 2000...
• Dynamic web pages
• JavaScript sending/receiving XML-based data
asynchronously in the background
• Proliferation of JavaScript frameworks
• JavaScript largely interpreted (Rhino, Nashorn, etc.)
3/3/2015 9
![Page 9: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/9.jpg)
What is Node.js?
• Server-side JavaScript platform
developed by Joyent
• Built on Google's V8 JavaScript runtime
• Goal: Efficiently build fast, scalable, 'real-time' network
applications
• Event-oriented, non-blocking, asynchronous I/O framework
3/3/2015 10
![Page 10: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/10.jpg)
Why Node.js?
• It is JavaScript
– Same language on client + server side
– Availability of JavaScript talent
• End-to-End JavaScript stack
– Greater productivity and integration with JSON APIs
• Event-driven, single-threaded model
– Eliminates concurrency and thread-safety worries
• Thousands of concurrent connections with minimal
overhead
3/3/2015 11
![Page 11: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/11.jpg)
Using Node.js for..
• Back-end APIs and services
• Mobile backend as a service (MBaaS)
• “Realtime” applications
• Business analytics
• and more… http://www.nodejs.org/industry
3/3/2015 12
![Page 12: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/12.jpg)
JavaScript Landscape - Gartner
3/3/2015 13
• “JavaScript technologies, in particular Node.js, are now the primary technologies supported by vendors offering emerging mobile back-end-as-a-service (MBaaS) space”
Gartner Reports
• “Treat JavaScript experience and expertise as basic requirements for most developers.”
• “Build up internal developer JavaScript skill sets to support front-end and back-end mobile app development.”
Gartner Recommends
• “Even though they will also be working in other languages, JavaScript will increasingly be part of most projects across a broader range of scenarios”
Gartner Predicts
“By 2017, JavaScript will be the most in-demand language skill in mobile
application development (AD)”
![Page 13: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/13.jpg)
MEAN Stack
MongoDB NoSQL Database
Express.js Web Applications framework
Angular.js Client-side MVC framework
Node.js Server-side JavaScript platform
• Full-stack JavaScript framework
• http://meanjs.org
3/3/2015 14
![Page 14: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/14.jpg)
What comprises of Node.js?
• Aside from Node.js, V8 itself is also used in:
– MongoDB
– therubyracer (Ruby gem)
– libv8 (Ubuntu)
3/3/2015 15
![Page 15: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/15.jpg)
Anatomy of a Node.js application
1. package.json
– Tracks properties, dependencies, version info, commands,
etc.
2. JavaScript source files (i.e. app.js)
• To install and execute:
> npm install
> node app.js
3/3/2015 16
![Page 16: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/16.jpg)
• 3x Growth Rate vs other runtimesFeb 22, 2015
http://www.modulecounts.com
• Lots of packages for use
– 127k and growing
• Command line utility to
interact with public registry
@ npmjs.org
• To install modules, issue:
npm install <module>
npm
173/3/2015
![Page 17: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/17.jpg)
Example: Take Existing Application
• Existing Java EE Online Stock Trading System
18
http://geronimo.apache.org/GMOxDOC20/daytrader.html
WebSphere Application
Server
Business LogicPersistent Layer
DB2
![Page 18: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/18.jpg)
New Portal with Node.js
• Introduce a Real-time Stock Portal (i.e. mobile)
Gateway
Portal
WebSphereApplication
Server
Business LogicPersistent Layer
DB2
![Page 19: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/19.jpg)
• Social Media, Push Notifications, etc.
We want to Twit!
WebSphereApplication
Server
Business LogicPersistent Layer
DB2
Gateway
Portal
![Page 20: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/20.jpg)
On BlueMix
WebSphereApp Server
Business LogicPersistent Layer DB2
z/OS Connect
![Page 21: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/21.jpg)
On z Systems
WebSphereApp Server
Business LogicPersistent Layer DB2
z/OS Connect
Linux
z/OS
![Page 22: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/22.jpg)
Why Node.js on Linux on z Systems?
• Co-location of Node.js server application with data and transactions on z/OS reduces latency of access to z/OS data.
• Availability and scalability of Linux on z Systems as an environment for both Node.js development, test and production
• All traditional advantages of consolidating multiple distributed servers onto Linux on z Systems: Reduce data center footprint, simpler management, energy savings.
• Leverages the trusted environments of z Systems to maximize security and uptime of critical Node.js applications
3/3/2015 23
![Page 23: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/23.jpg)
IBM SDK for Node.js™, Version 1.1
High Performance JavaScript for Linux on z Systems– Highly scalable, event-driven platform with non-blocking I/O– Thousands of concurrent connections with minimal overhead– Unified JavaScript ecosystem for client and server– Up to 29% better performance over Intel on AcmeAir*– One of the fastest growing eco-systems
• +127k modules @ npmjs.org
z Systems Connectivity– Co-locate Node.js applications for reduced latency accessing z/OS
data/services
Security and Dependability– Leverages the trusted environments of z Systems to maximize security
and uptime of critical Node.js applications.
Unified Diagnostics and Monitoring with IBM SDKs for Java®
– Support for IBM SDK for Node.js in IBM Support Assistant (ISA)
Compatible with latest Joyent Node.js v0.10.* releaseshttp://www.ibm.com/developerworks/web/nodesdk
3/3/2015 24
Combine modern web JavaScript + Node.js applications with thebenefits of z Systems hardware, monitoring, and security
*(Controlled measurement environment, results may vary)
![Page 24: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/24.jpg)
IBM z13
• Continued aggressive investment in
Dynamic Runtimes on Z
• 5.0 GHz 8-Core Processor Chip
• Larger Caches, More Memory
– 2x L2 cache over zEC12
– 480 MB L4 cache for data serving
• Simultaneous Multi-Threading (SMT)
– 2x hardware threads/core for improved
throughput
– Available on IFLs
3/3/2015 25
Up to 24% improvement in throughput for
generic JavaScript applications
![Page 25: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/25.jpg)
Getting Node.js on Linux on z Systems
• IBM SDK for Node.js, Version 1.1
– Equivalent to latest Joyent Node.js version 0.10.X
– http://www.ibm.com/developerworks/web/nodesdk
• 31-bit / 64-bit drivers available for Linux on z!
• Fork Us on GitHub @
S390 V8: github.com/andrewlow/v8z
Node: github.com/andrewlow/node
3/3/2015 26
![Page 26: Enterprise JavaScript with IBM SDK for Node - share.confex.com · Using Node.js for.. • Back-end APIs and services • Mobile backend as a service (MBaaS) • “Realtime” applications](https://reader030.vdocument.in/reader030/viewer/2022040712/5e163e3651d94d6f8a25136f/html5/thumbnails/26.jpg)
Thank You!
• Please complete your session
evaluations!
Session 16762:
Enterprise JavaScript with
IBM SDK for Node.js
• www.share.org/Seattle-Eval
Joran Siu
Email: [email protected]
273/3/2015