Download presentation
Presentation is loading. Please wait.
1
Node.js talking to PROGRESS
PUG Challenge Americas 2013 Tuesday, 18 September 2018 Node.js talking to PROGRESS
2
Node.js talking to PROGRESS
Introduction Node.js PROGRESS connections Tuesday, 18 September 2018 Node.js talking to PROGRESS
3
Node.js talking to PROGRESS
Introduction Robert Prediger 14 years experience in web development 19 years experience in PROGRESS Tuesday, 18 September 2018 Node.js talking to PROGRESS
4
Node.js talking to PROGRESS
Web Backend Progress Client Javascript Middleware Progress Javascript Tuesday, 18 September 2018 Node.js talking to PROGRESS
5
Node.js talking to PROGRESS
Javascript is everywhere: Browsers Webservers Databases Mobile Devices Adobe, Google, Apple and Microsoft are spending a huge amount of money! JavaScript seems to be the worlds most used programming language. Tuesday, 18 September 2018 Node.js talking to PROGRESS
6
Node.js talking to PROGRESS
Few facts about Javascript: 1995 Developed by Brendan Eich The Best of Lisp The Worst C / Java syntax (Sun wanted this crap) The prototypical inheritance from Self In 12 days 1999 Microsoft invented XMLHTTP 2008 Release of Google Chrome and V8 2009 Ryan Dahl invented Node.js Tuesday, 18 September 2018 Node.js talking to PROGRESS
7
Node.js talking to PROGRESS
Typescript interface Person { firstname: string; lastname: string; } class Student { fullname : string; constructor( person : Person ) { this.fullname = person.firstname + " " + person.lastname; var user = new Student( { firstname: "Jane", lastname: "User" } ); Tuesday, 18 September 2018 Node.js talking to PROGRESS
8
Node.js talking to PROGRESS
What is Node.js Server side Javascript Built on Chrome V8 Engine Event-driven, non blocking I/O model What is it for? Easily building fast, scalable network applications Perfect for data-intensive real-time application that run across distributed devices Tuesday, 18 September 2018 Node.js talking to PROGRESS
9
Blocking I/O Node.js database, filesystem – disk
S3, external APIs – networking Tuesday, 18 September 2018 Node.js talking to PROGRESS
10
Node.js talking to PROGRESS
Tuesday, 18 September 2018 Node.js talking to PROGRESS
11
Node.js talking to PROGRESS
F-18 Hornet Max speed of 1,190 mph RAM Banana slug Max speed of mph Hard disk Tuesday, 18 September 2018 Node.js talking to PROGRESS
12
Node.js talking to PROGRESS
Typical Request F = Fast F-18 Hornet S = Slow Banana Slug FSSSSSSSSSSSSSF Tuesday, 18 September 2018 Node.js talking to PROGRESS
13
Node.js talking to PROGRESS
Webserver Messenger WebSpeed Agent Request Thread CGI Tuesday, 18 September 2018 Node.js talking to PROGRESS
14
Node.js talking to PROGRESS
DEFINE QUERY qCust FOR Customer. OPEN QUERY qCust FOR EACH Customer. GET FIRST qCust. <next statement> Tuesday, 18 September 2018 Node.js talking to PROGRESS
15
Node.js talking to PROGRESS
Request with WebSpeed: Finished request Start 2nd request Green is executing thread Red is waiting on I/O Tuesday, 18 September 2018 Node.js talking to PROGRESS
16
Web Apps Node.js blocking I/O decreases concurrency
Tuesday, 18 September 2018 Node.js talking to PROGRESS
17
Node.js talking to PROGRESS
Tuesday, 18 September 2018 Node.js talking to PROGRESS
18
Node.js talking to PROGRESS
Non Blocking I/O Model Tuesday, 18 September 2018 Node.js talking to PROGRESS
19
Node.js talking to PROGRESS
Reactor Pattern Browser Click Callbacks Drag Callbacks Tuesday, 18 September 2018 Node.js talking to PROGRESS
20
Node.js talking to PROGRESS
Event-Driven Tuesday, 18 September 2018 Node.js talking to PROGRESS
21
Node.js talking to PROGRESS
Evented Programming $(″body″).click( function() { $(this).css( ″color″, ″red″ ); }); Event Callback Tuesday, 18 September 2018 Node.js talking to PROGRESS
22
Node.js talking to PROGRESS
Request with Node: Reactor Request Request Green is executing thread Red is waiting on I/O Tuesday, 18 September 2018 Node.js talking to PROGRESS
23
Node.js talking to PROGRESS
Can handle thousands of concurrent connections with minimal overhead (CPU/Memory) on a single Process! Tuesday, 18 September 2018 Node.js talking to PROGRESS
24
Node.js talking to PROGRESS
Tuesday, 18 September 2018 Node.js talking to PROGRESS
25
Node.js talking to PROGRESS
Summary Extremely efficient networking applications Fast javascript runtime (V8) Rapid growth in both, packages and community Tuesday, 18 September 2018 Node.js talking to PROGRESS
26
Socket.io Introduction
Tuesday, 18 September 2018 Node.js talking to PROGRESS
27
Protocol for having a bidirectional communication with client.
Socket.io Protocol for having a bidirectional communication with client. Tuesday, 18 September 2018 Node.js talking to PROGRESS
28
Node.js talking to PROGRESS
Socket.io Example server.js: var io = require('socket.io').listen( 80 ); io.sockets.on('connection', function (socket) { socket.emit( 'message', { text: 'Hello World' }); socket.on('chat', function (data) { socket.broadcast.emit(data); }); }); Tuesday, 18 September 2018 Node.js talking to PROGRESS
29
Node.js talking to PROGRESS
Socket.io Example client.js: <script src="/socket.io/socket.io.js"></script> <script> var socket = io.connect(' socket.on( 'message', function (data) { console.log(data); }); socket.emit( 'chat', { message: 'Hi' } ); </script> Tuesday, 18 September 2018 Node.js talking to PROGRESS
30
Node.js talking to PROGRESS
Demo Tuesday, 18 September 2018 Node.js talking to PROGRESS
31
Communication between Progress and Node.js
Tuesday, 18 September 2018 Node.js talking to PROGRESS
32
Node.js talking to PROGRESS
TCP Tuesday, 18 September 2018 Node.js talking to PROGRESS
33
Node.js talking to PROGRESS
HTTP Tuesday, 18 September 2018 Node.js talking to PROGRESS
34
Node.js talking to PROGRESS
Webservice Tuesday, 18 September 2018 Node.js talking to PROGRESS
35
Node.js talking to PROGRESS
var soap = require('soap'), url = ' args = { blz: ' ' }; soap.createClient( url, function( err, client ) { client.getBank( args, function(err, result) { console.log( err, result ); }); Tuesday, 18 September 2018 Node.js talking to PROGRESS
36
node4progress Direct connect via Progress
Tuesday, 18 September 2018 Node.js talking to PROGRESS
37
Messaging Progress AMQP (Advanced Messaging Queuing Protocol)
AMQP is the Internet Protocol for Business Messaging Tuesday, 18 September 2018 Node.js talking to PROGRESS
38
Node.js talking to PROGRESS
REST Tuesday, 18 September 2018 Node.js talking to PROGRESS
39
Node.js talking to PROGRESS
var rest = require('rest'); rest.post( ' { data: 334 }) .on('complete', function(data, response) { if (response.statusCode == 201) { ... } }); Tuesday, 18 September 2018 Node.js talking to PROGRESS
40
Node.js talking to PROGRESS
Questions? Tuesday, 18 September 2018 Node.js talking to PROGRESS
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.