SlideShare ist ein Scribd-Unternehmen logo
1 von 81
Copyright © 2017 M/Gateway Developments Ltd
Having Your Node.js Cake
and Eating It Too
Rob Tweed
M/Gateway Developments Ltd
Twitter: @rtweed
http://qewdjs.com
Copyright © 2017 M/Gateway Developments Ltd
A bit of background
• Royal Marsden Hospital: 1980s
• Touche Ross Management Consultants
(now Deloitte): early 1990s
– NHS-wide Networking Project
• Independent consultant & software
developer since 1993
– Specialising in Web and associated
technologies, particularly in healthcare
Copyright © 2017 M/Gateway Developments Ltd
A bit of background
Copyright © 2017 M/Gateway Developments Ltd
A bit of background
• Node.js:
– Since August 2010 (v0.2 had just come out!)
– Gave one of the talks at LNUG inaugural
meeting
Copyright © 2017 M/Gateway Developments Ltd
And So, 6 Years Later
Copyright © 2017 M/Gateway Developments Ltd
Node.js Architecture
• Everything executes in a single process
– You might have 1000's of users doing stuff
concurrently
• They're all sharing the same process!
Copyright © 2017 M/Gateway Developments Ltd
Node.js Architecture
• Non-blocking I/O
– No user activity must block the process, or everyone
grinds to a halt
• Event-driven, asynchronous logic
– Fire off the request, but don't wait for the results
• Carry on with the next task
– When results come back, handle them at the next
opportunity
Copyright © 2017 M/Gateway Developments Ltd
Node.js = server-side JavaScript
• Ryan Dahl wasn't actually a big JavaScript fan
• However, he realised that it was a convenient
language for such an environment, as it's
designed for exactly the same kind of way of
working in the browser
• Google's V8 JavaScript engine was Open
Sourced, so he used it to provide the language
for Node.js
– (which is actually mostly written in C++)
Copyright © 2017 M/Gateway Developments Ltd
Asynchronous Syntax in Other Languages?
• Node.js isn't unique in supporting
asynchronous logic and non-blocking I/O
• Available also in most other modern
languages
– Java
– Python, etc
• Allows efficient use of resources when
making parallel requests for resources
– Files, external web services etc
Copyright © 2017 M/Gateway Developments Ltd
Asynchronous Syntax in Node.js
• Node.js is unique in that you have no
option but to use Asynchronous logic
Copyright © 2017 M/Gateway Developments Ltd
Drawbacks of Node.js
• In every other language, zealots will
encourage you to use it for everything!
• But even Node's greatest exponents will
tell you not to use it for certain things
Copyright © 2017 M/Gateway Developments Ltd
Drawbacks of Node.js
• Don't use Node.js if you have:
– CPU-intensive logic
– Complex database manipulation
• Particularly relational database handling
Copyright © 2017 M/Gateway Developments Ltd
Drawbacks of Node.js
• Don't use Node.js if you have:
– CPU-intensive logic
• Tie up the CPU and everyone else using the
process will be blocked
– Complex database manipulation
• Particularly relational database handling
Copyright © 2017 M/Gateway Developments Ltd
Drawbacks of Node.js
• Don't use Node.js if you have:
– CPU-intensive logic
– Complex database manipulation
• Particularly relational database handling
– Due to the limitations of asynchronous logic, eg you can't
chain functions
» Limits creation of very high-level database
abstractions
Copyright © 2017 M/Gateway Developments Ltd
Main criticism of newbies to Node.js
• Asynchronous logic
Copyright © 2017 M/Gateway Developments Ltd
Async is the New Sync?
• Node.js version 8 now supports
Async/Await which greatly improves the
syntax needed to handle asynchronous
logic
– Avoids "callback hell"
– Very like synchronous logic
Copyright © 2017 M/Gateway Developments Ltd
Async/Await Doesn't solve:
• Node.js concurrency
– Still need to avoid CPU-intensive code
• High-level database abstractions
– Proper chaining of functions requires
synchronous logic
Copyright © 2017 M/Gateway Developments Ltd
Usual Solutions
• Use a third-party queue to offload CPU-
intensive work to some other environment
– RabbitMQ
– ZeroMQ
• Use another language such as Rails for
database-intensive work
Copyright © 2017 M/Gateway Developments Ltd
The down-sides
• Heterogeneous environment
• Multiple skill-sets
• Multiple moving parts
Node.js
RabbitMQ
Rails
Java
Database
Copyright © 2017 M/Gateway Developments Ltd
What does Ryan Dahl Think?
Copyright © 2017 M/Gateway Developments Ltd
What does Ryan Dahl Think?
"..within a single process we could handle many requests
by being completely asynchronous. I believed strongly in
this idea at the time, but over the past couple of years,
I think that’s probably not the be-all and end-all idea for
programming."
Copyright © 2017 M/Gateway Developments Ltd
What does Ryan Dahl Think?
"..when I first started hearing about Go, which was around
2012, they had really easy to use abstractions, that make
"blocking I/O", because it’s all in green threads at the
interface between Go and the operating system.
I think it is actually all non-blocking I/O."
Copyright © 2017 M/Gateway Developments Ltd
What does Ryan Dahl Think?
"I think Node is not the best system to build a massive server
web. I would definitely use Go for that.
And honestly, that’s basically the reason why I left Node.
It was the realization that: oh, actually, this is not the best
server side system ever."
Copyright © 2017 M/Gateway Developments Ltd
What do I think?
I want to have my Node.js Cake and Eat it!
Copyright © 2017 M/Gateway Developments Ltd
I want my Node.js Cake & Eat it
• I like JavaScript
• I want just one language for everything
– 1 skill set
– 1 set of moving parts
• No extra technologies, thank you
– Keep it simple
• And I want to be able to use Node.js for all
situations
Copyright © 2017 M/Gateway Developments Ltd
The Problem is Concurrency
• All concurrent users in Node.js share the
same process
Copyright © 2017 M/Gateway Developments Ltd
The Problem is Concurrency
• All concurrent users in Node.js share the
same process
• As it happens, Amazon Web Services
accidentally created a solution
– And nobody (including AWS) seems to have
realised the consequences of what they've
done
Copyright © 2017 M/Gateway Developments Ltd
AWS Lambda
• "Function As A Service"
• AKA "Serverless"
Copyright © 2017 M/Gateway Developments Ltd
AWS Lambda
• "Function As A Service"
• AKA "Serverless"
• You upload functions
• AWS will execute them
– You don't worry about how or on what physical
machine(s)
• You pay per invocation of your function(s)
Copyright © 2017 M/Gateway Developments Ltd
AWS Lambda
• The first technology they supported was
Node.js
Copyright © 2017 M/Gateway Developments Ltd
AWS Concurrency?
• Your function will be invoked in a private
computation container of some sort
• Your function has that container all to itself
for the duration of its execution
• No competition with other concurrent
users
Copyright © 2017 M/Gateway Developments Ltd
Lambda Node.js Examples
• AWS examples show use of
asynchronous APIs
• Node.js users of Lambda use
asynchronous APIs and Async/Await
Copyright © 2017 M/Gateway Developments Ltd
Lambda Node.js Examples
• AWS examples show use of
asynchronous APIs
• Node.js users of Lambda use
asynchronous APIs and Async/Await
• But unless your Lambda function really
needs to be asynchronous, why use
asynchronous logic?
Copyright © 2017 M/Gateway Developments Ltd
Asynchronous Syntax in Other Languages?
• Available also in most other modern languages
– Java
– Python, etc
• Allows efficient use of resources when making
parallel requests for resources
– Files, external web services etc
• But no programmer in those languages
would use async logic if they didn't have to
Copyright © 2017 M/Gateway Developments Ltd
Async is the New Sync?
• Why would Node.js developers use
asynchronous logic in Lambda functions if
they don't have to?
– Partly because that's what you do, right?
Copyright © 2017 M/Gateway Developments Ltd
Async is the New Sync?
• Why would Node.js developers use
asynchronous logic in Lambda functions if
they don't have to?
– Partly because that's what you do, right?
– Partly because almost no synchronous APIs
exist, particularly for:
• Database integration
• Web/REST service access
Copyright © 2017 M/Gateway Developments Ltd
Such APIs are possible
Copyright © 2017 M/Gateway Developments Ltd
Such APIs are possible
Copyright © 2017 M/Gateway Developments Ltd
Any other way…
• To have your Node.js cake and eat it?
– Not everyone will want to use Lambda
• Would it be possible to create a locally-
available environment where my Node.js
code runs in an isolated container where
concurrency isn't an issue?
Copyright © 2017 M/Gateway Developments Ltd
Copyright © 2017 M/Gateway Developments Ltd
What Is QEWD?
• Essentially it's a multi-purpose Node.js-
based run-time Platform
Copyright © 2017 M/Gateway Developments Ltd
What Is QEWD?
• Essentially it's a multi-purpose Node.js-
based run-time Platform
• Creates an isolated run-time container for
your message/request handler functions,
allowing:
– CPU-intensive work
– Database abstractions using synchronous
logic
Copyright © 2017 M/Gateway Developments Ltd
QEWD's Architecture
• Master Process
• Pool of Worker Processes
Copyright © 2017 M/Gateway Developments Ltd
QEWD's Architecture
• Master Process
– Handles and queues all incoming requests
from client
• HTTP/REST requests via Express or Koa.js
• WebSocket requests via socket.io
– Returns responses to client
Copyright © 2017 M/Gateway Developments Ltd
QEWD's Architecture
• Pool of Persistent Worker Processes
– Where all the processing occurs
– A single queued request is dispatched to an
available worker process
– Each Worker process handles a single
request at a time
Copyright © 2017 M/Gateway Developments Ltd
QEWD's Architecture
• The queue / dispatcher / worker-process
pool management part of QEWD is
handled by a module named ewd-qoper8
Copyright © 2017 M/Gateway Developments Ltd
Master Node.js Process
Queue
Queue
processor/
dispatcher
Incoming
Requests
QEWD Architecture
Every incoming request
is passed from Express
and placed in a queue
No further processing
of requests occurs in
the master process
Express
or
Koa.js
socket.io
HTTP
REST
WebSocket
Copyright © 2017 M/Gateway Developments Ltd
QEWD Architecture
Master Node.js Process
Queue
Queue
processor/
dispatcher
Queue dispatcher is
invoked whenever a
request is added to
the queue
Copyright © 2017 M/Gateway Developments Ltd
QEWD Architecture
Node.js Worker Process
Master Node.js Process
Queue
Queue
processor/
dispatcher
Worker process
started if none
available
Copyright © 2017 M/Gateway Developments Ltd
QEWD Architecture
Node.js Worker Process
Master Node.js Process
Queue
Queue
processor/
dispatcher
Redis/Cache/GT.M
QEWD &
application-specific
Modules loaded
Custom
Worker
Module
Custom
Worker
Module
Copyright © 2017 M/Gateway Developments Ltd
QEWD Architecture
Node.js Worker Process
Master Node.js Process
Queue
Queue
processor/
dispatcher
Custom
Worker
Module
Node.js Worker Process
Custom
Worker
Module
Request passed
to worker
Redis/Cache/GT.M
Copyright © 2017 M/Gateway Developments Ltd
QEWD Architecture
Node.js Worker Process
Master Node.js Process
Queue
Queue
processor/
dispatcher
Custom
Worker
Module
Worker flagged as Unavailable
Node.js Worker Process
Custom
Worker
Module
Begin processing message
Redis/Cache/GT.M
Copyright © 2017 M/Gateway Developments Ltd
QEWD Architecture
Master Node.js Process
Queue
Queue
processor/
dispatcher
Unavailable / processing
Another incoming
request Node.js Worker Process
Custom
Worker
Module
Node.js Worker Process
Custom
Worker
Module
Redis/Cache/GT.M
Copyright © 2017 M/Gateway Developments Ltd
QEWD Architecture
Node.js Worker Process
Master Node.js Process
Queue
Queue
processor/
dispatcher
Custom
Worker
Module
Unavailable / processing
Node.js Worker Process
Custom
Worker
Module
Node.js Worker Process
Custom
Worker
Module
Node.js Worker Process
Custom
Worker
Module
If worker pool size not exceeded,
another worker is started
and request passed to it
Redis/Cache/GT.M
Redis/Cache/GT.M
Copyright © 2017 M/Gateway Developments Ltd
QEWD Architecture
Master Node.js Process
Queue
Queue
processor/
dispatcher
Unavailable / processing
Node.js Worker Process
Custom
Worker
Module
Node.js Worker Process
Custom
Worker
Module
Redis/Cache/GT.M
If entire Worker Pool is busy:
Unavailable / processing
Node.js Worker Process
Custom
Worker
Module
Node.js Worker Process
Custom
Worker
Module
Redis/Cache/GT.M
Unavailable / processing
Node.js Worker Process
Custom
Worker
Module
Node.js Worker Process
Custom
Worker
Module
Redis/Cache/GT.M
Copyright © 2017 M/Gateway Developments Ltd
QEWD Architecture
Master Node.js Process
Queue
Queue
processor/
dispatcher
If entire Worker Pool is busy:
New
requests
remain
in queue
Unavailable / processing
Node.js Worker Process
Custom
Worker
Module
Node.js Worker Process
Custom
Worker
Module
Redis/Cache/GT.M
Unavailable / processing
Node.js Worker Process
Custom
Worker
Module
Node.js Worker Process
Custom
Worker
Module
Redis/Cache/GT.M
Unavailable / processing
Node.js Worker Process
Custom
Worker
Module
Node.js Worker Process
Custom
Worker
Module
Redis/Cache/GT.M
Copyright © 2017 M/Gateway Developments Ltd
QEWD Architecture
Master Node.js Process
Queue
Queue
processor/
dispatcher
Unavailable / processing
Node.js Worker Process
Custom
Worker
Module
Node.js Worker Process
Custom
Worker
Module
Redis/Cache/GT.M
As soon as a worker is available again,
a queued message can be passed to it
Unavailable / processing
Node.js Worker Process
Custom
Worker
Module
Node.js Worker Process
Custom
Worker
Module
Redis/Cache/GT.M
Available
Node.js Worker Process
Custom
Worker
Module
Redis/Cache/GT.M
Copyright © 2017 M/Gateway Developments Ltd
QEWD Architecture
Master Node.js Process
Queue
Queue
processor/
dispatcher
Finished
Node.js Worker Process
Custom
Worker
Module
Node.js Worker Process
Custom
Worker
Module
Node.js Worker Process
Custom
Worker
Module
Redis/Cache/GT.M
A user's handler function signals
completion using the function:
finished(responseObject);
This returns the response
object to the master
process
Copyright © 2017 M/Gateway Developments Ltd
QEWD Architecture
Master Node.js Process
Queue
Queue
processor/
dispatcher
Finished
Node.js Worker Process
Custom
Worker
Module
Node.js Worker Process
Custom
Worker
Module
Node.js Worker Process
Custom
Worker
Module
And the response is
returned to the client
that sent the original request
(via Express/Koa/socket.io)
Redis/Cache/GT.M
Copyright © 2017 M/Gateway Developments Ltd
QEWD Architecture
Master Node.js Process
Queue
Queue
processor/
dispatcher
Available
Node.js Worker Process
Custom
Worker
Module
The finished() function
also automatically returns
the worker process back
to the available pool
So it can now handle
the next queued request
Redis/Cache/GT.M
Copyright © 2017 M/Gateway Developments Ltd
QEWD Architecture
Master Node.js Process
Queue
Queue
processor/
dispatcher
Available
Node.js Worker Process
Custom
Worker
Module
Worker processes, once started,
are persistent
No start-up / tear-down cost
Redis/Cache/GT.M
Copyright © 2017 M/Gateway Developments Ltd
QEWD Architecture
Master Node.js Process
Queue
Queue
processor/
dispatcher
Node.js concurrency is handled
by the master process.
100% asynchronous logic
The master process does
almost nothing
The perfect Node.js application:
no CPU-intensive or long-
running tasks, so very
high-performance
Multiple
Concurrent
Incoming
requests
Copyright © 2017 M/Gateway Developments Ltd
QEWD Architecture
Master Node.js Process
Queue
Queue
processor/
dispatcher
Node.js concurrency is handled
by the master process.
100% asynchronous logic
The master process does
almost nothing
The perfect Node.js application:
no CPU-intensive or long-
running tasks, so very
high-performance
All the actual work happens in the
isolated worker processes
Multiple
Concurrent
Incoming
requests
Copyright © 2017 M/Gateway Developments Ltd
QEWD Architecture
Master Node.js Process
Queue
Queue
processor/
dispatcher
Available
Node.js Worker Process
Custom
Worker
Module
Worker processes only handle
a single request at a time
Completely isolated run-time
environment for handler functions
No need for concerns about
Node.js concurrency, so
synchronous APIs can be used
Redis/Cache/GT.M
Copyright © 2017 M/Gateway Developments Ltd
QEWD Architecture
Master Node.js Process
Queue
Queue
processor/
dispatcher
Available
Node.js Worker Process
Custom
Worker
Module
Redis/Cache/GT.M
Long-running or CPU-intensive
logic has no direct impact on
other worker processes
Copyright © 2017 M/Gateway Developments Ltd
Why not just use child_process?
• To avoid the very high performance cost
of starting and tearing down each child
process
– At least 30ms to start a child_process
• Each QEWD worker is a child_process
– But keeps running, and is re-used
Copyright © 2017 M/Gateway Developments Ltd
Why not just use Cluster?
• Cluster simply spreads the concurrent
requests across a pool of persistent
child_processes
– If one of them is CPU intensive, all other
requests in that cluster are held up
• QEWD forces each child_process to
handle a single request only
– Creates an isolated run-time environment for
each request
Copyright © 2017 M/Gateway Developments Ltd
Why not just use RabbitMQ or ZeroMQ?
• I just want to just use a single technology:
Node.js / JavaScript
• Initial tests showed no performance
benefit in using ZeroMQ
Copyright © 2017 M/Gateway Developments Ltd
Performance?
• ewd-qoper8 module in isolation:
– Handles the queue/master/worker architecture
• Raspberry Pi 3 Model B
– 4 core CPU
– Readily-available commodity item
– Low-cost
• Easily-replicable benchmark
Copyright © 2017 M/Gateway Developments Ltd
Performance
• ewd-qoper8 benchmark script provided:
– How many workers? 3
– How many messages? 500,000
– Create a steady state of messages added to
the queue as they're being processed:
• Add a batch of 622 messages at a time
• Wait 100ms between each batch
– Messages are sent to workers which echo
them straight back
Copyright © 2017 M/Gateway Developments Ltd
Performance
• 5,800 messages/second sustained
throughput
• Limiting factor is master process hitting
100% CPU
• Workers only 30% CPU, so plenty of
capacity to do real work at this rate
Copyright © 2017 M/Gateway Developments Ltd
What can QEWD be Used For?
• Full-stack platform for browser & Native
mobile applications
– WebSocket or Ajax messaging
• Seamlessly swap between transports
• All automated and abstracted out of the way
– With security also automated for you too
Copyright © 2017 M/Gateway Developments Ltd
What can QEWD be Used For?
• API server for REST applications
• Optional session management
– Automated token-based authentication
– Server-side (persistent JSON) session storage
• Or automated JSON Web Token based:
– Authentication
– Client-side session storage
Copyright © 2017 M/Gateway Developments Ltd
What can QEWD be Used For?
• MicroService Platform
– With each MicroService supported by its own
shared or dedicated QEWD server
– Using JWTs
• Shared secret on each QEWD server
– Using socket.io to provide high-performance,
persistent connections between QEWD
servers
• Secured over HTTPS if required
Copyright © 2017 M/Gateway Developments Ltd
QEWD MicroService Fabric
ewd-qoper8
queue
Express
Node.js
socket.io
Cache
GT.M,
YottaDB
Redis
Node.js
Worker
Process
Cache
GT.M,
YottaDB
Redis
Node.js
Worker
Process
Cache
GT.M,
YottaDB
Redis
Node.js
Worker
Process
ewd-qoper8
queue
Express
Node.js
socket.io
Cache
GT.M,
YottaDB
Redis
Node.js
Worker
Process
Cache
GT.M,
YottaDB
Redis
Node.js
Worker
Process
Cache
GT.M,
YottaDB
Redis
Node.js
Worker
Process
ewd-qoper8
queue
Express
Node.js
socket.io
Cache
GT.M,
YottaDB
Redis
Node.js
Worker
Process
Cache
GT.M,
YottaDB
Redis
Node.js
Worker
Process
Cache
GT.M,
YottaDB
Redis
Node.js
Worker
Process
User authentication
Demographics
Pharmacy
ewd-qoper8
queue
Express
Node.js
socket.io
Cache
GT.M,
YottaDB
Redis
Node.js
Worker
Process
Cache
GT.M,
YottaDB
Redis
Node.js
Worker
Process
Cache
GT.M,
YottaDB
Redis
Node.js
Worker
Process
Client Orchestration
HTTPS
WebSocket
Connections
Copyright © 2017 M/Gateway Developments Ltd
What can QEWD be Used For?
• Federation platform
– Providing a REST or WebSocket-based
middle tier to multiple REST-based back-end
servers
• of any type, not just QEWD servers
– One request in
• Routed to all back-end systems and responses
combined
• Performing a "dance" between federated servers
Copyright © 2017 M/Gateway Developments Ltd
Federated Access to OpenEHR
Browser QEWD
GT.M or
Redis
ewd-qoper8
queue
qewd-ripple
Module
Express
OpenEHR
Server
AQL over
HTTP(S)
Worker
PulseTile
UI
OpenEHR
Server
Copyright © 2017 M/Gateway Developments Ltd
What can QEWD be Used For?
• Interface to particular databases known as
Global Storage databases
– GT.M / YottaDB
– Cache / IRIS
– Redis (ewd-globals-redis module)
• All of which are abstracted as:
– Persistent JavaScript Objects
– Fine-grained Document Database
• Accessible at any level down to individual name/value pair
anywhere in a JSON object
Copyright © 2017 M/Gateway Developments Ltd
QEWD.js
• Resilient / Audit mode
– When enabled, permanent record kept in the
database of:
• Queued requests
• Processing status
• Response(s)
– If QEWD restarted, database is examined for queued,
unprocessed requests
• Automatically re-queued
– Can specify retention period of database records
Copyright © 2017 M/Gateway Developments Ltd
QEWD.js
• Supports all browser-side JavaScript
frameworks
• Some cool 3rd
-party tooling and support
available for React and Vue.js
Copyright © 2017 M/Gateway Developments Ltd
Have Your Node.js Cake
And Eat It Too
http://qewdjs.com

Weitere ähnliche Inhalte

Was ist angesagt?

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 FunctionalityRob Tweed
 
EWD.js: The Future Starts Here
EWD.js: The Future Starts HereEWD.js: The Future Starts Here
EWD.js: The Future Starts HereRob 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 OverviewRob 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 QEWDRob Tweed
 
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 ApplicationsRob Tweed
 
EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle
EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging CycleEWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle
EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging CycleRob 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 CORSRob 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 ApplianceRob 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 QEWDRob 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 ModeRob 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 ModulesRob 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 ServicesRob 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 SessionRob 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 28: Integrating Legacy Mumps Code with QEWD
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWDEWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWDRob Tweed
 
Nuts and Bolts of WebSocket Devoxx 2014
Nuts and Bolts of WebSocket Devoxx 2014Nuts and Bolts of WebSocket Devoxx 2014
Nuts and Bolts of WebSocket Devoxx 2014Arun Gupta
 
EWD 3 Training Course Part 19: The cache.node APIs
EWD 3 Training Course Part 19: The cache.node APIsEWD 3 Training Course Part 19: The cache.node APIs
EWD 3 Training Course Part 19: The cache.node APIsRob Tweed
 
EWD 3 Training Course Part 14: Using Ajax for QEWD Messages
EWD 3 Training Course Part 14: Using Ajax for QEWD MessagesEWD 3 Training Course Part 14: Using Ajax for QEWD Messages
EWD 3 Training Course Part 14: Using Ajax for QEWD MessagesRob Tweed
 
Docker for Java Developers
Docker for Java DevelopersDocker for Java Developers
Docker for Java DevelopersImesh Gunaratne
 
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 LockingRob Tweed
 

Was ist angesagt? (20)

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.js: The Future Starts Here
EWD.js: The Future Starts HereEWD.js: The Future Starts Here
EWD.js: The Future Starts Here
 
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 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 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 8: Anatomy of the QEWD Messaging Cycle
EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging CycleEWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle
EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle
 
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
 
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
 
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 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 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 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 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 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 28: Integrating Legacy Mumps Code with QEWD
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWDEWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
 
Nuts and Bolts of WebSocket Devoxx 2014
Nuts and Bolts of WebSocket Devoxx 2014Nuts and Bolts of WebSocket Devoxx 2014
Nuts and Bolts of WebSocket Devoxx 2014
 
EWD 3 Training Course Part 19: The cache.node APIs
EWD 3 Training Course Part 19: The cache.node APIsEWD 3 Training Course Part 19: The cache.node APIs
EWD 3 Training Course Part 19: The cache.node APIs
 
EWD 3 Training Course Part 14: Using Ajax for QEWD Messages
EWD 3 Training Course Part 14: Using Ajax for QEWD MessagesEWD 3 Training Course Part 14: Using Ajax for QEWD Messages
EWD 3 Training Course Part 14: Using Ajax for QEWD Messages
 
Docker for Java Developers
Docker for Java DevelopersDocker for Java Developers
Docker for Java Developers
 
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
 

Ähnlich wie LNUG: Having Your Node.js Cake and Eating It Too

Move Your .NET Apps to AWS Without Betting the House - WIN303 - re:Invent 2017
Move Your .NET Apps to AWS Without Betting the House - WIN303 - re:Invent 2017Move Your .NET Apps to AWS Without Betting the House - WIN303 - re:Invent 2017
Move Your .NET Apps to AWS Without Betting the House - WIN303 - re:Invent 2017Amazon Web Services
 
Node.Js: Basics Concepts and Introduction
Node.Js: Basics Concepts and Introduction Node.Js: Basics Concepts and Introduction
Node.Js: Basics Concepts and Introduction Kanika Gera
 
InterConnect 2017 : Programming languages in the enterprise: Which language s...
InterConnect 2017 : Programming languages in the enterprise: Which language s...InterConnect 2017 : Programming languages in the enterprise: Which language s...
InterConnect 2017 : Programming languages in the enterprise: Which language s...DevOps for Enterprise Systems
 
.NET vs. Node.js: What to Choose for Web Development
.NET vs. Node.js: What to Choose for Web Development.NET vs. Node.js: What to Choose for Web Development
.NET vs. Node.js: What to Choose for Web DevelopmentDashTechnologiesInc
 
Top 10 frameworks of node js
Top 10 frameworks of node jsTop 10 frameworks of node js
Top 10 frameworks of node jsHabilelabs
 
Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++Ethan Ram
 
What is Node.js_ Where, When & How To Use It.pdf
What is Node.js_ Where, When & How To Use It.pdfWhat is Node.js_ Where, When & How To Use It.pdf
What is Node.js_ Where, When & How To Use It.pdfSmith Daniel
 
Node.js and .NET Core.pdf
Node.js and .NET Core.pdfNode.js and .NET Core.pdf
Node.js and .NET Core.pdfAppdeveloper10
 
Net core vs. node.js what to choose when
Net core vs. node.js  what to choose when Net core vs. node.js  what to choose when
Net core vs. node.js what to choose when Katy Slemon
 
The Positive and Negative Aspects of Node.js Web App Development.pdf
The Positive and Negative Aspects of Node.js Web App Development.pdfThe Positive and Negative Aspects of Node.js Web App Development.pdf
The Positive and Negative Aspects of Node.js Web App Development.pdfWDP Technologies
 
Node js installation steps.pptx slide share ppts
Node js installation steps.pptx slide share pptsNode js installation steps.pptx slide share ppts
Node js installation steps.pptx slide share pptsHemaSenthil5
 
Node.js Web Development.pdf
Node.js Web Development.pdfNode.js Web Development.pdf
Node.js Web Development.pdfSonia Simi
 
Brownbag on basics of node.js
Brownbag on basics of node.jsBrownbag on basics of node.js
Brownbag on basics of node.jsJason Park
 
A295 nodejs-knowledge-accelerator
A295   nodejs-knowledge-acceleratorA295   nodejs-knowledge-accelerator
A295 nodejs-knowledge-acceleratorMichael Dawson
 
Node js Development Company - Aparajayah
Node js Development Company - AparajayahNode js Development Company - Aparajayah
Node js Development Company - AparajayahAparajayahTechnologi
 
Node.js and Enterprise Web Apps: Know all About it
Node.js and Enterprise Web Apps: Know all About itNode.js and Enterprise Web Apps: Know all About it
Node.js and Enterprise Web Apps: Know all About itFibonalabs
 

Ähnlich wie LNUG: Having Your Node.js Cake and Eating It Too (20)

Move Your .NET Apps to AWS Without Betting the House - WIN303 - re:Invent 2017
Move Your .NET Apps to AWS Without Betting the House - WIN303 - re:Invent 2017Move Your .NET Apps to AWS Without Betting the House - WIN303 - re:Invent 2017
Move Your .NET Apps to AWS Without Betting the House - WIN303 - re:Invent 2017
 
Node.Js: Basics Concepts and Introduction
Node.Js: Basics Concepts and Introduction Node.Js: Basics Concepts and Introduction
Node.Js: Basics Concepts and Introduction
 
InterConnect 2017 : Programming languages in the enterprise: Which language s...
InterConnect 2017 : Programming languages in the enterprise: Which language s...InterConnect 2017 : Programming languages in the enterprise: Which language s...
InterConnect 2017 : Programming languages in the enterprise: Which language s...
 
.NET vs. Node.js: What to Choose for Web Development
.NET vs. Node.js: What to Choose for Web Development.NET vs. Node.js: What to Choose for Web Development
.NET vs. Node.js: What to Choose for Web Development
 
Top 10 frameworks of node js
Top 10 frameworks of node jsTop 10 frameworks of node js
Top 10 frameworks of node js
 
NodeJS and what is actually does
NodeJS and what is actually doesNodeJS and what is actually does
NodeJS and what is actually does
 
Node ts1
Node ts1Node ts1
Node ts1
 
Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++
 
What is Node.js_ Where, When & How To Use It.pdf
What is Node.js_ Where, When & How To Use It.pdfWhat is Node.js_ Where, When & How To Use It.pdf
What is Node.js_ Where, When & How To Use It.pdf
 
Node.js and .NET Core.pdf
Node.js and .NET Core.pdfNode.js and .NET Core.pdf
Node.js and .NET Core.pdf
 
Net core vs. node.js what to choose when
Net core vs. node.js  what to choose when Net core vs. node.js  what to choose when
Net core vs. node.js what to choose when
 
The Positive and Negative Aspects of Node.js Web App Development.pdf
The Positive and Negative Aspects of Node.js Web App Development.pdfThe Positive and Negative Aspects of Node.js Web App Development.pdf
The Positive and Negative Aspects of Node.js Web App Development.pdf
 
Node js installation steps.pptx slide share ppts
Node js installation steps.pptx slide share pptsNode js installation steps.pptx slide share ppts
Node js installation steps.pptx slide share ppts
 
Node.js Web Development.pdf
Node.js Web Development.pdfNode.js Web Development.pdf
Node.js Web Development.pdf
 
New DevOps for the DBA
New DevOps for the DBANew DevOps for the DBA
New DevOps for the DBA
 
Brownbag on basics of node.js
Brownbag on basics of node.jsBrownbag on basics of node.js
Brownbag on basics of node.js
 
A295 nodejs-knowledge-accelerator
A295   nodejs-knowledge-acceleratorA295   nodejs-knowledge-accelerator
A295 nodejs-knowledge-accelerator
 
Node js Development Company - Aparajayah
Node js Development Company - AparajayahNode js Development Company - Aparajayah
Node js Development Company - Aparajayah
 
Node.js and Enterprise Web Apps: Know all About it
Node.js and Enterprise Web Apps: Know all About itNode.js and Enterprise Web Apps: Know all About it
Node.js and Enterprise Web Apps: Know all About it
 
Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.js
 

Mehr von 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 ServicesRob 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 5Rob 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 4Rob 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 3Rob 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 ApplicationRob 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 2Rob 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 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/HTTPSRob Tweed
 
EWD 3 Training Course Part 29: Running QEWD as a Service
EWD 3 Training Course Part 29: Running QEWD as a ServiceEWD 3 Training Course Part 29: Running QEWD as a Service
EWD 3 Training Course Part 29: Running QEWD as a ServiceRob 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 IndexingRob 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 CapabilitiesRob 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 NodesRob Tweed
 
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode Objects
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode ObjectsEWD 3 Training Course Part 23: Traversing a Range using DocumentNode Objects
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode ObjectsRob Tweed
 

Mehr von Rob Tweed (13)

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
 
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 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 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
 
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 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 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
 
EWD 3 Training Course Part 29: Running QEWD as a Service
EWD 3 Training Course Part 29: Running QEWD as a ServiceEWD 3 Training Course Part 29: Running QEWD as a Service
EWD 3 Training Course Part 29: Running QEWD as a Service
 
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 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 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 23: Traversing a Range using DocumentNode Objects
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode ObjectsEWD 3 Training Course Part 23: Traversing a Range using DocumentNode Objects
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode Objects
 

Kürzlich hochgeladen

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...software pro Development
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 

Kürzlich hochgeladen (20)

Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 

LNUG: Having Your Node.js Cake and Eating It Too

  • 1. Copyright © 2017 M/Gateway Developments Ltd Having Your Node.js Cake and Eating It Too Rob Tweed M/Gateway Developments Ltd Twitter: @rtweed http://qewdjs.com
  • 2. Copyright © 2017 M/Gateway Developments Ltd A bit of background • Royal Marsden Hospital: 1980s • Touche Ross Management Consultants (now Deloitte): early 1990s – NHS-wide Networking Project • Independent consultant & software developer since 1993 – Specialising in Web and associated technologies, particularly in healthcare
  • 3. Copyright © 2017 M/Gateway Developments Ltd A bit of background
  • 4. Copyright © 2017 M/Gateway Developments Ltd A bit of background • Node.js: – Since August 2010 (v0.2 had just come out!) – Gave one of the talks at LNUG inaugural meeting
  • 5. Copyright © 2017 M/Gateway Developments Ltd And So, 6 Years Later
  • 6. Copyright © 2017 M/Gateway Developments Ltd Node.js Architecture • Everything executes in a single process – You might have 1000's of users doing stuff concurrently • They're all sharing the same process!
  • 7. Copyright © 2017 M/Gateway Developments Ltd Node.js Architecture • Non-blocking I/O – No user activity must block the process, or everyone grinds to a halt • Event-driven, asynchronous logic – Fire off the request, but don't wait for the results • Carry on with the next task – When results come back, handle them at the next opportunity
  • 8. Copyright © 2017 M/Gateway Developments Ltd Node.js = server-side JavaScript • Ryan Dahl wasn't actually a big JavaScript fan • However, he realised that it was a convenient language for such an environment, as it's designed for exactly the same kind of way of working in the browser • Google's V8 JavaScript engine was Open Sourced, so he used it to provide the language for Node.js – (which is actually mostly written in C++)
  • 9. Copyright © 2017 M/Gateway Developments Ltd Asynchronous Syntax in Other Languages? • Node.js isn't unique in supporting asynchronous logic and non-blocking I/O • Available also in most other modern languages – Java – Python, etc • Allows efficient use of resources when making parallel requests for resources – Files, external web services etc
  • 10. Copyright © 2017 M/Gateway Developments Ltd Asynchronous Syntax in Node.js • Node.js is unique in that you have no option but to use Asynchronous logic
  • 11. Copyright © 2017 M/Gateway Developments Ltd Drawbacks of Node.js • In every other language, zealots will encourage you to use it for everything! • But even Node's greatest exponents will tell you not to use it for certain things
  • 12. Copyright © 2017 M/Gateway Developments Ltd Drawbacks of Node.js • Don't use Node.js if you have: – CPU-intensive logic – Complex database manipulation • Particularly relational database handling
  • 13. Copyright © 2017 M/Gateway Developments Ltd Drawbacks of Node.js • Don't use Node.js if you have: – CPU-intensive logic • Tie up the CPU and everyone else using the process will be blocked – Complex database manipulation • Particularly relational database handling
  • 14. Copyright © 2017 M/Gateway Developments Ltd Drawbacks of Node.js • Don't use Node.js if you have: – CPU-intensive logic – Complex database manipulation • Particularly relational database handling – Due to the limitations of asynchronous logic, eg you can't chain functions » Limits creation of very high-level database abstractions
  • 15. Copyright © 2017 M/Gateway Developments Ltd Main criticism of newbies to Node.js • Asynchronous logic
  • 16. Copyright © 2017 M/Gateway Developments Ltd Async is the New Sync? • Node.js version 8 now supports Async/Await which greatly improves the syntax needed to handle asynchronous logic – Avoids "callback hell" – Very like synchronous logic
  • 17. Copyright © 2017 M/Gateway Developments Ltd Async/Await Doesn't solve: • Node.js concurrency – Still need to avoid CPU-intensive code • High-level database abstractions – Proper chaining of functions requires synchronous logic
  • 18. Copyright © 2017 M/Gateway Developments Ltd Usual Solutions • Use a third-party queue to offload CPU- intensive work to some other environment – RabbitMQ – ZeroMQ • Use another language such as Rails for database-intensive work
  • 19. Copyright © 2017 M/Gateway Developments Ltd The down-sides • Heterogeneous environment • Multiple skill-sets • Multiple moving parts Node.js RabbitMQ Rails Java Database
  • 20. Copyright © 2017 M/Gateway Developments Ltd What does Ryan Dahl Think?
  • 21. Copyright © 2017 M/Gateway Developments Ltd What does Ryan Dahl Think? "..within a single process we could handle many requests by being completely asynchronous. I believed strongly in this idea at the time, but over the past couple of years, I think that’s probably not the be-all and end-all idea for programming."
  • 22. Copyright © 2017 M/Gateway Developments Ltd What does Ryan Dahl Think? "..when I first started hearing about Go, which was around 2012, they had really easy to use abstractions, that make "blocking I/O", because it’s all in green threads at the interface between Go and the operating system. I think it is actually all non-blocking I/O."
  • 23. Copyright © 2017 M/Gateway Developments Ltd What does Ryan Dahl Think? "I think Node is not the best system to build a massive server web. I would definitely use Go for that. And honestly, that’s basically the reason why I left Node. It was the realization that: oh, actually, this is not the best server side system ever."
  • 24. Copyright © 2017 M/Gateway Developments Ltd What do I think? I want to have my Node.js Cake and Eat it!
  • 25. Copyright © 2017 M/Gateway Developments Ltd I want my Node.js Cake & Eat it • I like JavaScript • I want just one language for everything – 1 skill set – 1 set of moving parts • No extra technologies, thank you – Keep it simple • And I want to be able to use Node.js for all situations
  • 26. Copyright © 2017 M/Gateway Developments Ltd The Problem is Concurrency • All concurrent users in Node.js share the same process
  • 27. Copyright © 2017 M/Gateway Developments Ltd The Problem is Concurrency • All concurrent users in Node.js share the same process • As it happens, Amazon Web Services accidentally created a solution – And nobody (including AWS) seems to have realised the consequences of what they've done
  • 28. Copyright © 2017 M/Gateway Developments Ltd AWS Lambda • "Function As A Service" • AKA "Serverless"
  • 29. Copyright © 2017 M/Gateway Developments Ltd AWS Lambda • "Function As A Service" • AKA "Serverless" • You upload functions • AWS will execute them – You don't worry about how or on what physical machine(s) • You pay per invocation of your function(s)
  • 30. Copyright © 2017 M/Gateway Developments Ltd AWS Lambda • The first technology they supported was Node.js
  • 31. Copyright © 2017 M/Gateway Developments Ltd AWS Concurrency? • Your function will be invoked in a private computation container of some sort • Your function has that container all to itself for the duration of its execution • No competition with other concurrent users
  • 32. Copyright © 2017 M/Gateway Developments Ltd Lambda Node.js Examples • AWS examples show use of asynchronous APIs • Node.js users of Lambda use asynchronous APIs and Async/Await
  • 33. Copyright © 2017 M/Gateway Developments Ltd Lambda Node.js Examples • AWS examples show use of asynchronous APIs • Node.js users of Lambda use asynchronous APIs and Async/Await • But unless your Lambda function really needs to be asynchronous, why use asynchronous logic?
  • 34. Copyright © 2017 M/Gateway Developments Ltd Asynchronous Syntax in Other Languages? • Available also in most other modern languages – Java – Python, etc • Allows efficient use of resources when making parallel requests for resources – Files, external web services etc • But no programmer in those languages would use async logic if they didn't have to
  • 35. Copyright © 2017 M/Gateway Developments Ltd Async is the New Sync? • Why would Node.js developers use asynchronous logic in Lambda functions if they don't have to? – Partly because that's what you do, right?
  • 36. Copyright © 2017 M/Gateway Developments Ltd Async is the New Sync? • Why would Node.js developers use asynchronous logic in Lambda functions if they don't have to? – Partly because that's what you do, right? – Partly because almost no synchronous APIs exist, particularly for: • Database integration • Web/REST service access
  • 37. Copyright © 2017 M/Gateway Developments Ltd Such APIs are possible
  • 38. Copyright © 2017 M/Gateway Developments Ltd Such APIs are possible
  • 39. Copyright © 2017 M/Gateway Developments Ltd Any other way… • To have your Node.js cake and eat it? – Not everyone will want to use Lambda • Would it be possible to create a locally- available environment where my Node.js code runs in an isolated container where concurrency isn't an issue?
  • 40. Copyright © 2017 M/Gateway Developments Ltd
  • 41. Copyright © 2017 M/Gateway Developments Ltd What Is QEWD? • Essentially it's a multi-purpose Node.js- based run-time Platform
  • 42. Copyright © 2017 M/Gateway Developments Ltd What Is QEWD? • Essentially it's a multi-purpose Node.js- based run-time Platform • Creates an isolated run-time container for your message/request handler functions, allowing: – CPU-intensive work – Database abstractions using synchronous logic
  • 43. Copyright © 2017 M/Gateway Developments Ltd QEWD's Architecture • Master Process • Pool of Worker Processes
  • 44. Copyright © 2017 M/Gateway Developments Ltd QEWD's Architecture • Master Process – Handles and queues all incoming requests from client • HTTP/REST requests via Express or Koa.js • WebSocket requests via socket.io – Returns responses to client
  • 45. Copyright © 2017 M/Gateway Developments Ltd QEWD's Architecture • Pool of Persistent Worker Processes – Where all the processing occurs – A single queued request is dispatched to an available worker process – Each Worker process handles a single request at a time
  • 46. Copyright © 2017 M/Gateway Developments Ltd QEWD's Architecture • The queue / dispatcher / worker-process pool management part of QEWD is handled by a module named ewd-qoper8
  • 47. Copyright © 2017 M/Gateway Developments Ltd Master Node.js Process Queue Queue processor/ dispatcher Incoming Requests QEWD Architecture Every incoming request is passed from Express and placed in a queue No further processing of requests occurs in the master process Express or Koa.js socket.io HTTP REST WebSocket
  • 48. Copyright © 2017 M/Gateway Developments Ltd QEWD Architecture Master Node.js Process Queue Queue processor/ dispatcher Queue dispatcher is invoked whenever a request is added to the queue
  • 49. Copyright © 2017 M/Gateway Developments Ltd QEWD Architecture Node.js Worker Process Master Node.js Process Queue Queue processor/ dispatcher Worker process started if none available
  • 50. Copyright © 2017 M/Gateway Developments Ltd QEWD Architecture Node.js Worker Process Master Node.js Process Queue Queue processor/ dispatcher Redis/Cache/GT.M QEWD & application-specific Modules loaded Custom Worker Module Custom Worker Module
  • 51. Copyright © 2017 M/Gateway Developments Ltd QEWD Architecture Node.js Worker Process Master Node.js Process Queue Queue processor/ dispatcher Custom Worker Module Node.js Worker Process Custom Worker Module Request passed to worker Redis/Cache/GT.M
  • 52. Copyright © 2017 M/Gateway Developments Ltd QEWD Architecture Node.js Worker Process Master Node.js Process Queue Queue processor/ dispatcher Custom Worker Module Worker flagged as Unavailable Node.js Worker Process Custom Worker Module Begin processing message Redis/Cache/GT.M
  • 53. Copyright © 2017 M/Gateway Developments Ltd QEWD Architecture Master Node.js Process Queue Queue processor/ dispatcher Unavailable / processing Another incoming request Node.js Worker Process Custom Worker Module Node.js Worker Process Custom Worker Module Redis/Cache/GT.M
  • 54. Copyright © 2017 M/Gateway Developments Ltd QEWD Architecture Node.js Worker Process Master Node.js Process Queue Queue processor/ dispatcher Custom Worker Module Unavailable / processing Node.js Worker Process Custom Worker Module Node.js Worker Process Custom Worker Module Node.js Worker Process Custom Worker Module If worker pool size not exceeded, another worker is started and request passed to it Redis/Cache/GT.M Redis/Cache/GT.M
  • 55. Copyright © 2017 M/Gateway Developments Ltd QEWD Architecture Master Node.js Process Queue Queue processor/ dispatcher Unavailable / processing Node.js Worker Process Custom Worker Module Node.js Worker Process Custom Worker Module Redis/Cache/GT.M If entire Worker Pool is busy: Unavailable / processing Node.js Worker Process Custom Worker Module Node.js Worker Process Custom Worker Module Redis/Cache/GT.M Unavailable / processing Node.js Worker Process Custom Worker Module Node.js Worker Process Custom Worker Module Redis/Cache/GT.M
  • 56. Copyright © 2017 M/Gateway Developments Ltd QEWD Architecture Master Node.js Process Queue Queue processor/ dispatcher If entire Worker Pool is busy: New requests remain in queue Unavailable / processing Node.js Worker Process Custom Worker Module Node.js Worker Process Custom Worker Module Redis/Cache/GT.M Unavailable / processing Node.js Worker Process Custom Worker Module Node.js Worker Process Custom Worker Module Redis/Cache/GT.M Unavailable / processing Node.js Worker Process Custom Worker Module Node.js Worker Process Custom Worker Module Redis/Cache/GT.M
  • 57. Copyright © 2017 M/Gateway Developments Ltd QEWD Architecture Master Node.js Process Queue Queue processor/ dispatcher Unavailable / processing Node.js Worker Process Custom Worker Module Node.js Worker Process Custom Worker Module Redis/Cache/GT.M As soon as a worker is available again, a queued message can be passed to it Unavailable / processing Node.js Worker Process Custom Worker Module Node.js Worker Process Custom Worker Module Redis/Cache/GT.M Available Node.js Worker Process Custom Worker Module Redis/Cache/GT.M
  • 58. Copyright © 2017 M/Gateway Developments Ltd QEWD Architecture Master Node.js Process Queue Queue processor/ dispatcher Finished Node.js Worker Process Custom Worker Module Node.js Worker Process Custom Worker Module Node.js Worker Process Custom Worker Module Redis/Cache/GT.M A user's handler function signals completion using the function: finished(responseObject); This returns the response object to the master process
  • 59. Copyright © 2017 M/Gateway Developments Ltd QEWD Architecture Master Node.js Process Queue Queue processor/ dispatcher Finished Node.js Worker Process Custom Worker Module Node.js Worker Process Custom Worker Module Node.js Worker Process Custom Worker Module And the response is returned to the client that sent the original request (via Express/Koa/socket.io) Redis/Cache/GT.M
  • 60. Copyright © 2017 M/Gateway Developments Ltd QEWD Architecture Master Node.js Process Queue Queue processor/ dispatcher Available Node.js Worker Process Custom Worker Module The finished() function also automatically returns the worker process back to the available pool So it can now handle the next queued request Redis/Cache/GT.M
  • 61. Copyright © 2017 M/Gateway Developments Ltd QEWD Architecture Master Node.js Process Queue Queue processor/ dispatcher Available Node.js Worker Process Custom Worker Module Worker processes, once started, are persistent No start-up / tear-down cost Redis/Cache/GT.M
  • 62. Copyright © 2017 M/Gateway Developments Ltd QEWD Architecture Master Node.js Process Queue Queue processor/ dispatcher Node.js concurrency is handled by the master process. 100% asynchronous logic The master process does almost nothing The perfect Node.js application: no CPU-intensive or long- running tasks, so very high-performance Multiple Concurrent Incoming requests
  • 63. Copyright © 2017 M/Gateway Developments Ltd QEWD Architecture Master Node.js Process Queue Queue processor/ dispatcher Node.js concurrency is handled by the master process. 100% asynchronous logic The master process does almost nothing The perfect Node.js application: no CPU-intensive or long- running tasks, so very high-performance All the actual work happens in the isolated worker processes Multiple Concurrent Incoming requests
  • 64. Copyright © 2017 M/Gateway Developments Ltd QEWD Architecture Master Node.js Process Queue Queue processor/ dispatcher Available Node.js Worker Process Custom Worker Module Worker processes only handle a single request at a time Completely isolated run-time environment for handler functions No need for concerns about Node.js concurrency, so synchronous APIs can be used Redis/Cache/GT.M
  • 65. Copyright © 2017 M/Gateway Developments Ltd QEWD Architecture Master Node.js Process Queue Queue processor/ dispatcher Available Node.js Worker Process Custom Worker Module Redis/Cache/GT.M Long-running or CPU-intensive logic has no direct impact on other worker processes
  • 66. Copyright © 2017 M/Gateway Developments Ltd Why not just use child_process? • To avoid the very high performance cost of starting and tearing down each child process – At least 30ms to start a child_process • Each QEWD worker is a child_process – But keeps running, and is re-used
  • 67. Copyright © 2017 M/Gateway Developments Ltd Why not just use Cluster? • Cluster simply spreads the concurrent requests across a pool of persistent child_processes – If one of them is CPU intensive, all other requests in that cluster are held up • QEWD forces each child_process to handle a single request only – Creates an isolated run-time environment for each request
  • 68. Copyright © 2017 M/Gateway Developments Ltd Why not just use RabbitMQ or ZeroMQ? • I just want to just use a single technology: Node.js / JavaScript • Initial tests showed no performance benefit in using ZeroMQ
  • 69. Copyright © 2017 M/Gateway Developments Ltd Performance? • ewd-qoper8 module in isolation: – Handles the queue/master/worker architecture • Raspberry Pi 3 Model B – 4 core CPU – Readily-available commodity item – Low-cost • Easily-replicable benchmark
  • 70. Copyright © 2017 M/Gateway Developments Ltd Performance • ewd-qoper8 benchmark script provided: – How many workers? 3 – How many messages? 500,000 – Create a steady state of messages added to the queue as they're being processed: • Add a batch of 622 messages at a time • Wait 100ms between each batch – Messages are sent to workers which echo them straight back
  • 71. Copyright © 2017 M/Gateway Developments Ltd Performance • 5,800 messages/second sustained throughput • Limiting factor is master process hitting 100% CPU • Workers only 30% CPU, so plenty of capacity to do real work at this rate
  • 72. Copyright © 2017 M/Gateway Developments Ltd What can QEWD be Used For? • Full-stack platform for browser & Native mobile applications – WebSocket or Ajax messaging • Seamlessly swap between transports • All automated and abstracted out of the way – With security also automated for you too
  • 73. Copyright © 2017 M/Gateway Developments Ltd What can QEWD be Used For? • API server for REST applications • Optional session management – Automated token-based authentication – Server-side (persistent JSON) session storage • Or automated JSON Web Token based: – Authentication – Client-side session storage
  • 74. Copyright © 2017 M/Gateway Developments Ltd What can QEWD be Used For? • MicroService Platform – With each MicroService supported by its own shared or dedicated QEWD server – Using JWTs • Shared secret on each QEWD server – Using socket.io to provide high-performance, persistent connections between QEWD servers • Secured over HTTPS if required
  • 75. Copyright © 2017 M/Gateway Developments Ltd QEWD MicroService Fabric ewd-qoper8 queue Express Node.js socket.io Cache GT.M, YottaDB Redis Node.js Worker Process Cache GT.M, YottaDB Redis Node.js Worker Process Cache GT.M, YottaDB Redis Node.js Worker Process ewd-qoper8 queue Express Node.js socket.io Cache GT.M, YottaDB Redis Node.js Worker Process Cache GT.M, YottaDB Redis Node.js Worker Process Cache GT.M, YottaDB Redis Node.js Worker Process ewd-qoper8 queue Express Node.js socket.io Cache GT.M, YottaDB Redis Node.js Worker Process Cache GT.M, YottaDB Redis Node.js Worker Process Cache GT.M, YottaDB Redis Node.js Worker Process User authentication Demographics Pharmacy ewd-qoper8 queue Express Node.js socket.io Cache GT.M, YottaDB Redis Node.js Worker Process Cache GT.M, YottaDB Redis Node.js Worker Process Cache GT.M, YottaDB Redis Node.js Worker Process Client Orchestration HTTPS WebSocket Connections
  • 76. Copyright © 2017 M/Gateway Developments Ltd What can QEWD be Used For? • Federation platform – Providing a REST or WebSocket-based middle tier to multiple REST-based back-end servers • of any type, not just QEWD servers – One request in • Routed to all back-end systems and responses combined • Performing a "dance" between federated servers
  • 77. Copyright © 2017 M/Gateway Developments Ltd Federated Access to OpenEHR Browser QEWD GT.M or Redis ewd-qoper8 queue qewd-ripple Module Express OpenEHR Server AQL over HTTP(S) Worker PulseTile UI OpenEHR Server
  • 78. Copyright © 2017 M/Gateway Developments Ltd What can QEWD be Used For? • Interface to particular databases known as Global Storage databases – GT.M / YottaDB – Cache / IRIS – Redis (ewd-globals-redis module) • All of which are abstracted as: – Persistent JavaScript Objects – Fine-grained Document Database • Accessible at any level down to individual name/value pair anywhere in a JSON object
  • 79. Copyright © 2017 M/Gateway Developments Ltd QEWD.js • Resilient / Audit mode – When enabled, permanent record kept in the database of: • Queued requests • Processing status • Response(s) – If QEWD restarted, database is examined for queued, unprocessed requests • Automatically re-queued – Can specify retention period of database records
  • 80. Copyright © 2017 M/Gateway Developments Ltd QEWD.js • Supports all browser-side JavaScript frameworks • Some cool 3rd -party tooling and support available for React and Vue.js
  • 81. Copyright © 2017 M/Gateway Developments Ltd Have Your Node.js Cake And Eat It Too http://qewdjs.com