EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle

R
Rob TweedIT Consultant, Developer & Director/Founder at M/Gateway Developments Ltd
Copyright © 2016 M/Gateway Developments Ltd
EWD 3 Training Course
Part 8
Anatomy of the QEWD
Messaging Cycle
Rob Tweed
Director, M/Gateway Developments Ltd
Twitter: @rtweed
Copyright © 2016 M/Gateway Developments Ltd
Let's summarise what happens..
• During the QEWD Message Round-trip
Copyright © 2016 M/Gateway Developments Ltd
The QEWD Message Round-trip
• Generate an event in the browser
• Send a message to the QEWD back-end
• At the back-end, a handler function for that
message type processes the message and
usually creates a response message
• Response message is returned to the browser
where a handler function processes it and
usually modifies the User Interface
Copyright © 2016 M/Gateway Developments Ltd
QEWD
Node.js Worker Process
Master Node.js Process
Queue
Queue
processor/
dispatcher
qewd
cache.node
ewd-qoper8-cache
Global
Storage
Database
ewd-document-store
Globals
ewd-session
Express
HTTP(S)
Interface
WebSocket
socket.io
Interface
browserewd-client
Custom Worker
Module
ewd-qoper8
Copyright © 2016 M/Gateway Developments Ltd
After registration
Browser QEWD
Caché,
GT.M or
Redis
socket.io
socket.io
Token stored within
Closure in browser
ewd-client
token
ewd-session
Copyright © 2016 M/Gateway Developments Ltd
Button clicked
Browser QEWD
socket.io
socket.io
ewd-client
token
Event fired
EWD.send() invoked
Copyright © 2016 M/Gateway Developments Ltd
Message sent
Browser QEWD
socket.io
socket.io
ewd-client
token
Message augmented
with token and
sent to QEWD
master process
Message object
Type + payload
ewd-qoper8
queue
Copyright © 2016 M/Gateway Developments Ltd
Message queued
Browser QEWD
socket.io
socket.io
ewd-client
token
Added to queue
ewd-qoper8
queue
Copyright © 2016 M/Gateway Developments Ltd
Message dispatched to worker
Browser QEWD
socket.io
socket.io
ewd-client
token
Message dispatched
to available worker
ewd-qoper8
queue
Caché,
GT.M or
Redis
Copyright © 2016 M/Gateway Developments Ltd
Session lookup
Browser QEWD
socket.io
socket.io
ewd-client
token
Token used to lookup
QEWD Session
ewd-session
ewd-qoper8
queue
Caché,
GT.M or
Redis
Copyright © 2016 M/Gateway Developments Ltd
Application Name lookup
Browser QEWD
socket.io
socket.io
ewd-client
token
Retrieve application name
ewd-session
ewd-qoper8
queue
Caché,
GT.M or
Redis
Copyright © 2016 M/Gateway Developments Ltd
Application Name lookup
Browser QEWD
socket.io
socket.io
ewd-client
token
Retrieve application name
Important security feature:
Can't arbitrarily try to run another
application's message handlers
ewd-session
ewd-qoper8
queue
Caché,
GT.M or
Redis
Copyright © 2016 M/Gateway Developments Ltd
Load application module
Browser QEWD
socket.io
socket.io
ewd-client
token
Load application
back-end module
(if not already loaded)
ewd-session
ewd-qoper8
queue
Custom Worker
Module
demo1.js
Caché,
GT.M or
Redis
Copyright © 2016 M/Gateway Developments Ltd
Invoke message handler
Browser QEWD
socket.io
socket.io
ewd-client
token
Trigger message handler
function for received
message type
ewd-session
ewd-qoper8
queue
Custom Worker
Module
demo1.js
Caché,
GT.M or
Redis
Copyright © 2016 M/Gateway Developments Ltd
Invoke message handler
Browser QEWD
socket.io
socket.io
ewd-client
token
Access Global Storage,
Document Store, etc
and user's QEWD Session
ewd-session
ewd-qoper8
queue
Custom Worker
Module
demo1.js
Caché,
GT.M or
Redis
Copyright © 2016 M/Gateway Developments Ltd
Return response message(s)
Browser QEWD
socket.io
socket.io
ewd-client
token
Return message
send() – intermediate message
finished() – final message
ewd-session
ewd-qoper8
queue
Custom Worker
Module
demo1.js
Caché,
GT.M or
Redis
Copyright © 2016 M/Gateway Developments Ltd
Handle response message(s)
Browser QEWD
socket.io
socket.io
ewd-client
token
Client-side response
handler fires in
app.js
ewd-session
ewd-qoper8
queue
Custom Worker
Module
demo1.js
Caché,
GT.M or
Redis
Copyright © 2016 M/Gateway Developments Ltd
Update UI
Browser QEWD
socket.io
socket.io
ewd-client
token
User interface modified
ewd-session
ewd-qoper8
queue
Custom Worker
Module
demo1.js
User
Interface
Caché,
GT.M or
Redis
Copyright © 2016 M/Gateway Developments Ltd
Worker released
Browser QEWD
socket.io
socket.io
ewd-client
token
Meanwhile, finished() function
causes release of worker
back to available pool
ewd-qoper8
queue
User
Interface
Custom Worker
Module
demo1.js
Caché,
GT.M or
Redis
Copyright © 2016 M/Gateway Developments Ltd
QEWD applications
• Just repeat this pattern over and over
again!
1 of 20

Recommended

EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD by
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
1.2K views16 slides
EWD 3 Training Course Part 3: Summary of EWD 3 Modules by
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
979 views23 slides
EWD 3 Training Course Part 15: Using a Framework other than jQuery with QEWD by
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
541 views5 slides
EWD 3 Training Course Part 19: The cache.node APIs by
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
905 views50 slides
EWD 3 Training Course Part 4: Installing & Configuring QEWD by
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
2.9K views31 slides
EWD 3 Training Course Part 2: EWD 3 Overview by
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
2.1K views93 slides

More Related Content

What's hot

EWD 3 Training Course Part 27: The QEWD Session by
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
920 views9 slides
EWD 3 Training Course Part 42: The QEWD Docker Appliance by
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
1.3K views73 slides
EWD 3 Training Course Part 30: Modularising QEWD Applications by
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
1.1K views85 slides
EWD 3 Training Course Part 34: QEWD Resilient Mode by
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
750 views20 slides
EWD 3 Training Course Part 35: QEWD Session Locking by
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
532 views10 slides
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres... by
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
1.1K views53 slides

What's hot(20)

EWD 3 Training Course Part 27: The QEWD Session by Rob Tweed
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 Tweed920 views
EWD 3 Training Course Part 42: The QEWD Docker Appliance by Rob Tweed
EWD 3 Training Course Part 42: The QEWD Docker ApplianceEWD 3 Training Course Part 42: The QEWD Docker Appliance
EWD 3 Training Course Part 42: The QEWD Docker Appliance
Rob Tweed1.3K views
EWD 3 Training Course Part 30: Modularising QEWD Applications by Rob Tweed
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 Tweed1.1K views
EWD 3 Training Course Part 34: QEWD Resilient Mode by Rob Tweed
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 Tweed750 views
EWD 3 Training Course Part 35: QEWD Session Locking by Rob Tweed
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 Tweed532 views
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres... by 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...
Rob Tweed1.1K views
EWD 3 Training Course Part 44: Creating MicroServices with QEWD.js by Rob Tweed
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 Tweed1.5K views
EWD 3 Training Course Part 5a: First Steps in Building a QEWD Application by Rob Tweed
EWD 3 Training Course Part 5a: First Steps in Building a QEWD ApplicationEWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
Rob Tweed1.4K views
qewd-ripple: The Ripple OSI Middle Tier by Rob Tweed
qewd-ripple: The Ripple OSI Middle Tierqewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tier
Rob Tweed720 views
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data... by 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...
Rob Tweed3.9K views
EWD 3 Training Course Part 12: QEWD Session Timeout Control by Rob Tweed
EWD 3 Training Course Part 12: QEWD Session Timeout ControlEWD 3 Training Course Part 12: QEWD Session Timeout Control
EWD 3 Training Course Part 12: QEWD Session Timeout Control
Rob Tweed561 views
QEWD.js, JSON Web Tokens & MicroServices by Rob Tweed
QEWD.js, JSON Web Tokens & MicroServicesQEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServices
Rob Tweed903 views
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality by Rob Tweed
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 Tweed2.1K views
EWD 3 Training Course Part 11: Handling Errors in QEWD by Rob Tweed
EWD 3 Training Course Part 11: Handling Errors in QEWDEWD 3 Training Course Part 11: Handling Errors in QEWD
EWD 3 Training Course Part 11: Handling Errors in QEWD
Rob Tweed639 views
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services by Rob Tweed
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 Tweed333 views
EWD 3 Training Course Part 5b: First Steps in Building a QEWD Application by Rob Tweed
EWD 3 Training Course Part 5b: First Steps in Building a QEWD ApplicationEWD 3 Training Course Part 5b: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5b: First Steps in Building a QEWD Application
Rob Tweed999 views
EWD 3 Training Course Part 31: Using QEWD for Web and REST Services by Rob Tweed
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 Tweed3.3K views
QEWD.js: Have your Node.js Cake and Eat It Too by Rob Tweed
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 Tweed628 views
EWD 3 Training Course Part 9: Complex QEWD Messages and Responses by Rob Tweed
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 Tweed865 views
EWD 3 Training Course Part 10: QEWD Sessions and User Authentication by Rob Tweed
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 Tweed1K views

Viewers also liked

EWD 3 Training Course Part 7: Applying the QEWD Messaging Pattern by
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 PatternRob Tweed
1.3K views51 slides
EWD 3 Training Course Part 13: Putting Everything so far into Practice using ... by
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
805 views14 slides
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap... by
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
932 views45 slides
EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage by
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 StorageRob Tweed
1.2K views35 slides
EWD 3 Training Course Part 16: QEWD Services by
EWD 3 Training Course Part 16: QEWD ServicesEWD 3 Training Course Part 16: QEWD Services
EWD 3 Training Course Part 16: QEWD ServicesRob Tweed
671 views21 slides
EWD 3 Training Course Part 22: Traversing Documents using DocumentNode Objects by
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 ObjectsRob Tweed
732 views52 slides

Viewers also liked(9)

EWD 3 Training Course Part 7: Applying the QEWD Messaging Pattern by Rob Tweed
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 Tweed1.3K views
EWD 3 Training Course Part 13: Putting Everything so far into Practice using ... by 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 ...
Rob Tweed805 views
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap... by 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...
Rob Tweed932 views
EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage by Rob Tweed
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 Tweed1.2K views
EWD 3 Training Course Part 16: QEWD Services by Rob Tweed
EWD 3 Training Course Part 16: QEWD ServicesEWD 3 Training Course Part 16: QEWD Services
EWD 3 Training Course Part 16: QEWD Services
Rob Tweed671 views
EWD 3 Training Course Part 22: Traversing Documents using DocumentNode Objects by Rob Tweed
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 Tweed732 views
EWD 3 Training Course Part 17: Introduction to Global Storage Databases by Rob Tweed
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 Tweed1.3K views
EWD 3 Training Course Part 21: Persistent JavaScript Objects by Rob Tweed
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 Tweed779 views
EWD 3 Training Course Part 20: The DocumentNode Object by Rob Tweed
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 Tweed1K views

Similar to EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle

Day in a life of a node.js developer by
Day in a life of a node.js developerDay in a life of a node.js developer
Day in a life of a node.js developerEdureka!
2.5K views23 slides
Day In A Life Of A Node.js Developer by
Day In A Life Of A Node.js DeveloperDay In A Life Of A Node.js Developer
Day In A Life Of A Node.js DeveloperEdureka!
1.2K views23 slides
Sst hackathon express by
Sst hackathon expressSst hackathon express
Sst hackathon expressAeshan Wijetunge
331 views13 slides
Hands-On Lab: Managing and Monitoring Node.js Made Easy with CA Application P... by
Hands-On Lab: Managing and Monitoring Node.js Made Easy with CA Application P...Hands-On Lab: Managing and Monitoring Node.js Made Easy with CA Application P...
Hands-On Lab: Managing and Monitoring Node.js Made Easy with CA Application P...CA Technologies
1K views28 slides
Node.js primer for ITE students by
Node.js primer for ITE studentsNode.js primer for ITE students
Node.js primer for ITE studentsQuhan Arunasalam
282 views18 slides
Node.js Workshop by
Node.js WorkshopNode.js Workshop
Node.js WorkshopQuhan Arunasalam
561 views35 slides

Similar to EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle(20)

Day in a life of a node.js developer by Edureka!
Day in a life of a node.js developerDay in a life of a node.js developer
Day in a life of a node.js developer
Edureka!2.5K views
Day In A Life Of A Node.js Developer by Edureka!
Day In A Life Of A Node.js DeveloperDay In A Life Of A Node.js Developer
Day In A Life Of A Node.js Developer
Edureka!1.2K views
Hands-On Lab: Managing and Monitoring Node.js Made Easy with CA Application P... by CA Technologies
Hands-On Lab: Managing and Monitoring Node.js Made Easy with CA Application P...Hands-On Lab: Managing and Monitoring Node.js Made Easy with CA Application P...
Hands-On Lab: Managing and Monitoring Node.js Made Easy with CA Application P...
CA Technologies1K views
NodeJS : Communication and Round Robin Way by Edureka!
NodeJS : Communication and Round Robin WayNodeJS : Communication and Round Robin Way
NodeJS : Communication and Round Robin Way
Edureka!2.9K views
Cloud Foundry a Developer's Perspective by Dave McCrory
Cloud Foundry a Developer's PerspectiveCloud Foundry a Developer's Perspective
Cloud Foundry a Developer's Perspective
Dave McCrory5.8K views
Timings API: Performance Assertion during the functional testing by PetrosPlakogiannis
 Timings API: Performance Assertion during the functional testing Timings API: Performance Assertion during the functional testing
Timings API: Performance Assertion during the functional testing
PetrosPlakogiannis106 views
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202... by GoQA
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
GoQA49 views
Running your Spring Apps in the Cloud Javaone 2014 by cornelia davis
Running your Spring Apps in the Cloud Javaone 2014Running your Spring Apps in the Cloud Javaone 2014
Running your Spring Apps in the Cloud Javaone 2014
cornelia davis1.1K views
Introduction to Vaadin by netomi
Introduction to VaadinIntroduction to Vaadin
Introduction to Vaadin
netomi3.7K views
Building Mobile Friendly APIs in Rails by Jim Jeffers
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in Rails
Jim Jeffers2.8K views
Nodejs Intro - Part2 Introduction to Web Applications by Budh Ram Gurung
Nodejs Intro - Part2 Introduction to Web ApplicationsNodejs Intro - Part2 Introduction to Web Applications
Nodejs Intro - Part2 Introduction to Web Applications
Budh Ram Gurung2.6K views
Microservices with Node.js and Apache Cassandra by Jorge Bay Gondra
Microservices with Node.js and Apache CassandraMicroservices with Node.js and Apache Cassandra
Microservices with Node.js and Apache Cassandra
Jorge Bay Gondra6.2K views
NetDevOps Development Environments by Joel W. King
NetDevOps Development EnvironmentsNetDevOps Development Environments
NetDevOps Development Environments
Joel W. King164 views
Reactive Application Using METEOR by NodeXperts
Reactive Application Using METEORReactive Application Using METEOR
Reactive Application Using METEOR
NodeXperts107 views

More from Rob Tweed

QEWD Update by
QEWD UpdateQEWD Update
QEWD UpdateRob Tweed
945 views32 slides
Data Persistence as a Language Feature by
Data Persistence as a Language FeatureData Persistence as a Language Feature
Data Persistence as a Language FeatureRob Tweed
1.3K views108 slides
LNUG: Having Your Node.js Cake and Eating It Too by
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 TooRob Tweed
2.8K views81 slides
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services by
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
891 views93 slides
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5 by
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
621 views73 slides
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4 by
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
718 views31 slides

More from Rob Tweed(13)

QEWD Update by Rob Tweed
QEWD UpdateQEWD Update
QEWD Update
Rob Tweed945 views
Data Persistence as a Language Feature by Rob Tweed
Data Persistence as a Language FeatureData Persistence as a Language Feature
Data Persistence as a Language Feature
Rob Tweed1.3K views
LNUG: Having Your Node.js Cake and Eating It Too by Rob Tweed
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 Tweed2.8K views
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services by Rob Tweed
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 Tweed891 views
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5 by Rob Tweed
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 Tweed621 views
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4 by Rob Tweed
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 Tweed718 views
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3 by Rob Tweed
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 Tweed627 views
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2 by Rob Tweed
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 Tweed597 views
EWD 3 Training Course Part 33: Configuring QEWD to use CORS by Rob Tweed
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 Tweed1.1K views
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS by Rob Tweed
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 Tweed608 views
EWD 3 Training Course Part 26: Event-driven Indexing by Rob Tweed
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 Tweed678 views
EWD 3 Training Course Part 25: Document Database Capabilities by Rob Tweed
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 Tweed905 views
EWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes by Rob Tweed
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 Tweed623 views

Recently uploaded

Bootstrapping vs Venture Capital.pptx by
Bootstrapping vs Venture Capital.pptxBootstrapping vs Venture Capital.pptx
Bootstrapping vs Venture Capital.pptxZeljko Svedic
17 views17 slides
.NET Deserialization Attacks by
.NET Deserialization Attacks.NET Deserialization Attacks
.NET Deserialization AttacksDharmalingam Ganesan
7 views50 slides
Chat GPTs by
Chat GPTsChat GPTs
Chat GPTsGene Leybzon
17 views36 slides
Streamlining Your Business Operations with Enterprise Application Integration... by
Streamlining Your Business Operations with Enterprise Application Integration...Streamlining Your Business Operations with Enterprise Application Integration...
Streamlining Your Business Operations with Enterprise Application Integration...Flexsin
5 views12 slides
Supercharging your Python Development Environment with VS Code and Dev Contai... by
Supercharging your Python Development Environment with VS Code and Dev Contai...Supercharging your Python Development Environment with VS Code and Dev Contai...
Supercharging your Python Development Environment with VS Code and Dev Contai...Dawn Wages
9 views51 slides
Top-5-production-devconMunich-2023.pptx by
Top-5-production-devconMunich-2023.pptxTop-5-production-devconMunich-2023.pptx
Top-5-production-devconMunich-2023.pptxTier1 app
10 views40 slides

Recently uploaded(20)

Bootstrapping vs Venture Capital.pptx by Zeljko Svedic
Bootstrapping vs Venture Capital.pptxBootstrapping vs Venture Capital.pptx
Bootstrapping vs Venture Capital.pptx
Zeljko Svedic17 views
Streamlining Your Business Operations with Enterprise Application Integration... by Flexsin
Streamlining Your Business Operations with Enterprise Application Integration...Streamlining Your Business Operations with Enterprise Application Integration...
Streamlining Your Business Operations with Enterprise Application Integration...
Flexsin 5 views
Supercharging your Python Development Environment with VS Code and Dev Contai... by Dawn Wages
Supercharging your Python Development Environment with VS Code and Dev Contai...Supercharging your Python Development Environment with VS Code and Dev Contai...
Supercharging your Python Development Environment with VS Code and Dev Contai...
Dawn Wages9 views
Top-5-production-devconMunich-2023.pptx by Tier1 app
Top-5-production-devconMunich-2023.pptxTop-5-production-devconMunich-2023.pptx
Top-5-production-devconMunich-2023.pptx
Tier1 app10 views
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P... by NimaTorabi2
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...
NimaTorabi219 views
Transport Management System - Shipment & Container Tracking by Freightoscope
Transport Management System - Shipment & Container TrackingTransport Management System - Shipment & Container Tracking
Transport Management System - Shipment & Container Tracking
Freightoscope 6 views
Google Solutions Challenge 2024 Talk pdf by MohdAbdulAleem4
Google Solutions Challenge 2024 Talk pdfGoogle Solutions Challenge 2024 Talk pdf
Google Solutions Challenge 2024 Talk pdf
MohdAbdulAleem447 views
Mobile App Development Company by Richestsoft
Mobile App Development CompanyMobile App Development Company
Mobile App Development Company
Richestsoft 6 views
Electronic AWB - Electronic Air Waybill by Freightoscope
Electronic AWB - Electronic Air Waybill Electronic AWB - Electronic Air Waybill
Electronic AWB - Electronic Air Waybill
Freightoscope 7 views
Ports-and-Adapters Architecture for Embedded HMI by Burkhard Stubert
Ports-and-Adapters Architecture for Embedded HMIPorts-and-Adapters Architecture for Embedded HMI
Ports-and-Adapters Architecture for Embedded HMI
Burkhard Stubert37 views
tecnologia18.docx by nosi6702
tecnologia18.docxtecnologia18.docx
tecnologia18.docx
nosi67026 views

EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle

  • 1. Copyright © 2016 M/Gateway Developments Ltd EWD 3 Training Course Part 8 Anatomy of the QEWD Messaging Cycle Rob Tweed Director, M/Gateway Developments Ltd Twitter: @rtweed
  • 2. Copyright © 2016 M/Gateway Developments Ltd Let's summarise what happens.. • During the QEWD Message Round-trip
  • 3. Copyright © 2016 M/Gateway Developments Ltd The QEWD Message Round-trip • Generate an event in the browser • Send a message to the QEWD back-end • At the back-end, a handler function for that message type processes the message and usually creates a response message • Response message is returned to the browser where a handler function processes it and usually modifies the User Interface
  • 4. Copyright © 2016 M/Gateway Developments Ltd QEWD Node.js Worker Process Master Node.js Process Queue Queue processor/ dispatcher qewd cache.node ewd-qoper8-cache Global Storage Database ewd-document-store Globals ewd-session Express HTTP(S) Interface WebSocket socket.io Interface browserewd-client Custom Worker Module ewd-qoper8
  • 5. Copyright © 2016 M/Gateway Developments Ltd After registration Browser QEWD Caché, GT.M or Redis socket.io socket.io Token stored within Closure in browser ewd-client token ewd-session
  • 6. Copyright © 2016 M/Gateway Developments Ltd Button clicked Browser QEWD socket.io socket.io ewd-client token Event fired EWD.send() invoked
  • 7. Copyright © 2016 M/Gateway Developments Ltd Message sent Browser QEWD socket.io socket.io ewd-client token Message augmented with token and sent to QEWD master process Message object Type + payload ewd-qoper8 queue
  • 8. Copyright © 2016 M/Gateway Developments Ltd Message queued Browser QEWD socket.io socket.io ewd-client token Added to queue ewd-qoper8 queue
  • 9. Copyright © 2016 M/Gateway Developments Ltd Message dispatched to worker Browser QEWD socket.io socket.io ewd-client token Message dispatched to available worker ewd-qoper8 queue Caché, GT.M or Redis
  • 10. Copyright © 2016 M/Gateway Developments Ltd Session lookup Browser QEWD socket.io socket.io ewd-client token Token used to lookup QEWD Session ewd-session ewd-qoper8 queue Caché, GT.M or Redis
  • 11. Copyright © 2016 M/Gateway Developments Ltd Application Name lookup Browser QEWD socket.io socket.io ewd-client token Retrieve application name ewd-session ewd-qoper8 queue Caché, GT.M or Redis
  • 12. Copyright © 2016 M/Gateway Developments Ltd Application Name lookup Browser QEWD socket.io socket.io ewd-client token Retrieve application name Important security feature: Can't arbitrarily try to run another application's message handlers ewd-session ewd-qoper8 queue Caché, GT.M or Redis
  • 13. Copyright © 2016 M/Gateway Developments Ltd Load application module Browser QEWD socket.io socket.io ewd-client token Load application back-end module (if not already loaded) ewd-session ewd-qoper8 queue Custom Worker Module demo1.js Caché, GT.M or Redis
  • 14. Copyright © 2016 M/Gateway Developments Ltd Invoke message handler Browser QEWD socket.io socket.io ewd-client token Trigger message handler function for received message type ewd-session ewd-qoper8 queue Custom Worker Module demo1.js Caché, GT.M or Redis
  • 15. Copyright © 2016 M/Gateway Developments Ltd Invoke message handler Browser QEWD socket.io socket.io ewd-client token Access Global Storage, Document Store, etc and user's QEWD Session ewd-session ewd-qoper8 queue Custom Worker Module demo1.js Caché, GT.M or Redis
  • 16. Copyright © 2016 M/Gateway Developments Ltd Return response message(s) Browser QEWD socket.io socket.io ewd-client token Return message send() – intermediate message finished() – final message ewd-session ewd-qoper8 queue Custom Worker Module demo1.js Caché, GT.M or Redis
  • 17. Copyright © 2016 M/Gateway Developments Ltd Handle response message(s) Browser QEWD socket.io socket.io ewd-client token Client-side response handler fires in app.js ewd-session ewd-qoper8 queue Custom Worker Module demo1.js Caché, GT.M or Redis
  • 18. Copyright © 2016 M/Gateway Developments Ltd Update UI Browser QEWD socket.io socket.io ewd-client token User interface modified ewd-session ewd-qoper8 queue Custom Worker Module demo1.js User Interface Caché, GT.M or Redis
  • 19. Copyright © 2016 M/Gateway Developments Ltd Worker released Browser QEWD socket.io socket.io ewd-client token Meanwhile, finished() function causes release of worker back to available pool ewd-qoper8 queue User Interface Custom Worker Module demo1.js Caché, GT.M or Redis
  • 20. Copyright © 2016 M/Gateway Developments Ltd QEWD applications • Just repeat this pattern over and over again!