SlideShare a Scribd company logo
Copyright © 2016 M/Gateway Developments Ltd
EWD 3 Training Course
Part 19
Accessing a Global Storage
Database from JavaScript: the
cache.node APIs
Rob Tweed
Director, M/Gateway Developments Ltd
Twitter: @rtweed
Copyright © 2016 M/Gateway Developments Ltd
cache.node
• The cache.node interface module allows
you to access a Caché database from
JavaScript
Copyright © 2016 M/Gateway Developments Ltd
NodeM
• The NodeM module is an Open Source
emulation of cache.node, allowing the
GT.M database to be accessed identically
from JavaScript
– https://github.com/dlwicksell/nodem
Copyright © 2016 M/Gateway Developments Ltd
ewd-redis-globals
• The Redis-based ewd-redis-globals
implementation of Global Storage includes
an implementation of the cache.node
APIs, allowing the database to be
accessed identically from JavaScript
– https://github.com/robtweed/ewd-redis-globals
Copyright © 2016 M/Gateway Developments Ltd
cache.node, NodeM &
ewd-redis-globals APIs
When accessed in a QEWD
application:
this.db.{{someFunctioName}}()
Copyright © 2016 M/Gateway Developments Ltd
Loading and Initialising the
Interface Modules
These steps are done for you
automatically by QEWD
Here’s how to do it manually, eg
if you're creating a standalone
test-harness…
Copyright © 2016 M/Gateway Developments Ltd
cache.node APIs
Loading cache.node:
var interface = require('cache');
var db = new interface.Cache();
Copyright © 2016 M/Gateway Developments Ltd
cache.node APIs
Opening connection to Caché :
db.open({
path: '/opt/cache/mgr',
username: '_SYSTEM',
password: 'SYS',
namespace: 'USER',
charset: 'UTF-8',
lock: 0
});
Copyright © 2016 M/Gateway Developments Ltd
cache.node APIs
Closing connection to Caché:
var ok = db.close();
Copyright © 2016 M/Gateway Developments Ltd
NodeM (GT.M) APIs
Loading NodeM:
var interface = require('nodem');
var db = new interface.Gtm();
Copyright © 2016 M/Gateway Developments Ltd
NodeM APIs
Opening connection to GT.M:
db.open();
Copyright © 2016 M/Gateway Developments Ltd
NodeM APIs
Opening connection to GT.M:
db.open();
Thereafter, all APIs are identical to those used with cache.node
Copyright © 2016 M/Gateway Developments Ltd
NodeM APIs
Closing connection to GT.M:
var ok = db.close();
ie: Identical to cache.node
Copyright © 2016 M/Gateway Developments Ltd
ewd-redis-globals APIs
Loading ewd-redis-globals:
var interface = require('ewd-redis-globals');
var db = new interface();
Copyright © 2016 M/Gateway Developments Ltd
Opening connection to Redis / ewd-redis-globals:
db.open();
ewd-redis-globals APIs
Copyright © 2016 M/Gateway Developments Ltd
Thereafter, all APIs are identical to those used with cache.node
Opening connection to Redis / ewd-redis-globals:
db.open();
ewd-redis-globals APIs
Copyright © 2016 M/Gateway Developments Ltd
Closing connection to Redis / ewd-redis-globals:
var ok = db.close();
ie: Identical to cache.node
ewd-redis-globals APIs
Copyright © 2016 M/Gateway Developments Ltd
Setting up a test harness
• Ready to use example for Caché in
QEWD:
– C:qewdnode_modulesqewdexampletest.js
– Needs editing to match your Caché (or other
database) configuration
• Use previous slides for GT.M and Redis
Copyright © 2016 M/Gateway Developments Ltd
Edit test.js
var interface = require('cache');
var db = new interface.Cache();
console.log('db: ' + JSON.stringify(db));
// Change these parameters to match your GlobalsDB or Cache system:
var ok = db.open({
path: '/opt/cache/mgr',
username: '_SYSTEM',
password: 'SYS',
namespace: 'USER'
});
console.log('ok: ' + JSON.stringify(ok));
console.log(db.version());
var node = {
global: 'rob',
subscripts: [1],
data: 'hello'
};
db.set(node);
var result = db.get(node);
console.log(JSON.stringify(result));
db.close();
Copyright © 2016 M/Gateway Developments Ltd
Edit test.js
var interface = require('cache');
var db = new interface.Cache();
console.log('db: ' + JSON.stringify(db));
// Change these parameters to match your GlobalsDB or Cache system:
var ok = db.open({
path: 'C:InterSystemsCache2015-2mgr',
username: '_SYSTEM',
password: 'SYS',
namespace: 'USER'
});
console.log('ok: ' + JSON.stringify(ok));
console.log(db.version());
var node = {
global: 'rob',
subscripts: [1],
data: 'hello'
};
db.set(node);
var result = db.get(node);
console.log(JSON.stringify(result));
db.close();
Copyright © 2016 M/Gateway Developments Ltd
Save as C:qewdtest.js
var interface = require('cache');
var db = new interface.Cache();
console.log('db: ' + JSON.stringify(db));
// Change these parameters to match your GlobalsDB or Cache system:
var ok = db.open({
path: 'C:InterSystemsCache2015-2mgr',
username: '_SYSTEM',
password: 'SYS',
namespace: 'USER'
});
console.log('ok: ' + JSON.stringify(ok));
console.log(db.version());
var node = {
global: 'rob',
subscripts: [1],
data: 'hello'
};
db.set(node);
var result = db.get(node);
console.log(JSON.stringify(result));
db.close();
Copyright © 2016 M/Gateway Developments Ltd
Run it
cd qewd (or on Linux / Raspberry Pi: cd /qewd )
node test
Copyright © 2016 M/Gateway Developments Ltd
Run it
cd qewd
node test
db: {}
ok: {"ok":1,"result":1,"cache_pid":2960}
Node.js Adaptor for Cache: Version: 1.1.113 (CM); Cache Version: 2015.2 build 66
4
{"global":"rob","subscripts":[1],"data":"hello","ok":1,"defined":1}
Copyright © 2016 M/Gateway Developments Ltd
One difference between test harness
and QEWD
• Test harness: invoke cache.node APIs
using:
– db.xxx()
• In QEWD worker module, they are
accessed using:
– this.db.xxx()
Copyright © 2016 M/Gateway Developments Ltd
One difference between test harness
and QEWD
• Test harness: invoke cache.node APIs
using:
– db.xxx()
db.set(node);
var result = db.get(node);
console.log(JSON.stringify(result));
db.close();
Copyright © 2016 M/Gateway Developments Ltd
One difference between test harness
and QEWD
• In QEWD worker module:
– this.db.xxx()
• Note: QEWD opens the database automatically when a worker is
started, and closes it automatically when the worker is stopped
this.db.set(node);
var result = this.db.get(node);
console.log(JSON.stringify(result));
Copyright © 2016 M/Gateway Developments Ltd
The Basic Global Storage APIs
Copyright © 2016 M/Gateway Developments Ltd
Global Storage handling APIs
Accessing global nodes:
- set
- get
- delete (kill)
Copyright © 2016 M/Gateway Developments Ltd
Defining a Global Node:
var node = {
global: 'employee',
subscripts: [123456, 'name']
};
Global Storage handling APIs
Copyright © 2016 M/Gateway Developments Ltd
Defining a Global Node:
var node = {
global: 'employee',
subscripts: [123456, 'name']
};
employee(123456,"name")
Global Storage handling APIs
Copyright © 2016 M/Gateway Developments Ltd
Accessing global nodes:
- set
node.data = 'Rob Tweed';
this.db.set(node);
Global Storage handling APIs
Copyright © 2016 M/Gateway Developments Ltd
Accessing global nodes:
- get
var value = this.db.get(node).data;
Global Storage handling APIs
Copyright © 2016 M/Gateway Developments Ltd
Accessing global nodes:
- kill
this.db.kill(node);
Global Storage handling APIs
Copyright © 2016 M/Gateway Developments Ltd
Traversing Global Subscripts
Copyright © 2016 M/Gateway Developments Ltd
Traversing global nodes:
- Iterate through subscripts
Global Storage handling APIs
Copyright © 2016 M/Gateway Developments Ltd
Traversing global nodes:
- Iterate through subscripts at a particular hierarchy level
myGlobal("a")=123
myGlobal("b","c1")="foo"
myGlobal("b","c2")="foo2"
myGlobal("d","e1","f1")="bar1"
myGlobal("d","e1","f2")="bar2"
myGlobal("d","e2","f1")="bar1"
myGlobal("d","e2","f2")="bar2"
myGlobal("d","e2","f3")="bar3"
myGlobal
"a" 123
"b"
"c2" "foo2"
"d"
"c1" "foo"
"e2"
"e1"
"f2" "bar2"
"f1" "bar1"
"f2" "bar2"
"f1" "bar1"
"f3" "bar3"
"a", "b", "d"
Global Storage handling APIs
Copyright © 2016 M/Gateway Developments Ltd
Traversing global nodes:
- Iterate through subscripts at a particular hierarchy level
myGlobal("a")=123
myGlobal("b","c1")="foo"
myGlobal("b","c2")="foo2"
myGlobal("d","e1","f1")="bar1"
myGlobal("d","e1","f2")="bar2"
myGlobal("d","e2","f1")="bar1"
myGlobal("d","e2","f2")="bar2"
myGlobal("d","e2","f3")="bar3"
myGlobal
"a" 123
"b"
"c2" "foo2"
"d"
"c1" "foo"
"e2"
"e1"
"f2" "bar2"
"f1" "bar1"
"f2" "bar2"
"f1" "bar1"
"f3" "bar3"
"e1", "e2"
Global Storage handling APIs
Copyright © 2016 M/Gateway Developments Ltd
Traversing global nodes:
- Iterate through subscripts at a particular hierarchy level
myGlobal("a")=123
myGlobal("b","c1")="foo"
myGlobal("b","c2")="foo2"
myGlobal("d","e1","f1")="bar1"
myGlobal("d","e1","f2")="bar2"
myGlobal("d","e2","f1")="bar1"
myGlobal("d","e2","f2")="bar2"
myGlobal("d","e2","f3")="bar3"
myGlobal
"a" 123
"b"
"c2" "foo2"
"d"
"c1" "foo"
"e2"
"e1"
"f2" "bar2"
"f1" "bar1"
"f2" "bar2"
"f1" "bar1"
"f3" "bar3"
"f1", "f2", "f3"
Global Storage handling APIs
Copyright © 2016 M/Gateway Developments Ltd
myGlobal("d","e2","f1")="bar1"
myGlobal("d","e2","f2")="bar2"
myGlobal("d","e2","f3")="bar3"
"f1", "f2", "f3"
Global Storage handling APIs
To achieve the following traversal:
Copyright © 2016 M/Gateway Developments Ltd
Traversing Global Node:
var node = {
global: 'myGlobal',
subscripts: ['d', 'e2', '' ]
};
myGlobal("d","e2","f1")="bar1"
myGlobal("d","e2","f2")="bar2"
myGlobal("d","e2","f3")="bar3"
"f1", "f2", "f3"
Global Storage handling APIs
Copyright © 2016 M/Gateway Developments Ltd
Traversing Global Node:
var node = {
global: 'myGlobal',
subscripts: ['d', 'e2', '' ]
};
myGlobal("d","e2","f1")="bar1"
myGlobal("d","e2","f2")="bar2"
myGlobal("d","e2","f3")="bar3"
"f1", "f2", "f3"
"seed" value to start iterator
Empty string
Global Storage handling APIs
Copyright © 2016 M/Gateway Developments Ltd
Traversing Global Node:
var node = {
global: 'myGlobal',
subscripts: ['d', 'e2', '' ]
};
var subscript = this.db.order(node).result;
// 'f1'
myGlobal("d","e2","f1")="bar1"
myGlobal("d","e2","f2")="bar2"
myGlobal("d","e2","f3")="bar3"
"f1", "f2", "f3"
Global Storage handling APIs
Copyright © 2016 M/Gateway Developments Ltd
Traversing Global Node:
var node = {
global: 'myGlobal',
subscripts: ['d', 'e2', '' ]
};
var subscript = this.db.order(node).result;
// 'f1'
subscript = this.db.order(node).result;
// 'f2' myGlobal("d","e2","f1")="bar1"
myGlobal("d","e2","f2")="bar2"
myGlobal("d","e2","f3")="bar3"
"f1", "f2", "f3"
Global Storage handling APIs
Copyright © 2016 M/Gateway Developments Ltd
Traversing Global Node:
var node = {
global: 'myGlobal',
subscripts: ['d', 'e2', '' ]
};
var subscript = this.db.order(node).result;
// 'f1'
subscript = this.db.order(node).result;
// 'f2'
subscript = this.db.order(node).result;
// 'f3'
myGlobal("d","e2","f1")="bar1"
myGlobal("d","e2","f2")="bar2"
myGlobal("d","e2","f3")="bar3"
"f1", "f2", "f3"
Global Storage handling APIs
Copyright © 2016 M/Gateway Developments Ltd
Traversing Global Node:
var node = {
global: 'myGlobal',
subscripts: ['d', 'e2', '' ]
};
var subscript = this.db.order(node).result;
// 'f1'
subscript = this.db.order(node).result;
// 'f2'
subscript = this.db.order(node).result;
// 'f3'
subscript = this.db.order(node).result;
// ''
myGlobal("d","e2","f1")="bar1"
myGlobal("d","e2","f2")="bar2"
myGlobal("d","e2","f3")="bar3"
"f1", "f2", "f3"
Global Storage handling APIs
Copyright © 2016 M/Gateway Developments Ltd
Traversing Global Node:
var node = {
global: 'myGlobal',
subscripts: ['d', 'e2', 'f2' ]
};
var subscript = this.db.order(node).result;
// 'f3'
myGlobal("d","e2","f1")="bar1"
myGlobal("d","e2","f2")="bar2"
myGlobal("d","e2","f3")="bar3"
"f3"
"seed" value to start iterator
Start from f2
Global Storage handling APIs
Copyright © 2016 M/Gateway Developments Ltd
Traversing Global Node:
var subscript = this.db.order(node).result;
// 'f3'
node is now:
{
global: 'myGlobal',
subscripts: ['d', 'e2', 'f3' ]
};
myGlobal("d","e2","f1")="bar1"
myGlobal("d","e2","f2")="bar2"
myGlobal("d","e2","f3")="bar3"
Global Storage handling APIs
Copyright © 2016 M/Gateway Developments Ltd
Traversing Global Node:
var node = {
global: 'myGlobal',
subscripts: ['d', 'e2', 'f2' ]
};
var subscript = this.db.order(node).result;
// 'f3'
subscript = this.db.order(node).result;
// '' myGlobal("d","e2","f1")="bar1"
myGlobal("d","e2","f2")="bar2"
myGlobal("d","e2","f3")="bar3"
""
Global Storage handling APIs
Empty string means no further subscripts, so traversal is complete
Copyright © 2016 M/Gateway Developments Ltd
Traversing Global Node – generic loop:
var node = {
global: 'myGlobal',
subscripts: ['d', 'e2', '' ]
};
var subscript;
do {
subscript = this.db.order(node).result;
if (subscript !== '') console.log(subscript);
}
while (subscript !== '');
myGlobal("d","e2","f1")="bar1"
myGlobal("d","e2","f2")="bar2"
myGlobal("d","e2","f3")="bar3"
"f1", "f2", "f3"
Global Storage handling APIs
Copyright © 2016 M/Gateway Developments Ltd
The APIs are low-level
• Deliberately designed to provide the basic
means of access to Global Storage and nothing
more
• They assume you understand the mechanics of
Global Storage
• Too low-level for JavaScript development
– Traversal, in particular, requires a lot of code
• However, they can be abstracted to a more
JavaScript-centric point of view
– Which is the subject of the next part of this course

More Related Content

What's hot

EWD 3 Training Course Part 30: Modularising QEWD Applications
EWD 3 Training Course Part 30: Modularising QEWD ApplicationsEWD 3 Training Course Part 30: Modularising QEWD Applications
EWD 3 Training Course Part 30: Modularising QEWD Applications
Rob Tweed
 
EWD 3 Training Course Part 4: Installing & Configuring QEWD
EWD 3 Training Course Part 4: Installing & Configuring QEWDEWD 3 Training Course Part 4: Installing & Configuring QEWD
EWD 3 Training Course Part 4: Installing & Configuring QEWD
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 3: Summary of EWD 3 Modules
EWD 3 Training Course Part 3: Summary of EWD 3 ModulesEWD 3 Training Course Part 3: Summary of EWD 3 Modules
EWD 3 Training Course Part 3: Summary of EWD 3 Modules
Rob Tweed
 
EWD 3 Training Course Part 16: QEWD Services
EWD 3 Training Course Part 16: QEWD ServicesEWD 3 Training Course Part 16: QEWD Services
EWD 3 Training Course Part 16: QEWD Services
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
 
EWD 3 Training Course Part 15: Using a Framework other than jQuery with QEWD
EWD 3 Training Course Part 15: Using a Framework other than jQuery with QEWDEWD 3 Training Course Part 15: Using a Framework other than jQuery with QEWD
EWD 3 Training Course Part 15: Using a Framework other than jQuery with QEWD
Rob Tweed
 
EWD 3 Training Course Part 27: The QEWD Session
EWD 3 Training Course Part 27: The QEWD SessionEWD 3 Training Course Part 27: The QEWD Session
EWD 3 Training Course Part 27: The QEWD Session
Rob Tweed
 
EWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
EWD 3 Training Course Part 6: What Happens when a QEWD Application is StartedEWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
EWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
Rob Tweed
 
EWD 3 Training Course Part 31: Using QEWD for Web and REST Services
EWD 3 Training Course Part 31: Using QEWD for Web and REST ServicesEWD 3 Training Course Part 31: Using QEWD for Web and REST Services
EWD 3 Training Course Part 31: Using QEWD for Web and REST Services
Rob Tweed
 
EWD 3 Training Course Part 2: EWD 3 Overview
EWD 3 Training Course Part 2: EWD 3 OverviewEWD 3 Training Course Part 2: EWD 3 Overview
EWD 3 Training Course Part 2: EWD 3 Overview
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 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 7: Applying the QEWD Messaging Pattern
EWD 3 Training Course Part 7: Applying the QEWD Messaging PatternEWD 3 Training Course Part 7: Applying the QEWD Messaging Pattern
EWD 3 Training Course Part 7: Applying the QEWD Messaging Pattern
Rob Tweed
 
EWD 3 Training Course Part 10: QEWD Sessions and User Authentication
EWD 3 Training Course Part 10: QEWD Sessions and User AuthenticationEWD 3 Training Course Part 10: QEWD Sessions and User Authentication
EWD 3 Training Course Part 10: QEWD Sessions and User Authentication
Rob Tweed
 
EWD 3 Training Course Part 9: Complex QEWD Messages and Responses
EWD 3 Training Course Part 9: Complex QEWD Messages and ResponsesEWD 3 Training Course Part 9: Complex QEWD Messages and Responses
EWD 3 Training Course Part 9: Complex QEWD Messages and Responses
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 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-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
 

What's hot (20)

EWD 3 Training Course Part 30: Modularising QEWD Applications
EWD 3 Training Course Part 30: Modularising QEWD ApplicationsEWD 3 Training Course Part 30: Modularising QEWD Applications
EWD 3 Training Course Part 30: Modularising QEWD Applications
 
EWD 3 Training Course Part 4: Installing & Configuring QEWD
EWD 3 Training Course Part 4: Installing & Configuring QEWDEWD 3 Training Course Part 4: Installing & Configuring QEWD
EWD 3 Training Course Part 4: Installing & Configuring QEWD
 
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
 
EWD 3 Training Course Part 3: Summary of EWD 3 Modules
EWD 3 Training Course Part 3: Summary of EWD 3 ModulesEWD 3 Training Course Part 3: Summary of EWD 3 Modules
EWD 3 Training Course Part 3: Summary of EWD 3 Modules
 
EWD 3 Training Course Part 16: QEWD Services
EWD 3 Training Course Part 16: QEWD ServicesEWD 3 Training Course Part 16: QEWD Services
EWD 3 Training Course Part 16: QEWD Services
 
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
 
EWD 3 Training Course Part 15: Using a Framework other than jQuery with QEWD
EWD 3 Training Course Part 15: Using a Framework other than jQuery with QEWDEWD 3 Training Course Part 15: Using a Framework other than jQuery with QEWD
EWD 3 Training Course Part 15: Using a Framework other than jQuery with QEWD
 
EWD 3 Training Course Part 27: The QEWD Session
EWD 3 Training Course Part 27: The QEWD SessionEWD 3 Training Course Part 27: The QEWD Session
EWD 3 Training Course Part 27: The QEWD Session
 
EWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
EWD 3 Training Course Part 6: What Happens when a QEWD Application is StartedEWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
EWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
 
EWD 3 Training Course Part 31: Using QEWD for Web and REST Services
EWD 3 Training Course Part 31: Using QEWD for Web and REST ServicesEWD 3 Training Course Part 31: Using QEWD for Web and REST Services
EWD 3 Training Course Part 31: Using QEWD for Web and REST Services
 
EWD 3 Training Course Part 2: EWD 3 Overview
EWD 3 Training Course Part 2: EWD 3 OverviewEWD 3 Training Course Part 2: EWD 3 Overview
EWD 3 Training Course Part 2: EWD 3 Overview
 
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...
 
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...
 
EWD 3 Training Course Part 7: Applying the QEWD Messaging Pattern
EWD 3 Training Course Part 7: Applying the QEWD Messaging PatternEWD 3 Training Course Part 7: Applying the QEWD Messaging Pattern
EWD 3 Training Course Part 7: Applying the QEWD Messaging Pattern
 
EWD 3 Training Course Part 10: QEWD Sessions and User Authentication
EWD 3 Training Course Part 10: QEWD Sessions and User AuthenticationEWD 3 Training Course Part 10: QEWD Sessions and User Authentication
EWD 3 Training Course Part 10: QEWD Sessions and User Authentication
 
EWD 3 Training Course Part 9: Complex QEWD Messages and Responses
EWD 3 Training Course Part 9: Complex QEWD Messages and ResponsesEWD 3 Training Course Part 9: Complex QEWD Messages and Responses
EWD 3 Training Course Part 9: Complex QEWD Messages and Responses
 
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
 
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
 
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
 
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
 

Viewers also liked

EWD 3 Training Course Part 20: The DocumentNode Object
EWD 3 Training Course Part 20: The DocumentNode ObjectEWD 3 Training Course Part 20: The DocumentNode Object
EWD 3 Training Course Part 20: The DocumentNode Object
Rob Tweed
 
EWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
EWD 3 Training Course Part 24: Traversing a Document's Leaf NodesEWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
EWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
Rob Tweed
 
EWD 3 Training Course Part 25: Document Database Capabilities
EWD 3 Training Course Part 25: Document Database CapabilitiesEWD 3 Training Course Part 25: Document Database Capabilities
EWD 3 Training Course Part 25: Document Database Capabilities
Rob Tweed
 
EWD 3 Training Course Part 26: Event-driven Indexing
EWD 3 Training Course Part 26: Event-driven IndexingEWD 3 Training Course Part 26: Event-driven Indexing
EWD 3 Training Course Part 26: Event-driven Indexing
Rob Tweed
 
EWD 3 Training Course Part 21: Persistent JavaScript Objects
EWD 3 Training Course Part 21: Persistent JavaScript ObjectsEWD 3 Training Course Part 21: Persistent JavaScript Objects
EWD 3 Training Course Part 21: Persistent JavaScript Objects
Rob Tweed
 
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
Rob Tweed
 
EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage
EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global StorageEWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage
EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage
Rob Tweed
 
EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...
EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...
EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...
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 17: Introduction to Global Storage Databases
EWD 3 Training Course Part 17: Introduction to Global Storage DatabasesEWD 3 Training Course Part 17: Introduction to Global Storage Databases
EWD 3 Training Course Part 17: Introduction to Global Storage Databases
Rob Tweed
 
EWD 3 Training Course Part 33: Configuring QEWD to use CORS
EWD 3 Training Course Part 33: Configuring QEWD to use CORSEWD 3 Training Course Part 33: Configuring QEWD to use CORS
EWD 3 Training Course Part 33: Configuring QEWD to use CORS
Rob Tweed
 

Viewers also liked (11)

EWD 3 Training Course Part 20: The DocumentNode Object
EWD 3 Training Course Part 20: The DocumentNode ObjectEWD 3 Training Course Part 20: The DocumentNode Object
EWD 3 Training Course Part 20: The DocumentNode Object
 
EWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
EWD 3 Training Course Part 24: Traversing a Document's Leaf NodesEWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
EWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
 
EWD 3 Training Course Part 25: Document Database Capabilities
EWD 3 Training Course Part 25: Document Database CapabilitiesEWD 3 Training Course Part 25: Document Database Capabilities
EWD 3 Training Course Part 25: Document Database Capabilities
 
EWD 3 Training Course Part 26: Event-driven Indexing
EWD 3 Training Course Part 26: Event-driven IndexingEWD 3 Training Course Part 26: Event-driven Indexing
EWD 3 Training Course Part 26: Event-driven Indexing
 
EWD 3 Training Course Part 21: Persistent JavaScript Objects
EWD 3 Training Course Part 21: Persistent JavaScript ObjectsEWD 3 Training Course Part 21: Persistent JavaScript Objects
EWD 3 Training Course Part 21: Persistent JavaScript Objects
 
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
 
EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage
EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global StorageEWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage
EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage
 
EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...
EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...
EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...
 
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
 
EWD 3 Training Course Part 17: Introduction to Global Storage Databases
EWD 3 Training Course Part 17: Introduction to Global Storage DatabasesEWD 3 Training Course Part 17: Introduction to Global Storage Databases
EWD 3 Training Course Part 17: Introduction to Global Storage Databases
 
EWD 3 Training Course Part 33: Configuring QEWD to use CORS
EWD 3 Training Course Part 33: Configuring QEWD to use CORSEWD 3 Training Course Part 33: Configuring QEWD to use CORS
EWD 3 Training Course Part 33: Configuring QEWD to use CORS
 

Similar to EWD 3 Training Course Part 19: The cache.node APIs

betterCode Workshop: Effizientes DevOps-Tooling mit Go
betterCode Workshop:  Effizientes DevOps-Tooling mit GobetterCode Workshop:  Effizientes DevOps-Tooling mit Go
betterCode Workshop: Effizientes DevOps-Tooling mit Go
QAware GmbH
 
Native Hadoop with prebuilt spark
Native Hadoop with prebuilt sparkNative Hadoop with prebuilt spark
Native Hadoop with prebuilt spark
arunkumar sadhasivam
 
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
Puppet
 
Challenges of container configuration
Challenges of container configurationChallenges of container configuration
Challenges of container configuration
lutter
 
Kubernetes security
Kubernetes securityKubernetes security
Kubernetes security
Thomas Fricke
 
EWD 3 Training Course Part 22: Traversing Documents using DocumentNode Objects
EWD 3 Training Course Part 22: Traversing Documents using DocumentNode ObjectsEWD 3 Training Course Part 22: Traversing Documents using DocumentNode Objects
EWD 3 Training Course Part 22: Traversing Documents using DocumentNode Objects
Rob Tweed
 
Excelian hyperledger walkthrough-feb17
Excelian hyperledger walkthrough-feb17Excelian hyperledger walkthrough-feb17
Excelian hyperledger walkthrough-feb17
Excelian | Luxoft Financial Services
 
Monitoring CloudStack and components
Monitoring CloudStack and componentsMonitoring CloudStack and components
Monitoring CloudStack and components
ShapeBlue
 
Nomad, l'orchestration made in Hashicorp - Bastien Cadiot
Nomad, l'orchestration made in Hashicorp - Bastien CadiotNomad, l'orchestration made in Hashicorp - Bastien Cadiot
Nomad, l'orchestration made in Hashicorp - Bastien Cadiot
Paris Container Day
 
Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy
Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy
Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy
Jeffrey Holden
 
New and cool in OSGi R7 - David Bosschaert & Carsten Ziegeler
New and cool in OSGi R7 - David Bosschaert & Carsten ZiegelerNew and cool in OSGi R7 - David Bosschaert & Carsten Ziegeler
New and cool in OSGi R7 - David Bosschaert & Carsten Ziegeler
mfrancis
 
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
Alessandro Arrichiello
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardway
Dave Pitts
 
Gradle: The Build System you have been waiting for!
Gradle: The Build System you have been waiting for!Gradle: The Build System you have been waiting for!
Gradle: The Build System you have been waiting for!
Corneil du Plessis
 
Parkjihoon phonegap research_for_bada
Parkjihoon phonegap research_for_badaParkjihoon phonegap research_for_bada
Parkjihoon phonegap research_for_bada
웹데브모바일
 
Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署
Bo-Yi Wu
 
BeJUG Meetup - What's coming in the OSGi R7 Specification
BeJUG Meetup - What's coming in the OSGi R7 SpecificationBeJUG Meetup - What's coming in the OSGi R7 Specification
BeJUG Meetup - What's coming in the OSGi R7 Specification
Stijn Van Den Enden
 
Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...
Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...
Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...
Codemotion
 
Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...
Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...
Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...
Codemotion
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
謝 宗穎
 

Similar to EWD 3 Training Course Part 19: The cache.node APIs (20)

betterCode Workshop: Effizientes DevOps-Tooling mit Go
betterCode Workshop:  Effizientes DevOps-Tooling mit GobetterCode Workshop:  Effizientes DevOps-Tooling mit Go
betterCode Workshop: Effizientes DevOps-Tooling mit Go
 
Native Hadoop with prebuilt spark
Native Hadoop with prebuilt sparkNative Hadoop with prebuilt spark
Native Hadoop with prebuilt spark
 
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
 
Challenges of container configuration
Challenges of container configurationChallenges of container configuration
Challenges of container configuration
 
Kubernetes security
Kubernetes securityKubernetes security
Kubernetes security
 
EWD 3 Training Course Part 22: Traversing Documents using DocumentNode Objects
EWD 3 Training Course Part 22: Traversing Documents using DocumentNode ObjectsEWD 3 Training Course Part 22: Traversing Documents using DocumentNode Objects
EWD 3 Training Course Part 22: Traversing Documents using DocumentNode Objects
 
Excelian hyperledger walkthrough-feb17
Excelian hyperledger walkthrough-feb17Excelian hyperledger walkthrough-feb17
Excelian hyperledger walkthrough-feb17
 
Monitoring CloudStack and components
Monitoring CloudStack and componentsMonitoring CloudStack and components
Monitoring CloudStack and components
 
Nomad, l'orchestration made in Hashicorp - Bastien Cadiot
Nomad, l'orchestration made in Hashicorp - Bastien CadiotNomad, l'orchestration made in Hashicorp - Bastien Cadiot
Nomad, l'orchestration made in Hashicorp - Bastien Cadiot
 
Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy
Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy
Deploying Cloud Native Red Team Infrastructure with Kubernetes, Istio and Envoy
 
New and cool in OSGi R7 - David Bosschaert & Carsten Ziegeler
New and cool in OSGi R7 - David Bosschaert & Carsten ZiegelerNew and cool in OSGi R7 - David Bosschaert & Carsten Ziegeler
New and cool in OSGi R7 - David Bosschaert & Carsten Ziegeler
 
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardway
 
Gradle: The Build System you have been waiting for!
Gradle: The Build System you have been waiting for!Gradle: The Build System you have been waiting for!
Gradle: The Build System you have been waiting for!
 
Parkjihoon phonegap research_for_bada
Parkjihoon phonegap research_for_badaParkjihoon phonegap research_for_bada
Parkjihoon phonegap research_for_bada
 
Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署
 
BeJUG Meetup - What's coming in the OSGi R7 Specification
BeJUG Meetup - What's coming in the OSGi R7 SpecificationBeJUG Meetup - What's coming in the OSGi R7 Specification
BeJUG Meetup - What's coming in the OSGi R7 Specification
 
Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...
Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...
Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...
 
Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...
Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...
Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
 

More from 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 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 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 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 32: Configuring QEWD to use SSL/HTTPS
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPSEWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS
Rob Tweed
 

More from Rob Tweed (10)

QEWD Update
QEWD UpdateQEWD Update
QEWD Update
 
Data Persistence as a Language Feature
Data Persistence as a Language FeatureData Persistence as a Language Feature
Data Persistence as a Language Feature
 
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
 
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
 
QEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServicesQEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServices
 
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
 
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
 
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
 
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
 
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPSEWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS
 

Recently uploaded

一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
dakas1
 
TMU毕业证书精仿办理
TMU毕业证书精仿办理TMU毕业证书精仿办理
TMU毕业证书精仿办理
aeeva
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Manyata Tech Park Bangalore_ Infrastructure, Facilities and More
Manyata Tech Park Bangalore_ Infrastructure, Facilities and MoreManyata Tech Park Bangalore_ Infrastructure, Facilities and More
Manyata Tech Park Bangalore_ Infrastructure, Facilities and More
narinav14
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
Bert Jan Schrijver
 
Upturn India Technologies - Web development company in Nashik
Upturn India Technologies - Web development company in NashikUpturn India Technologies - Web development company in Nashik
Upturn India Technologies - Web development company in Nashik
Upturn India Technologies
 
Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...
Paul Brebner
 
The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024
Yara Milbes
 
42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert
vaishalijagtap12
 
Liberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptxLiberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptx
Massimo Artizzu
 
What’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete RoadmapWhat’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete Roadmap
Envertis Software Solutions
 
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
The Third Creative Media
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
Reetu63
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
XfilesPro
 
Kubernetes at Scale: Going Multi-Cluster with Istio
Kubernetes at Scale:  Going Multi-Cluster  with IstioKubernetes at Scale:  Going Multi-Cluster  with Istio
Kubernetes at Scale: Going Multi-Cluster with Istio
Severalnines
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
gapen1
 
Boost Your Savings with These Money Management Apps
Boost Your Savings with These Money Management AppsBoost Your Savings with These Money Management Apps
Boost Your Savings with These Money Management Apps
Jhone kinadey
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 

Recently uploaded (20)

一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
 
TMU毕业证书精仿办理
TMU毕业证书精仿办理TMU毕业证书精仿办理
TMU毕业证书精仿办理
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Manyata Tech Park Bangalore_ Infrastructure, Facilities and More
Manyata Tech Park Bangalore_ Infrastructure, Facilities and MoreManyata Tech Park Bangalore_ Infrastructure, Facilities and More
Manyata Tech Park Bangalore_ Infrastructure, Facilities and More
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
 
Upturn India Technologies - Web development company in Nashik
Upturn India Technologies - Web development company in NashikUpturn India Technologies - Web development company in Nashik
Upturn India Technologies - Web development company in Nashik
 
Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...
 
The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024
 
42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert
 
Liberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptxLiberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptx
 
What’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete RoadmapWhat’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete Roadmap
 
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
 
Kubernetes at Scale: Going Multi-Cluster with Istio
Kubernetes at Scale:  Going Multi-Cluster  with IstioKubernetes at Scale:  Going Multi-Cluster  with Istio
Kubernetes at Scale: Going Multi-Cluster with Istio
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
 
Boost Your Savings with These Money Management Apps
Boost Your Savings with These Money Management AppsBoost Your Savings with These Money Management Apps
Boost Your Savings with These Money Management Apps
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 

EWD 3 Training Course Part 19: The cache.node APIs

  • 1. Copyright © 2016 M/Gateway Developments Ltd EWD 3 Training Course Part 19 Accessing a Global Storage Database from JavaScript: the cache.node APIs Rob Tweed Director, M/Gateway Developments Ltd Twitter: @rtweed
  • 2. Copyright © 2016 M/Gateway Developments Ltd cache.node • The cache.node interface module allows you to access a Caché database from JavaScript
  • 3. Copyright © 2016 M/Gateway Developments Ltd NodeM • The NodeM module is an Open Source emulation of cache.node, allowing the GT.M database to be accessed identically from JavaScript – https://github.com/dlwicksell/nodem
  • 4. Copyright © 2016 M/Gateway Developments Ltd ewd-redis-globals • The Redis-based ewd-redis-globals implementation of Global Storage includes an implementation of the cache.node APIs, allowing the database to be accessed identically from JavaScript – https://github.com/robtweed/ewd-redis-globals
  • 5. Copyright © 2016 M/Gateway Developments Ltd cache.node, NodeM & ewd-redis-globals APIs When accessed in a QEWD application: this.db.{{someFunctioName}}()
  • 6. Copyright © 2016 M/Gateway Developments Ltd Loading and Initialising the Interface Modules These steps are done for you automatically by QEWD Here’s how to do it manually, eg if you're creating a standalone test-harness…
  • 7. Copyright © 2016 M/Gateway Developments Ltd cache.node APIs Loading cache.node: var interface = require('cache'); var db = new interface.Cache();
  • 8. Copyright © 2016 M/Gateway Developments Ltd cache.node APIs Opening connection to Caché : db.open({ path: '/opt/cache/mgr', username: '_SYSTEM', password: 'SYS', namespace: 'USER', charset: 'UTF-8', lock: 0 });
  • 9. Copyright © 2016 M/Gateway Developments Ltd cache.node APIs Closing connection to Caché: var ok = db.close();
  • 10. Copyright © 2016 M/Gateway Developments Ltd NodeM (GT.M) APIs Loading NodeM: var interface = require('nodem'); var db = new interface.Gtm();
  • 11. Copyright © 2016 M/Gateway Developments Ltd NodeM APIs Opening connection to GT.M: db.open();
  • 12. Copyright © 2016 M/Gateway Developments Ltd NodeM APIs Opening connection to GT.M: db.open(); Thereafter, all APIs are identical to those used with cache.node
  • 13. Copyright © 2016 M/Gateway Developments Ltd NodeM APIs Closing connection to GT.M: var ok = db.close(); ie: Identical to cache.node
  • 14. Copyright © 2016 M/Gateway Developments Ltd ewd-redis-globals APIs Loading ewd-redis-globals: var interface = require('ewd-redis-globals'); var db = new interface();
  • 15. Copyright © 2016 M/Gateway Developments Ltd Opening connection to Redis / ewd-redis-globals: db.open(); ewd-redis-globals APIs
  • 16. Copyright © 2016 M/Gateway Developments Ltd Thereafter, all APIs are identical to those used with cache.node Opening connection to Redis / ewd-redis-globals: db.open(); ewd-redis-globals APIs
  • 17. Copyright © 2016 M/Gateway Developments Ltd Closing connection to Redis / ewd-redis-globals: var ok = db.close(); ie: Identical to cache.node ewd-redis-globals APIs
  • 18. Copyright © 2016 M/Gateway Developments Ltd Setting up a test harness • Ready to use example for Caché in QEWD: – C:qewdnode_modulesqewdexampletest.js – Needs editing to match your Caché (or other database) configuration • Use previous slides for GT.M and Redis
  • 19. Copyright © 2016 M/Gateway Developments Ltd Edit test.js var interface = require('cache'); var db = new interface.Cache(); console.log('db: ' + JSON.stringify(db)); // Change these parameters to match your GlobalsDB or Cache system: var ok = db.open({ path: '/opt/cache/mgr', username: '_SYSTEM', password: 'SYS', namespace: 'USER' }); console.log('ok: ' + JSON.stringify(ok)); console.log(db.version()); var node = { global: 'rob', subscripts: [1], data: 'hello' }; db.set(node); var result = db.get(node); console.log(JSON.stringify(result)); db.close();
  • 20. Copyright © 2016 M/Gateway Developments Ltd Edit test.js var interface = require('cache'); var db = new interface.Cache(); console.log('db: ' + JSON.stringify(db)); // Change these parameters to match your GlobalsDB or Cache system: var ok = db.open({ path: 'C:InterSystemsCache2015-2mgr', username: '_SYSTEM', password: 'SYS', namespace: 'USER' }); console.log('ok: ' + JSON.stringify(ok)); console.log(db.version()); var node = { global: 'rob', subscripts: [1], data: 'hello' }; db.set(node); var result = db.get(node); console.log(JSON.stringify(result)); db.close();
  • 21. Copyright © 2016 M/Gateway Developments Ltd Save as C:qewdtest.js var interface = require('cache'); var db = new interface.Cache(); console.log('db: ' + JSON.stringify(db)); // Change these parameters to match your GlobalsDB or Cache system: var ok = db.open({ path: 'C:InterSystemsCache2015-2mgr', username: '_SYSTEM', password: 'SYS', namespace: 'USER' }); console.log('ok: ' + JSON.stringify(ok)); console.log(db.version()); var node = { global: 'rob', subscripts: [1], data: 'hello' }; db.set(node); var result = db.get(node); console.log(JSON.stringify(result)); db.close();
  • 22. Copyright © 2016 M/Gateway Developments Ltd Run it cd qewd (or on Linux / Raspberry Pi: cd /qewd ) node test
  • 23. Copyright © 2016 M/Gateway Developments Ltd Run it cd qewd node test db: {} ok: {"ok":1,"result":1,"cache_pid":2960} Node.js Adaptor for Cache: Version: 1.1.113 (CM); Cache Version: 2015.2 build 66 4 {"global":"rob","subscripts":[1],"data":"hello","ok":1,"defined":1}
  • 24. Copyright © 2016 M/Gateway Developments Ltd One difference between test harness and QEWD • Test harness: invoke cache.node APIs using: – db.xxx() • In QEWD worker module, they are accessed using: – this.db.xxx()
  • 25. Copyright © 2016 M/Gateway Developments Ltd One difference between test harness and QEWD • Test harness: invoke cache.node APIs using: – db.xxx() db.set(node); var result = db.get(node); console.log(JSON.stringify(result)); db.close();
  • 26. Copyright © 2016 M/Gateway Developments Ltd One difference between test harness and QEWD • In QEWD worker module: – this.db.xxx() • Note: QEWD opens the database automatically when a worker is started, and closes it automatically when the worker is stopped this.db.set(node); var result = this.db.get(node); console.log(JSON.stringify(result));
  • 27. Copyright © 2016 M/Gateway Developments Ltd The Basic Global Storage APIs
  • 28. Copyright © 2016 M/Gateway Developments Ltd Global Storage handling APIs Accessing global nodes: - set - get - delete (kill)
  • 29. Copyright © 2016 M/Gateway Developments Ltd Defining a Global Node: var node = { global: 'employee', subscripts: [123456, 'name'] }; Global Storage handling APIs
  • 30. Copyright © 2016 M/Gateway Developments Ltd Defining a Global Node: var node = { global: 'employee', subscripts: [123456, 'name'] }; employee(123456,"name") Global Storage handling APIs
  • 31. Copyright © 2016 M/Gateway Developments Ltd Accessing global nodes: - set node.data = 'Rob Tweed'; this.db.set(node); Global Storage handling APIs
  • 32. Copyright © 2016 M/Gateway Developments Ltd Accessing global nodes: - get var value = this.db.get(node).data; Global Storage handling APIs
  • 33. Copyright © 2016 M/Gateway Developments Ltd Accessing global nodes: - kill this.db.kill(node); Global Storage handling APIs
  • 34. Copyright © 2016 M/Gateway Developments Ltd Traversing Global Subscripts
  • 35. Copyright © 2016 M/Gateway Developments Ltd Traversing global nodes: - Iterate through subscripts Global Storage handling APIs
  • 36. Copyright © 2016 M/Gateway Developments Ltd Traversing global nodes: - Iterate through subscripts at a particular hierarchy level myGlobal("a")=123 myGlobal("b","c1")="foo" myGlobal("b","c2")="foo2" myGlobal("d","e1","f1")="bar1" myGlobal("d","e1","f2")="bar2" myGlobal("d","e2","f1")="bar1" myGlobal("d","e2","f2")="bar2" myGlobal("d","e2","f3")="bar3" myGlobal "a" 123 "b" "c2" "foo2" "d" "c1" "foo" "e2" "e1" "f2" "bar2" "f1" "bar1" "f2" "bar2" "f1" "bar1" "f3" "bar3" "a", "b", "d" Global Storage handling APIs
  • 37. Copyright © 2016 M/Gateway Developments Ltd Traversing global nodes: - Iterate through subscripts at a particular hierarchy level myGlobal("a")=123 myGlobal("b","c1")="foo" myGlobal("b","c2")="foo2" myGlobal("d","e1","f1")="bar1" myGlobal("d","e1","f2")="bar2" myGlobal("d","e2","f1")="bar1" myGlobal("d","e2","f2")="bar2" myGlobal("d","e2","f3")="bar3" myGlobal "a" 123 "b" "c2" "foo2" "d" "c1" "foo" "e2" "e1" "f2" "bar2" "f1" "bar1" "f2" "bar2" "f1" "bar1" "f3" "bar3" "e1", "e2" Global Storage handling APIs
  • 38. Copyright © 2016 M/Gateway Developments Ltd Traversing global nodes: - Iterate through subscripts at a particular hierarchy level myGlobal("a")=123 myGlobal("b","c1")="foo" myGlobal("b","c2")="foo2" myGlobal("d","e1","f1")="bar1" myGlobal("d","e1","f2")="bar2" myGlobal("d","e2","f1")="bar1" myGlobal("d","e2","f2")="bar2" myGlobal("d","e2","f3")="bar3" myGlobal "a" 123 "b" "c2" "foo2" "d" "c1" "foo" "e2" "e1" "f2" "bar2" "f1" "bar1" "f2" "bar2" "f1" "bar1" "f3" "bar3" "f1", "f2", "f3" Global Storage handling APIs
  • 39. Copyright © 2016 M/Gateway Developments Ltd myGlobal("d","e2","f1")="bar1" myGlobal("d","e2","f2")="bar2" myGlobal("d","e2","f3")="bar3" "f1", "f2", "f3" Global Storage handling APIs To achieve the following traversal:
  • 40. Copyright © 2016 M/Gateway Developments Ltd Traversing Global Node: var node = { global: 'myGlobal', subscripts: ['d', 'e2', '' ] }; myGlobal("d","e2","f1")="bar1" myGlobal("d","e2","f2")="bar2" myGlobal("d","e2","f3")="bar3" "f1", "f2", "f3" Global Storage handling APIs
  • 41. Copyright © 2016 M/Gateway Developments Ltd Traversing Global Node: var node = { global: 'myGlobal', subscripts: ['d', 'e2', '' ] }; myGlobal("d","e2","f1")="bar1" myGlobal("d","e2","f2")="bar2" myGlobal("d","e2","f3")="bar3" "f1", "f2", "f3" "seed" value to start iterator Empty string Global Storage handling APIs
  • 42. Copyright © 2016 M/Gateway Developments Ltd Traversing Global Node: var node = { global: 'myGlobal', subscripts: ['d', 'e2', '' ] }; var subscript = this.db.order(node).result; // 'f1' myGlobal("d","e2","f1")="bar1" myGlobal("d","e2","f2")="bar2" myGlobal("d","e2","f3")="bar3" "f1", "f2", "f3" Global Storage handling APIs
  • 43. Copyright © 2016 M/Gateway Developments Ltd Traversing Global Node: var node = { global: 'myGlobal', subscripts: ['d', 'e2', '' ] }; var subscript = this.db.order(node).result; // 'f1' subscript = this.db.order(node).result; // 'f2' myGlobal("d","e2","f1")="bar1" myGlobal("d","e2","f2")="bar2" myGlobal("d","e2","f3")="bar3" "f1", "f2", "f3" Global Storage handling APIs
  • 44. Copyright © 2016 M/Gateway Developments Ltd Traversing Global Node: var node = { global: 'myGlobal', subscripts: ['d', 'e2', '' ] }; var subscript = this.db.order(node).result; // 'f1' subscript = this.db.order(node).result; // 'f2' subscript = this.db.order(node).result; // 'f3' myGlobal("d","e2","f1")="bar1" myGlobal("d","e2","f2")="bar2" myGlobal("d","e2","f3")="bar3" "f1", "f2", "f3" Global Storage handling APIs
  • 45. Copyright © 2016 M/Gateway Developments Ltd Traversing Global Node: var node = { global: 'myGlobal', subscripts: ['d', 'e2', '' ] }; var subscript = this.db.order(node).result; // 'f1' subscript = this.db.order(node).result; // 'f2' subscript = this.db.order(node).result; // 'f3' subscript = this.db.order(node).result; // '' myGlobal("d","e2","f1")="bar1" myGlobal("d","e2","f2")="bar2" myGlobal("d","e2","f3")="bar3" "f1", "f2", "f3" Global Storage handling APIs
  • 46. Copyright © 2016 M/Gateway Developments Ltd Traversing Global Node: var node = { global: 'myGlobal', subscripts: ['d', 'e2', 'f2' ] }; var subscript = this.db.order(node).result; // 'f3' myGlobal("d","e2","f1")="bar1" myGlobal("d","e2","f2")="bar2" myGlobal("d","e2","f3")="bar3" "f3" "seed" value to start iterator Start from f2 Global Storage handling APIs
  • 47. Copyright © 2016 M/Gateway Developments Ltd Traversing Global Node: var subscript = this.db.order(node).result; // 'f3' node is now: { global: 'myGlobal', subscripts: ['d', 'e2', 'f3' ] }; myGlobal("d","e2","f1")="bar1" myGlobal("d","e2","f2")="bar2" myGlobal("d","e2","f3")="bar3" Global Storage handling APIs
  • 48. Copyright © 2016 M/Gateway Developments Ltd Traversing Global Node: var node = { global: 'myGlobal', subscripts: ['d', 'e2', 'f2' ] }; var subscript = this.db.order(node).result; // 'f3' subscript = this.db.order(node).result; // '' myGlobal("d","e2","f1")="bar1" myGlobal("d","e2","f2")="bar2" myGlobal("d","e2","f3")="bar3" "" Global Storage handling APIs Empty string means no further subscripts, so traversal is complete
  • 49. Copyright © 2016 M/Gateway Developments Ltd Traversing Global Node – generic loop: var node = { global: 'myGlobal', subscripts: ['d', 'e2', '' ] }; var subscript; do { subscript = this.db.order(node).result; if (subscript !== '') console.log(subscript); } while (subscript !== ''); myGlobal("d","e2","f1")="bar1" myGlobal("d","e2","f2")="bar2" myGlobal("d","e2","f3")="bar3" "f1", "f2", "f3" Global Storage handling APIs
  • 50. Copyright © 2016 M/Gateway Developments Ltd The APIs are low-level • Deliberately designed to provide the basic means of access to Global Storage and nothing more • They assume you understand the mechanics of Global Storage • Too low-level for JavaScript development – Traversal, in particular, requires a lot of code • However, they can be abstracted to a more JavaScript-centric point of view – Which is the subject of the next part of this course