SlideShare a Scribd company logo
MUMPS is dead? Rob Tweed M/Gateway Developments Ltd http://www.mgateway.com Twitter: @rtweed
What is Node.js?
What is Node.js?
What is Node.js? โ€ฆ so what does that mean?
What is Node.js?
What is Node.js? Node.js is a server-side JavaScript environment.
What is Node.js? Node.js is a server-side JavaScript environment. Node.js is a server-side JavaScript interpreter that allows us to handle and make requests via JavaScript: In a web or networked environment
Just Javascript Browsers Node.js server process Javascript Javascript Database
So instead of this: http/ https Persistent connections Browser Browser Browser Web Server (Apache/ IIS) CSP Cachรฉ CSP interface Cachรฉ CSP interface Your scripts Your data EWD CSP pages
You'd have something like this: Browser Browser Browser Cach รฉ http/ https WebLink interface Cach รฉ CSP interface Child_process connections EWD Runtime Your scripts Your data EWD routines Node.js process Javascript Web server & request/response Handling logic stdin/stdout GT.M or Cach รฉ
What is Node.js?
V8 Node.js uses the Google V8 engine to provide the Javascript environment V8 is the engine in the Chrome browser V8 is  very  fast!
What is Node.js?
What is Node.js? Node.js is a server-side JavaScript environment   that uses an asynchronous event-driven model .
What is Node.js? Node.js is a server-side JavaScript environment   that uses an asynchronous event-driven model . No threads Node.js runs in a single process, handling all client requests Non-blocking I/O Can't wait for slow resources to respond Files, databases, etc Must not block the process or everyone waits
Asynchronous I/O & Javascript Javascript is an ideal language for this No I/O in a browser Access to remote resources is asynchronous The A in Ajax! Send a request for a resource and define a handler to deal with it when it arrives "Call-back function"
Asynchronous I/O & Javascript On the server, in Node.js: Make a request for I/O (file/ database) Define a call-back function Move on immediately When the I/O is complete: Call-back function is fired to handle it
Asynchronous I/O & Javascript Synchronous read from a file in MUMPS: set file = "mydata.txt" open file:"r" use file read buffer // do something with the buffer contents โ€ฆ . // then move on to the next task
Asynchronous I/O & Javascript Synchronous read from a file in MUMPS: set file = "mydata.txt" open file:"r" use file read buffer // do something with the buffer contents โ€ฆ .// at this point the thread is blocked โ€ฆ .// until the buffer contents are read from the file // then move on to the next task
Asynchronous I/O & Javascript The Asynchronous way in Javascript: var fs = require('fs'); fs.readFile('mydata.txt', function (err, buffer) { // Do something with the data in the buffer }); // Immediately execute the next statements //  while it waits for I/O
What is Node.js?
Node.js Evented I/O Node.js is a single process running an event loop When an event occurs, fire a call-back function to handle it When no events are coming in, the Node.js process sits in a dormant state
Node.js process A Node.js process can handle many thousands of clients Provided none of them block Provided none of them do CPU-intensive processing
Node.js / Javascript: popularity Node.js is now the most followed project on Github, exceeding Ruby on Rails Javascript is now the most popular language in the world, based on a number of measures including number of Github projects
Significance for GT.M & Cach รฉ Opportunity to use Javascript as a primary scripting language Global storage for Javascript JSON / Global mapping
Why Javascript? The world's most popular language The world's sexiest, coolest server-side environment Javascript's dynamic interpreted nature has many similarities to MUMPS
Why not MUMPS? Rightly or wrongly, the perception in the mainstream is that the MUMPS language is old-fashioned and inherently broken Daily WTF article: http://thedailywtf.com/Articles/A_Case_of_the_MUMPS.aspx Yet global storage has a great deal to offer as a NoSQL database technology Result: the benefits and advantages of global storage are ignored because modern developers will refuse to learn the language
Making Global Storage Attractive Make it accessible via the coolest, sexiest, most popular language on the planet Demonstrate that global storage is a great NoSQL technology "Universal NoSQL Engine" http://www.mgateway.com/docs/universalNoSQL.pdf
Downside of Node.js Asynchronous programming Callback hell! Deeply nested call-backs Complexity of logic Essential to understand closures 2 main types: Dependent Concurrent Care needed when using for loops to invoke logic that includes callbacks
Dependent callbacks myFunc1(inputs, function(error, results) { var value = results.value; // myFunc2 can't run until myFunc1 returns its results myFunc2(value, function(error, results) { var myResult = results.value; });  });
Concurrent callbacks var count = 0; myFunc1(inputs, function(error, results) { count++; if (count === 3) myFunc4(inputs); }); myFunc2(inputs, function(error, results) { count++; if (count === 3) myFunc4(inputs); }); myFunc3(inputs, function(error, results) { count++; if (count === 3) myFunc4(inputs); }); // myFunc isn't invoked until all 3 functions are complete // Uses the properties of closures to allow count to be incremented by  // the callbacks in the three functions
Closures Inner functions have access to the outer function's variables, even after the outer function has completed
Closures Inner functions have access to the outer function's variables, even after the outer function has completed  var digit_name = function() { var names = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven',  'eight', 'nine']; return function(n) { return names[n]; }; }; var test = digit_name(); // test is a function that takes a value var text = test(3); console.log("text = " + text);
Closures Inner functions have access to the outer function's variables, even after the outer function has completed  var digit_name = function() { var names = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven',  'eight', 'nine']; return function(n) { return names[n]; }; }; var test = digit_name(); // test is a function that takes a value var text = test(3); console.log("text = " + text);
Closures Could be rewritten to use a self-executing function as follows  var digit_name = function() {ย   var names = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven',ย  'eight', 'nine'];ย   return function(n) {ย ย ย   return names[n];ย   }; } () ; // digit_name is the result of running the outer function,  //  so it's a function that takes a value var name = digit_name(3); // name will be 'three'
Downside of Node.js Asynchronous programming Database access functions can't return a value Value is embedded inside the callback Can't chain database functions as objects: document.getElementById('x').parent.firstChild.tagName
Accessing globals from Node.js Cache & GT.M: https://github.com/robtweed/ewdGateway Complete webserver + gateway for EWD Also includes global access functions, eg: get set getJSON mFunction

More Related Content

What's hot (20)

Server side JavaScript: going all the way
Server side JavaScript: going all the wayServer side JavaScript: going all the way
Server side JavaScript: going all the way
Oleg Podsechin
ย 
parenscript-tutorial
parenscript-tutorialparenscript-tutorial
parenscript-tutorial
tutorialsruby
ย 
Node.js
Node.jsNode.js
Node.js
Jan Dillmann
ย 
JS everywhere 2011
JS everywhere 2011JS everywhere 2011
JS everywhere 2011
Oleg Podsechin
ย 
Async and Await on the Server
Async and Await on the ServerAsync and Await on the Server
Async and Await on the Server
Doug Jones
ย 
Getting started with Perl XS and Inline::C
Getting started with Perl XS and Inline::CGetting started with Perl XS and Inline::C
Getting started with Perl XS and Inline::C
daoswald
ย 
Node.js - Advanced Basics
Node.js - Advanced BasicsNode.js - Advanced Basics
Node.js - Advanced Basics
Doug Jones
ย 
End to-end async and await
End to-end async and awaitEnd to-end async and await
End to-end async and await
vfabro
ย 
Real-Time Web Apps & Symfony. What are your options?
Real-Time Web Apps & Symfony. What are your options?Real-Time Web Apps & Symfony. What are your options?
Real-Time Web Apps & Symfony. What are your options?
Phil Leggetter
ย 
Async await
Async awaitAsync await
Async await
Jeff Hart
ย 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
orkaplan
ย 
Async/Await
Async/AwaitAsync/Await
Async/Await
Jeff Hart
ย 
DaNode - A home made web server in D
DaNode - A home made web server in DDaNode - A home made web server in D
DaNode - A home made web server in D
Andrei Alexandrescu
ย 
The Road To Reactive with RxJava JEEConf 2016
The Road To Reactive with RxJava JEEConf 2016The Road To Reactive with RxJava JEEConf 2016
The Road To Reactive with RxJava JEEConf 2016
Frank Lyaruu
ย 
How NOT to write in Node.js
How NOT to write in Node.jsHow NOT to write in Node.js
How NOT to write in Node.js
Piotr Pelczar
ย 
Scaling Ruby with Evented I/O - Ruby underground
Scaling Ruby with Evented I/O - Ruby undergroundScaling Ruby with Evented I/O - Ruby underground
Scaling Ruby with Evented I/O - Ruby underground
Omer Gazit
ย 
Server Side Swift
Server Side SwiftServer Side Swift
Server Side Swift
Jens Ravens
ย 
Beyond Fault Tolerance with Actor Programming
Beyond Fault Tolerance with Actor ProgrammingBeyond Fault Tolerance with Actor Programming
Beyond Fault Tolerance with Actor Programming
Fabio Tiriticco
ย 
CTU June 2011 - C# 5.0 - ASYNC & Await
CTU June 2011 - C# 5.0 - ASYNC & AwaitCTU June 2011 - C# 5.0 - ASYNC & Await
CTU June 2011 - C# 5.0 - ASYNC & Await
Spiffy
ย 
Introduction Node.js
Introduction Node.jsIntroduction Node.js
Introduction Node.js
Erik van Appeldoorn
ย 
Server side JavaScript: going all the way
Server side JavaScript: going all the wayServer side JavaScript: going all the way
Server side JavaScript: going all the way
Oleg Podsechin
ย 
parenscript-tutorial
parenscript-tutorialparenscript-tutorial
parenscript-tutorial
tutorialsruby
ย 
JS everywhere 2011
JS everywhere 2011JS everywhere 2011
JS everywhere 2011
Oleg Podsechin
ย 
Async and Await on the Server
Async and Await on the ServerAsync and Await on the Server
Async and Await on the Server
Doug Jones
ย 
Getting started with Perl XS and Inline::C
Getting started with Perl XS and Inline::CGetting started with Perl XS and Inline::C
Getting started with Perl XS and Inline::C
daoswald
ย 
Node.js - Advanced Basics
Node.js - Advanced BasicsNode.js - Advanced Basics
Node.js - Advanced Basics
Doug Jones
ย 
End to-end async and await
End to-end async and awaitEnd to-end async and await
End to-end async and await
vfabro
ย 
Real-Time Web Apps & Symfony. What are your options?
Real-Time Web Apps & Symfony. What are your options?Real-Time Web Apps & Symfony. What are your options?
Real-Time Web Apps & Symfony. What are your options?
Phil Leggetter
ย 
Async await
Async awaitAsync await
Async await
Jeff Hart
ย 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
orkaplan
ย 
Async/Await
Async/AwaitAsync/Await
Async/Await
Jeff Hart
ย 
DaNode - A home made web server in D
DaNode - A home made web server in DDaNode - A home made web server in D
DaNode - A home made web server in D
Andrei Alexandrescu
ย 
The Road To Reactive with RxJava JEEConf 2016
The Road To Reactive with RxJava JEEConf 2016The Road To Reactive with RxJava JEEConf 2016
The Road To Reactive with RxJava JEEConf 2016
Frank Lyaruu
ย 
How NOT to write in Node.js
How NOT to write in Node.jsHow NOT to write in Node.js
How NOT to write in Node.js
Piotr Pelczar
ย 
Scaling Ruby with Evented I/O - Ruby underground
Scaling Ruby with Evented I/O - Ruby undergroundScaling Ruby with Evented I/O - Ruby underground
Scaling Ruby with Evented I/O - Ruby underground
Omer Gazit
ย 
Server Side Swift
Server Side SwiftServer Side Swift
Server Side Swift
Jens Ravens
ย 
Beyond Fault Tolerance with Actor Programming
Beyond Fault Tolerance with Actor ProgrammingBeyond Fault Tolerance with Actor Programming
Beyond Fault Tolerance with Actor Programming
Fabio Tiriticco
ย 
CTU June 2011 - C# 5.0 - ASYNC & Await
CTU June 2011 - C# 5.0 - ASYNC & AwaitCTU June 2011 - C# 5.0 - ASYNC & Await
CTU June 2011 - C# 5.0 - ASYNC & Await
Spiffy
ย 

Similar to Node.js: CAMTA Presentation (20)

Node js
Node jsNode js
Node js
hazzaz
ย 
Everything you wanted to know about writing async, concurrent http apps in java
Everything you wanted to know about writing async, concurrent http apps in java Everything you wanted to know about writing async, concurrent http apps in java
Everything you wanted to know about writing async, concurrent http apps in java
Baruch Sadogursky
ย 
hacking with node.JS
hacking with node.JShacking with node.JS
hacking with node.JS
Harsha Vashisht
ย 
Implementing Comet using PHP
Implementing Comet using PHPImplementing Comet using PHP
Implementing Comet using PHP
King Foo
ย 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
Su Zin Kyaw
ย 
Introduction to node.js by Ran Mizrahi @ Reversim Summit
Introduction to node.js by Ran Mizrahi @ Reversim SummitIntroduction to node.js by Ran Mizrahi @ Reversim Summit
Introduction to node.js by Ran Mizrahi @ Reversim Summit
Ran Mizrahi
ย 
NodeJS
NodeJSNodeJS
NodeJS
LinkMe Srl
ย 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Vikash Singh
ย 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications
Tom Croucher
ย 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 Engine
Ricardo Silva
ย 
Original slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talkOriginal slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talk
Aarti Parikh
ย 
NodeJS
NodeJSNodeJS
NodeJS
Alok Guha
ย 
Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.
Visual Engineering
ย 
No callbacks, No Threads - Cooperative web servers in Ruby 1.9
No callbacks, No Threads - Cooperative web servers in Ruby 1.9No callbacks, No Threads - Cooperative web servers in Ruby 1.9
No callbacks, No Threads - Cooperative web servers in Ruby 1.9
Ilya Grigorik
ย 
About Node.js
About Node.jsAbout Node.js
About Node.js
Artemisa Yescas Engler
ย 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backend
David Padbury
ย 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Richard Lee
ย 
Torquebox OSCON Java 2011
Torquebox OSCON Java 2011Torquebox OSCON Java 2011
Torquebox OSCON Java 2011
tobiascrawley
ย 
Introduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCatsIntroduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCats
Derek Anderson
ย 
Node.js: A Guided Tour
Node.js: A Guided TourNode.js: A Guided Tour
Node.js: A Guided Tour
cacois
ย 
Node js
Node jsNode js
Node js
hazzaz
ย 
Everything you wanted to know about writing async, concurrent http apps in java
Everything you wanted to know about writing async, concurrent http apps in java Everything you wanted to know about writing async, concurrent http apps in java
Everything you wanted to know about writing async, concurrent http apps in java
Baruch Sadogursky
ย 
hacking with node.JS
hacking with node.JShacking with node.JS
hacking with node.JS
Harsha Vashisht
ย 
Implementing Comet using PHP
Implementing Comet using PHPImplementing Comet using PHP
Implementing Comet using PHP
King Foo
ย 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
Su Zin Kyaw
ย 
Introduction to node.js by Ran Mizrahi @ Reversim Summit
Introduction to node.js by Ran Mizrahi @ Reversim SummitIntroduction to node.js by Ran Mizrahi @ Reversim Summit
Introduction to node.js by Ran Mizrahi @ Reversim Summit
Ran Mizrahi
ย 
NodeJS
NodeJSNodeJS
NodeJS
LinkMe Srl
ย 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Vikash Singh
ย 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications
Tom Croucher
ย 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 Engine
Ricardo Silva
ย 
Original slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talkOriginal slides from Ryan Dahl's NodeJs intro talk
Original slides from Ryan Dahl's NodeJs intro talk
Aarti Parikh
ย 
NodeJS
NodeJSNodeJS
NodeJS
Alok Guha
ย 
Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.
Visual Engineering
ย 
No callbacks, No Threads - Cooperative web servers in Ruby 1.9
No callbacks, No Threads - Cooperative web servers in Ruby 1.9No callbacks, No Threads - Cooperative web servers in Ruby 1.9
No callbacks, No Threads - Cooperative web servers in Ruby 1.9
Ilya Grigorik
ย 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backend
David Padbury
ย 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Richard Lee
ย 
Torquebox OSCON Java 2011
Torquebox OSCON Java 2011Torquebox OSCON Java 2011
Torquebox OSCON Java 2011
tobiascrawley
ย 
Introduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCatsIntroduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCats
Derek Anderson
ย 
Node.js: A Guided Tour
Node.js: A Guided TourNode.js: A Guided Tour
Node.js: A Guided Tour
cacois
ย 

More from Rob Tweed (20)

QEWD Update
QEWD UpdateQEWD Update
QEWD Update
Rob Tweed
ย 
Data Persistence as a Language Feature
Data Persistence as a Language FeatureData Persistence as a Language Feature
Data Persistence as a Language Feature
Rob Tweed
ย 
LNUG: Having Your Node.js Cake and Eating It Too
LNUG: Having Your Node.js Cake and Eating It TooLNUG: Having Your Node.js Cake and Eating It Too
LNUG: Having Your Node.js Cake and Eating It Too
Rob Tweed
ย 
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService FunctionalityEWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
Rob Tweed
ย 
EWD 3 Training Course Part 44: Creating MicroServices with QEWD.js
EWD 3 Training Course Part 44: Creating MicroServices with QEWD.jsEWD 3 Training Course Part 44: Creating MicroServices with QEWD.js
EWD 3 Training Course Part 44: Creating MicroServices with QEWD.js
Rob Tweed
ย 
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST ServicesEWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
Rob Tweed
ย 
QEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServicesQEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServices
Rob Tweed
ย 
QEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It TooQEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It Too
Rob Tweed
ย 
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Servicesewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
Rob Tweed
ย 
qewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tierqewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tier
Rob Tweed
ย 
EWD 3 Training Course Part 42: The QEWD Docker Appliance
EWD 3 Training Course Part 42: The QEWD Docker ApplianceEWD 3 Training Course Part 42: The QEWD Docker Appliance
EWD 3 Training Course Part 42: The QEWD Docker Appliance
Rob Tweed
ย 
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
Rob Tweed
ย 
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
Rob Tweed
ย 
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
Rob Tweed
ย 
EWD 3 Training Course Part 5b: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5b: First Steps in Building a QEWD ApplicationEWD 3 Training Course Part 5b: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5b: First Steps in Building a QEWD Application
Rob Tweed
ย 
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2
Rob Tweed
ย 
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
Rob Tweed
ย 
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...
Rob Tweed
ย 
EWD 3 Training Course Part 35: QEWD Session Locking
EWD 3 Training Course Part 35: QEWD Session LockingEWD 3 Training Course Part 35: QEWD Session Locking
EWD 3 Training Course Part 35: QEWD Session Locking
Rob Tweed
ย 
EWD 3 Training Course Part 34: QEWD Resilient Mode
EWD 3 Training Course Part 34: QEWD Resilient ModeEWD 3 Training Course Part 34: QEWD Resilient Mode
EWD 3 Training Course Part 34: QEWD Resilient Mode
Rob Tweed
ย 
QEWD Update
QEWD UpdateQEWD Update
QEWD Update
Rob Tweed
ย 
Data Persistence as a Language Feature
Data Persistence as a Language FeatureData Persistence as a Language Feature
Data Persistence as a Language Feature
Rob Tweed
ย 
LNUG: Having Your Node.js Cake and Eating It Too
LNUG: Having Your Node.js Cake and Eating It TooLNUG: Having Your Node.js Cake and Eating It Too
LNUG: Having Your Node.js Cake and Eating It Too
Rob Tweed
ย 
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService FunctionalityEWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
Rob Tweed
ย 
EWD 3 Training Course Part 44: Creating MicroServices with QEWD.js
EWD 3 Training Course Part 44: Creating MicroServices with QEWD.jsEWD 3 Training Course Part 44: Creating MicroServices with QEWD.js
EWD 3 Training Course Part 44: Creating MicroServices with QEWD.js
Rob Tweed
ย 
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST ServicesEWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
Rob Tweed
ย 
QEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServicesQEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServices
Rob Tweed
ย 
QEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It TooQEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It Too
Rob Tweed
ย 
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Servicesewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
Rob Tweed
ย 
qewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tierqewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tier
Rob Tweed
ย 
EWD 3 Training Course Part 42: The QEWD Docker Appliance
EWD 3 Training Course Part 42: The QEWD Docker ApplianceEWD 3 Training Course Part 42: The QEWD Docker Appliance
EWD 3 Training Course Part 42: The QEWD Docker Appliance
Rob Tweed
ย 
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
Rob Tweed
ย 
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
Rob Tweed
ย 
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
Rob Tweed
ย 
EWD 3 Training Course Part 5b: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5b: First Steps in Building a QEWD ApplicationEWD 3 Training Course Part 5b: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5b: First Steps in Building a QEWD Application
Rob Tweed
ย 
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2
Rob Tweed
ย 
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
Rob Tweed
ย 
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...
Rob Tweed
ย 
EWD 3 Training Course Part 35: QEWD Session Locking
EWD 3 Training Course Part 35: QEWD Session LockingEWD 3 Training Course Part 35: QEWD Session Locking
EWD 3 Training Course Part 35: QEWD Session Locking
Rob Tweed
ย 
EWD 3 Training Course Part 34: QEWD Resilient Mode
EWD 3 Training Course Part 34: QEWD Resilient ModeEWD 3 Training Course Part 34: QEWD Resilient Mode
EWD 3 Training Course Part 34: QEWD Resilient Mode
Rob Tweed
ย 

Recently uploaded (20)

Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
ย 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
ย 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
ย 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
ย 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
ย 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
ย 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
ย 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
ย 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
ย 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
ย 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
ย 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
ย 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
ย 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
ย 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
ย 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
ย 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
ย 
Drupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Drupalcamp Finland โ€“ Measuring Front-end Energy ConsumptionDrupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Drupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Exove
ย 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
ย 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
ย 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
ย 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
ย 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
ย 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
ย 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
ย 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
ย 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
ย 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
ย 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
ย 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
ย 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
ย 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
ย 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
ย 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
ย 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
ย 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
ย 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
ย 
Drupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Drupalcamp Finland โ€“ Measuring Front-end Energy ConsumptionDrupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Drupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Exove
ย 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
ย 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
ย 

Node.js: CAMTA Presentation

  • 1. MUMPS is dead? Rob Tweed M/Gateway Developments Ltd http://www.mgateway.com Twitter: @rtweed
  • 4. What is Node.js? โ€ฆ so what does that mean?
  • 6. What is Node.js? Node.js is a server-side JavaScript environment.
  • 7. What is Node.js? Node.js is a server-side JavaScript environment. Node.js is a server-side JavaScript interpreter that allows us to handle and make requests via JavaScript: In a web or networked environment
  • 8. Just Javascript Browsers Node.js server process Javascript Javascript Database
  • 9. So instead of this: http/ https Persistent connections Browser Browser Browser Web Server (Apache/ IIS) CSP Cachรฉ CSP interface Cachรฉ CSP interface Your scripts Your data EWD CSP pages
  • 10. You'd have something like this: Browser Browser Browser Cach รฉ http/ https WebLink interface Cach รฉ CSP interface Child_process connections EWD Runtime Your scripts Your data EWD routines Node.js process Javascript Web server & request/response Handling logic stdin/stdout GT.M or Cach รฉ
  • 12. V8 Node.js uses the Google V8 engine to provide the Javascript environment V8 is the engine in the Chrome browser V8 is very fast!
  • 14. What is Node.js? Node.js is a server-side JavaScript environment that uses an asynchronous event-driven model .
  • 15. What is Node.js? Node.js is a server-side JavaScript environment that uses an asynchronous event-driven model . No threads Node.js runs in a single process, handling all client requests Non-blocking I/O Can't wait for slow resources to respond Files, databases, etc Must not block the process or everyone waits
  • 16. Asynchronous I/O & Javascript Javascript is an ideal language for this No I/O in a browser Access to remote resources is asynchronous The A in Ajax! Send a request for a resource and define a handler to deal with it when it arrives "Call-back function"
  • 17. Asynchronous I/O & Javascript On the server, in Node.js: Make a request for I/O (file/ database) Define a call-back function Move on immediately When the I/O is complete: Call-back function is fired to handle it
  • 18. Asynchronous I/O & Javascript Synchronous read from a file in MUMPS: set file = "mydata.txt" open file:"r" use file read buffer // do something with the buffer contents โ€ฆ . // then move on to the next task
  • 19. Asynchronous I/O & Javascript Synchronous read from a file in MUMPS: set file = "mydata.txt" open file:"r" use file read buffer // do something with the buffer contents โ€ฆ .// at this point the thread is blocked โ€ฆ .// until the buffer contents are read from the file // then move on to the next task
  • 20. Asynchronous I/O & Javascript The Asynchronous way in Javascript: var fs = require('fs'); fs.readFile('mydata.txt', function (err, buffer) { // Do something with the data in the buffer }); // Immediately execute the next statements // while it waits for I/O
  • 22. Node.js Evented I/O Node.js is a single process running an event loop When an event occurs, fire a call-back function to handle it When no events are coming in, the Node.js process sits in a dormant state
  • 23. Node.js process A Node.js process can handle many thousands of clients Provided none of them block Provided none of them do CPU-intensive processing
  • 24. Node.js / Javascript: popularity Node.js is now the most followed project on Github, exceeding Ruby on Rails Javascript is now the most popular language in the world, based on a number of measures including number of Github projects
  • 25. Significance for GT.M & Cach รฉ Opportunity to use Javascript as a primary scripting language Global storage for Javascript JSON / Global mapping
  • 26. Why Javascript? The world's most popular language The world's sexiest, coolest server-side environment Javascript's dynamic interpreted nature has many similarities to MUMPS
  • 27. Why not MUMPS? Rightly or wrongly, the perception in the mainstream is that the MUMPS language is old-fashioned and inherently broken Daily WTF article: http://thedailywtf.com/Articles/A_Case_of_the_MUMPS.aspx Yet global storage has a great deal to offer as a NoSQL database technology Result: the benefits and advantages of global storage are ignored because modern developers will refuse to learn the language
  • 28. Making Global Storage Attractive Make it accessible via the coolest, sexiest, most popular language on the planet Demonstrate that global storage is a great NoSQL technology "Universal NoSQL Engine" http://www.mgateway.com/docs/universalNoSQL.pdf
  • 29. Downside of Node.js Asynchronous programming Callback hell! Deeply nested call-backs Complexity of logic Essential to understand closures 2 main types: Dependent Concurrent Care needed when using for loops to invoke logic that includes callbacks
  • 30. Dependent callbacks myFunc1(inputs, function(error, results) { var value = results.value; // myFunc2 can't run until myFunc1 returns its results myFunc2(value, function(error, results) { var myResult = results.value; }); });
  • 31. Concurrent callbacks var count = 0; myFunc1(inputs, function(error, results) { count++; if (count === 3) myFunc4(inputs); }); myFunc2(inputs, function(error, results) { count++; if (count === 3) myFunc4(inputs); }); myFunc3(inputs, function(error, results) { count++; if (count === 3) myFunc4(inputs); }); // myFunc isn't invoked until all 3 functions are complete // Uses the properties of closures to allow count to be incremented by // the callbacks in the three functions
  • 32. Closures Inner functions have access to the outer function's variables, even after the outer function has completed
  • 33. Closures Inner functions have access to the outer function's variables, even after the outer function has completed var digit_name = function() { var names = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']; return function(n) { return names[n]; }; }; var test = digit_name(); // test is a function that takes a value var text = test(3); console.log("text = " + text);
  • 34. Closures Inner functions have access to the outer function's variables, even after the outer function has completed var digit_name = function() { var names = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']; return function(n) { return names[n]; }; }; var test = digit_name(); // test is a function that takes a value var text = test(3); console.log("text = " + text);
  • 35. Closures Could be rewritten to use a self-executing function as follows var digit_name = function() {ย  var names = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven',ย  'eight', 'nine'];ย  return function(n) {ย ย ย  return names[n];ย  }; } () ; // digit_name is the result of running the outer function, // so it's a function that takes a value var name = digit_name(3); // name will be 'three'
  • 36. Downside of Node.js Asynchronous programming Database access functions can't return a value Value is embedded inside the callback Can't chain database functions as objects: document.getElementById('x').parent.firstChild.tagName
  • 37. Accessing globals from Node.js Cache & GT.M: https://github.com/robtweed/ewdGateway Complete webserver + gateway for EWD Also includes global access functions, eg: get set getJSON mFunction