SlideShare una empresa de Scribd logo
1 de 20
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!

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

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 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 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 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 35: QEWD Session Locking
EWD 3 Training Course Part 35: QEWD Session LockingEWD 3 Training Course Part 35: QEWD Session Locking
EWD 3 Training Course Part 35: QEWD Session Locking
 
EWD 3 Training Course Part 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 44: Creating MicroServices with QEWD.js
EWD 3 Training Course Part 44: Creating MicroServices with QEWD.jsEWD 3 Training Course Part 44: Creating MicroServices with QEWD.js
EWD 3 Training Course Part 44: Creating MicroServices with QEWD.js
 
EWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
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
 
qewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tierqewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tier
 
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
 
EWD 3 Training Course Part 12: QEWD Session Timeout Control
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
 
QEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServicesQEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServices
 
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 3 Training Course Part 11: Handling Errors in QEWD
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
 
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Servicesewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
 
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 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
 
QEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It TooQEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It Too
 
EWD 3 Training Course Part 9: Complex QEWD Messages and Responses
EWD 3 Training Course Part 9: Complex QEWD Messages and ResponsesEWD 3 Training Course Part 9: Complex QEWD Messages and Responses
EWD 3 Training Course Part 9: Complex QEWD Messages and Responses
 
EWD 3 Training Course Part 10: QEWD Sessions and User Authentication
EWD 3 Training Course Part 10: QEWD Sessions and User AuthenticationEWD 3 Training Course Part 10: QEWD Sessions and User Authentication
EWD 3 Training Course Part 10: QEWD Sessions and User Authentication
 

Destacado

Destacado (9)

EWD 3 Training Course Part 7: Applying the QEWD Messaging Pattern
EWD 3 Training Course Part 7: Applying the QEWD Messaging PatternEWD 3 Training Course Part 7: Applying the QEWD Messaging Pattern
EWD 3 Training Course Part 7: Applying the QEWD Messaging Pattern
 
EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...
EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...
EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...
 
EWD 3 Training Course Part 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 18: Modelling NoSQL Databases using Global Storage
EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global StorageEWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage
EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage
 
EWD 3 Training Course Part 16: QEWD Services
EWD 3 Training Course Part 16: QEWD ServicesEWD 3 Training Course Part 16: QEWD Services
EWD 3 Training Course Part 16: QEWD Services
 
EWD 3 Training Course Part 22: Traversing Documents using DocumentNode Objects
EWD 3 Training Course Part 22: Traversing Documents using DocumentNode ObjectsEWD 3 Training Course Part 22: Traversing Documents using DocumentNode Objects
EWD 3 Training Course Part 22: Traversing Documents using DocumentNode Objects
 
EWD 3 Training Course Part 17: Introduction to Global Storage Databases
EWD 3 Training Course Part 17: Introduction to Global Storage DatabasesEWD 3 Training Course Part 17: Introduction to Global Storage Databases
EWD 3 Training Course Part 17: Introduction to Global Storage Databases
 
EWD 3 Training Course Part 21: Persistent JavaScript Objects
EWD 3 Training Course Part 21: Persistent JavaScript ObjectsEWD 3 Training Course Part 21: Persistent JavaScript Objects
EWD 3 Training Course Part 21: Persistent JavaScript Objects
 
EWD 3 Training Course Part 20: The DocumentNode Object
EWD 3 Training Course Part 20: The DocumentNode ObjectEWD 3 Training Course Part 20: The DocumentNode Object
EWD 3 Training Course Part 20: The DocumentNode Object
 

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

Day in a life of a node.js developer
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!
 

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

Day in a life of a node.js developer
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
 
Day In A Life Of A Node.js Developer
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
 
Sst hackathon express
Sst hackathon expressSst hackathon express
Sst hackathon express
 
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...
Hands-On Lab: Managing and Monitoring Node.js Made Easy with CA Application P...
 
Node.js primer for ITE students
Node.js primer for ITE studentsNode.js primer for ITE students
Node.js primer for ITE students
 
Node.js Workshop
Node.js WorkshopNode.js Workshop
Node.js Workshop
 
NodeJS : Communication and Round Robin Way
NodeJS : Communication and Round Robin WayNodeJS : Communication and Round Robin Way
NodeJS : Communication and Round Robin Way
 
Cloud Foundry a Developer's Perspective
Cloud Foundry a Developer's PerspectiveCloud Foundry a Developer's Perspective
Cloud Foundry a Developer's Perspective
 
Timings API: Performance Assertion during the functional testing
 Timings API: Performance Assertion during the functional testing Timings API: Performance Assertion during the functional testing
Timings API: Performance Assertion during the functional testing
 
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
 
Node.js Tools Ecosystem
Node.js Tools EcosystemNode.js Tools Ecosystem
Node.js Tools Ecosystem
 
Running your Spring Apps in the Cloud Javaone 2014
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
 
Introduction to Vaadin
Introduction to VaadinIntroduction to Vaadin
Introduction to Vaadin
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in Rails
 
Docker for Java Developers
Docker for Java DevelopersDocker for Java Developers
Docker for Java Developers
 
Nodejs Intro - Part2 Introduction to Web Applications
Nodejs Intro - Part2 Introduction to Web ApplicationsNodejs Intro - Part2 Introduction to Web Applications
Nodejs Intro - Part2 Introduction to Web Applications
 
Microservices with Node.js and Apache Cassandra
Microservices with Node.js and Apache CassandraMicroservices with Node.js and Apache Cassandra
Microservices with Node.js and Apache Cassandra
 
NetDevOps Development Environments
NetDevOps Development EnvironmentsNetDevOps Development Environments
NetDevOps Development Environments
 
Node.js primer
Node.js primerNode.js primer
Node.js primer
 
Reactive Application Using METEOR
Reactive Application Using METEORReactive Application Using METEOR
Reactive Application Using METEOR
 

Más de Rob Tweed

Más de Rob Tweed (13)

QEWD Update
QEWD UpdateQEWD Update
QEWD Update
 
Data Persistence as a Language Feature
Data Persistence as a Language FeatureData Persistence as a Language Feature
Data Persistence as a Language Feature
 
LNUG: Having Your Node.js Cake and Eating It Too
LNUG: Having Your Node.js Cake and Eating It TooLNUG: Having Your Node.js Cake and Eating It Too
LNUG: Having Your Node.js Cake and Eating It Too
 
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST ServicesEWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
 
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 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 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 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 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
 

Último

%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
+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
 

Último (20)

%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
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
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
+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...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 

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!