SlideShare a Scribd company logo
API Design and WebSocket 
WoT Next? 
@frankgreco
Background 
§ Director of Technology @ Kaazing 
§ Chairman NYJavaSIG (javasig.com) 
§ Largest JUG in North America 
8,000+ members 
§ Financial Services, Architecture, Cloud 
§ frank.greco@kaazing.com, @frankgreco
A Primary Tenet of Computing 
History 
History 
If History Repeats Itself, Is There No Future?
A Trip Down Memory Lane… 
In the beginning…
Enterprise – “inside the firewall” (1980’s – early 90’s) 
tcp 
Client-Server
Web – “over the firewall” (early 90’s – 2011) 
http tcp 
web server 
and/or 
app server 
app protocols 
Not efficient or effective for event-based systems…
But Modern Applications are Dynamic and Event-based 
FX trading 
Monitoring 
Stock trading Utilities trading 
XaaS 
Logistics Notification Compliance 
Betting & bidding 
Voting In-store & online Collaboration
Legacy Web 
u Designed for document transfer – HTTP 
ü Short-lived Request / Response interaction 
u Bidirectional, but half-duplex 
ü Traffic flows in only one direction at a time 
u Stateless 
ü Large amounts of metadata resent for each 
request 
The Web was not originally designed for 
“real-time”, event-based services…
WebSocket – “TCP for the Web” 
u IETF Protocol and W3C JavaScript API for real-time, 
bi-directional, always-on connections 
u RFC 6455 – Dec 2011 
u Easily add event-based data to web apps 
ü ws://mycompany.com/collaboration_svc 
ü wss://anothercompany.com/marketdata 
u Avoids polling 
u Avoids HTTP meta-data overhead 
u Shares port with HTTP (80/443) 
u Traverses Firewalls
The WebSocket Handshake
For Event-based Web Communication… 
Legacy HTTP vs WebSocket 
http:// ws:// 
u Application-level Socket over the Web 
u Supported by all Modern Browsers 
u Event-based Applications
W3C WebSocket JavaScript API
W3C WebSocket JavaScript API 
HTML5 WebSocket API 
But… 
Dealing with WebSocket is like dealing with TCP. 
It’s a streams-based model. You need to understand how to 
handle streams-based data over the wire. 
e.g., How do I do publish/subscribe?
What is Missing? 
Where is the Application-level Protocol? 
Who handles retries? 
How do we handle publish/ 
subscribe semantics? 
How do we handle market data? 
How can we guarantee delivery? 
What do we do with slow 
consumers, last value cache, etc? 
What if the client is not 
currently active? 
What about partial data? 
How do I handle 
entitlements? ACL?
Browser and Native Applications 
JMS XMPP AMQP B2B FTP VNC MQTT etc 
WebSocket 
TCP/IP 
Internet 
WebSocket 
Gateway 
WebSocket 
Gateway 
Protocol Layering is Possible 
WebSocket is a 
Transport layer
Simplicity is a 
Useful 
Abstraction! 
Simplicity enables 
Innovation 
Complexity 
Innovation 
Higher Level APIs Reduce Complexity
Higher Level APIs (over WebSocket) for JavaScript 
So if you can layer application protocols and 
APIs over WebSocket, what do you have? 
u Easier WebSocket programmability 
u Event-driven applications over the web 
u Event-driven APIs over the web 
u Not necessary to open non-standard ports 
u Web infrastructure now truly “disappears” 
u Reduction in complexity 
u Further opportunities to innovate 
u Mobile + cloud + HTML5/WebSocket 
u Internet of Things -> Web of Things 
u “Imagination is Everything”
Publish/Subscribe 
Java Message Service (JMS) 
over 
WebSocket 
For Example…
Java Message Service (JMS) 
u Java EE Message Oriented Middleware 
u JMS 1.0 2001, JMS 1.1 2002, JMS 2.0 2013 
u Asynchronous Messaging vs. RPC 
u Loosely coupled vs. Tightly coupled 
u Pub/Sub, Topics, Queues 
u Transactions, Reliable
Basic JMS 
conn = createConnection(); 
sess = conn.createSession(); 
topic = jndiContext.lookup(topic); 
pub = sess.createProducer(topic); 
pub.send(“hey Frank”); 
conn = createConnection(); 
sess = conn.createSession(); 
topic = jndiContext.lookup(topic); 
sub = sess.createConsumer(topic); 
sub.setMessageListener(this); 
… 
public void onMessage(Message m) { 
String s = m.getText(); 
… do stuff… 
} 
conn = createConnection(); 
sess = conn.createSession(); 
topic = jndiContext.lookup(topic); 
sub = sess.createConsumer(topic); 
sub.setMessageListener(this); 
… 
public void onMessage(Message m) { 
String s = m.getText(); 
… do stuff… 
} 
conn = createConnection(); 
sess = conn.createSession(); 
topic = jndiContext.lookup(topic); 
sub = sess.createConsumer(topic); 
sub.setMessageListener(this); 
… 
public void onMessage(Message m) { 
String s = m.getText(); 
… do stuff… 
} 
msg 
broker
JMS Over the Web (JavaScript) 
Browser app - 100 msg/sec 
over port 80/443
What WebSocket is Not 
u It is not a New AJAX 
AJAX was a lovable hack 
u It is not a Push mechanism 
WebSocket is full-duplex, bi-directional 
u It is not a Messaging system 
It’s an agnostic wire protocol 
It’s a low-level transport API 
u It is not a Replacement for HTTP 
HTTP is still great for static, cacheable info
What’s next for WebSocket?
Internet of Things (IoT) 
+ 
Heterogeneity + Scale + Usability 
Futures
The World is Naturally Event-based (“real-time”) 
Presentation Music 
Communication 
Logistics 
Big 
Data 
Risk 
Management 
Home 
Security 
Health 
Monitoring 
Intelligent 
Appliances 
Local 
Transportation 
Monitoring/ 
Management 
Remote 
control
API Design and WebSocket
Let’s Take 1 Step Back to go 2 Steps Ahead… 
u Internet – Global system of interconnected networks 
that use IP to communicate 
u Internetworking – Connecting one network with another 
through a series of Gateways that provide a common 
method of communication
The Web 
u A popular application service on the Internet 
u Based on TCP/IP 
u Advantages 
§ Application deployment simplified – URI 
§ Interoperable open standards and specifications 
§ Ease of programmability – scripting 
§ Global reach and Economy of scale 
§ Accessed by ubiquitous Browsers and also non-Browsers 
u Two major protocols 
HTTP (1988/1999) and WebSocket (2007/2011)
The Hidden Web – Most of the Web is Not Visible 
browsers 
APIs 
http://thumbs.dreamstime.com/x/iceberg-23503494.jpg
Now… IoT, IIoT and M2M 
u A riff on “Ubiquitous Computing” (“Pervasive”) 
• Mark Weisner PARC 1988 
u Its early so there’s different definitions 
• Similar to early days of Cloud Computing 
u M2M has been around for decades. 
• Primarily proprietary embedded systems and typically 
point-to-point (RPC) 
u IoT/IIoT (Industrial IoT) 
• Adds Internet connectivity 
• Networks of M2M systems connected via IP
IoT/IIoT – Connectivity isn’t Sufficient 
u No formal API standards 
u Many protocol standards – interoperability low 
u No common, wide-reaching frameworks 
u No composition possibilities 
u Difficult to leverage economies of scale 
u Barrier to entry is high for millions of app developers 
u Also… we’re in a cloud, mobile, web api world
u IoT – Internet of Things 
• Embedded computing endowed with Internet connectivity 
u WoT – Web of Things 
• Application and Services layer over IoT 
Developers! 
u Apply the benefits of the Web to IoT 
u WoT is a uniform interface to access IoT functionality 
u Provides the abstraction for control/monitoring (sensors/ 
actuators) 
u Accelerates innovation 
u Deployment, development, interoperability, economy of 
scale… 
IoT 
WoT 
Here’s Where the Web Comes In
But Is HTTP the Right Choice? 
u Disadvantages of HTTP Request/Response 
u Lack of resiliency and robustness 
u Enterprise events retrieved by resource intensive polling 
techniques 
• Much bandwidth is wasted 
• Information can be delayed 
u Composite services brittle and lack transactionality 
u Enterprises learned advantages of ESB 10+ years ago 
u See failures of CORBA, Sun RPC, etc. 
u Clumsy AJAX/Comet workarounds to simulate real-time
History Repeats Itself… 
RPC 
Asynchronous 
RPC 
Messaging 
REST 
Asynchronous 
REST 
Messaging 
ESB ISB? 
Enterprise Web/WoT 
• Can wait for response 
• Tight coupling 
• Centralized business 
processes 
• Vertical interaction 
• Easy to understand (xact) 
• Future response 
• Loose coupling 
• Independent business 
processes 
• More complexity (xact) 
Did I mention History repeats itself?...
The Message is the Medium 
“…terse, self-classified 
messages, networking overhead 
isolated to a specialized tier of 
devices, and publish/subscribe 
relationships are the only way 
to fully distill the power of the 
coming Internet of Things” – 
Francis daCosta
Typically an App 
Server and DB 
App Server is 
probably not the 
right 
architecture 
Data Flow – Human Web vs WoT 
Human 
Web 
WoT 
Large data to client 
Small data to server 
Do human-readable protocols make sense for non-humans?
GW 
GW 
GW 
IoT/IIoT 
WoT 
WoT 
WoT 
Event Gateway Architecture
Event Gateway Architecture – Future Directions 
GW 
GW 
GW 
GW 
GW 
GW 
Aggregator nodes 
GW 
• Scalability 
• Querying 
• Performance 
• Manageability 
• Composition 
• Circles of Trust 
• Event processing 
• CDN++
Demos 
Click to Edit Master Title Style
Thank You! 
@frankgreco

More Related Content

What's hot (20)

PDF
How to Design Retail Recommendation Engines with Neo4j
Neo4j
 
PPTX
Web crawler
poonamkenkre
 
PDF
Knowledge Graphs for Transformation: Dynamic Context for the Intelligent Ente...
Neo4j
 
PPTX
Neo4j GraphSummit London March 2023 Emil Eifrem Keynote.pptx
Neo4j
 
PPTX
R-Studio Vs. Rcmdr
Syracuse University
 
PDF
Graphs for Enterprise Architects
Neo4j
 
PDF
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
PPTX
Smarter Fraud Detection With Graph Data Science
Neo4j
 
PDF
Neanex - Semantic Construction with Graphs
Neo4j
 
PPT
7. Key-Value Databases: In Depth
Fabio Fumarola
 
PDF
LeNet to ResNet
Somnath Banerjee
 
PPTX
Introduction to Graph Neural Networks: Basics and Applications - Katsuhiko Is...
Preferred Networks
 
PPTX
Python Scipy Numpy
Girish Khanzode
 
PDF
4 Dimensionality reduction (PCA & t-SNE)
Dmytro Fishman
 
PDF
Data visualization in Python
Marc Garcia
 
PDF
Visual Question Answering 2.0
Universitat Politècnica de Catalunya
 
PPTX
Data Cleaning Techniques
Amir Masoud Sefidian
 
PDF
Full Stack Graph in the Cloud
Neo4j
 
PDF
Graph Gurus Episode 31: GSQL Writing Best Practices Part 1
TigerGraph
 
PPTX
Elsevier: Empowering Knowledge Discovery in Research with Graphs
Neo4j
 
How to Design Retail Recommendation Engines with Neo4j
Neo4j
 
Web crawler
poonamkenkre
 
Knowledge Graphs for Transformation: Dynamic Context for the Intelligent Ente...
Neo4j
 
Neo4j GraphSummit London March 2023 Emil Eifrem Keynote.pptx
Neo4j
 
R-Studio Vs. Rcmdr
Syracuse University
 
Graphs for Enterprise Architects
Neo4j
 
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Smarter Fraud Detection With Graph Data Science
Neo4j
 
Neanex - Semantic Construction with Graphs
Neo4j
 
7. Key-Value Databases: In Depth
Fabio Fumarola
 
LeNet to ResNet
Somnath Banerjee
 
Introduction to Graph Neural Networks: Basics and Applications - Katsuhiko Is...
Preferred Networks
 
Python Scipy Numpy
Girish Khanzode
 
4 Dimensionality reduction (PCA & t-SNE)
Dmytro Fishman
 
Data visualization in Python
Marc Garcia
 
Visual Question Answering 2.0
Universitat Politècnica de Catalunya
 
Data Cleaning Techniques
Amir Masoud Sefidian
 
Full Stack Graph in the Cloud
Neo4j
 
Graph Gurus Episode 31: GSQL Writing Best Practices Part 1
TigerGraph
 
Elsevier: Empowering Knowledge Discovery in Research with Graphs
Neo4j
 

Viewers also liked (7)

PPTX
Node.js Event Emitter
Eyal Vardi
 
PDF
WebSockets wiith Scala and Play! Framework
Fabio Tiriticco
 
PDF
webMethods World: How Can You Innovate Even Faster With the Latest webMethods...
Software AG
 
PPTX
MQTT簡介與使用開放原始碼
Wei-Tsung Su
 
PPTX
WebSocket MicroService vs. REST Microservice
Rick Hightower
 
PPTX
Node.js Spplication Scaling
Eyal Vardi
 
PDF
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
sametmax
 
Node.js Event Emitter
Eyal Vardi
 
WebSockets wiith Scala and Play! Framework
Fabio Tiriticco
 
webMethods World: How Can You Innovate Even Faster With the Latest webMethods...
Software AG
 
MQTT簡介與使用開放原始碼
Wei-Tsung Su
 
WebSocket MicroService vs. REST Microservice
Rick Hightower
 
Node.js Spplication Scaling
Eyal Vardi
 
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
sametmax
 
Ad

Similar to API Design and WebSocket (20)

PDF
The Web of Things
Frank Greco
 
PDF
Past, Present and Future of WebSocket - HTML5DevConf May 2014
Frank Greco
 
PDF
WebSocket Perspectives and Vision for the Future - HTML5DevConf Oct 2013 SF
Frank Greco
 
PDF
WebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoT
Frank Greco
 
PDF
The Web of Things - IoTExpo SF - May 2014
Frank Greco
 
PDF
WebSocket Perspectives and Vision for the Future
Frank Greco
 
PDF
IoT - Understanding internet of things
veerababu penugonda(Mr-IoT)
 
PDF
Embedded systems: Future perspectives
Giuseppe La Torre
 
PDF
DevCon 5 (July 2013) - WebSockets
Crocodile WebRTC SDK and Cloud Signalling Network
 
PDF
What's new in web standards?
Daniel Appelquist
 
PPTX
WebSockets-Revolutionizing-Real-Time-Communication.pptx
YasserLina
 
PDF
Web Services for the Internet of Things
Markku Laine
 
PDF
From the Internet of Things to Intelligent Systems A Developer's Primer - Gar...
Rick G. Garibay
 
PPTX
Introduction to IoT.pptx for btech students
saritanayak23
 
PPTX
IOT Communication And Open Platforms 4TH UNIT.pptx
asddinesh23
 
PPTX
IP based standards for IoT
Michael Koster
 
PDF
The Web, After HTML5
Jonathan Jeon
 
PPTX
APIs at the Edge
Red Hat
 
PPTX
Internet of things(iot)
Rakesh Gupta
 
PDF
Building real time applications with Symfony2
Antonio Peric-Mazar
 
The Web of Things
Frank Greco
 
Past, Present and Future of WebSocket - HTML5DevConf May 2014
Frank Greco
 
WebSocket Perspectives and Vision for the Future - HTML5DevConf Oct 2013 SF
Frank Greco
 
WebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoT
Frank Greco
 
The Web of Things - IoTExpo SF - May 2014
Frank Greco
 
WebSocket Perspectives and Vision for the Future
Frank Greco
 
IoT - Understanding internet of things
veerababu penugonda(Mr-IoT)
 
Embedded systems: Future perspectives
Giuseppe La Torre
 
DevCon 5 (July 2013) - WebSockets
Crocodile WebRTC SDK and Cloud Signalling Network
 
What's new in web standards?
Daniel Appelquist
 
WebSockets-Revolutionizing-Real-Time-Communication.pptx
YasserLina
 
Web Services for the Internet of Things
Markku Laine
 
From the Internet of Things to Intelligent Systems A Developer's Primer - Gar...
Rick G. Garibay
 
Introduction to IoT.pptx for btech students
saritanayak23
 
IOT Communication And Open Platforms 4TH UNIT.pptx
asddinesh23
 
IP based standards for IoT
Michael Koster
 
The Web, After HTML5
Jonathan Jeon
 
APIs at the Edge
Red Hat
 
Internet of things(iot)
Rakesh Gupta
 
Building real time applications with Symfony2
Antonio Peric-Mazar
 
Ad

Recently uploaded (20)

PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
July Patch Tuesday
Ivanti
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
July Patch Tuesday
Ivanti
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 

API Design and WebSocket

  • 1. API Design and WebSocket WoT Next? @frankgreco
  • 2. Background § Director of Technology @ Kaazing § Chairman NYJavaSIG (javasig.com) § Largest JUG in North America 8,000+ members § Financial Services, Architecture, Cloud § [email protected], @frankgreco
  • 3. A Primary Tenet of Computing History History If History Repeats Itself, Is There No Future?
  • 4. A Trip Down Memory Lane… In the beginning…
  • 5. Enterprise – “inside the firewall” (1980’s – early 90’s) tcp Client-Server
  • 6. Web – “over the firewall” (early 90’s – 2011) http tcp web server and/or app server app protocols Not efficient or effective for event-based systems…
  • 7. But Modern Applications are Dynamic and Event-based FX trading Monitoring Stock trading Utilities trading XaaS Logistics Notification Compliance Betting & bidding Voting In-store & online Collaboration
  • 8. Legacy Web u Designed for document transfer – HTTP ü Short-lived Request / Response interaction u Bidirectional, but half-duplex ü Traffic flows in only one direction at a time u Stateless ü Large amounts of metadata resent for each request The Web was not originally designed for “real-time”, event-based services…
  • 9. WebSocket – “TCP for the Web” u IETF Protocol and W3C JavaScript API for real-time, bi-directional, always-on connections u RFC 6455 – Dec 2011 u Easily add event-based data to web apps ü ws://mycompany.com/collaboration_svc ü wss://anothercompany.com/marketdata u Avoids polling u Avoids HTTP meta-data overhead u Shares port with HTTP (80/443) u Traverses Firewalls
  • 11. For Event-based Web Communication… Legacy HTTP vs WebSocket http:// ws:// u Application-level Socket over the Web u Supported by all Modern Browsers u Event-based Applications
  • 13. W3C WebSocket JavaScript API HTML5 WebSocket API But… Dealing with WebSocket is like dealing with TCP. It’s a streams-based model. You need to understand how to handle streams-based data over the wire. e.g., How do I do publish/subscribe?
  • 14. What is Missing? Where is the Application-level Protocol? Who handles retries? How do we handle publish/ subscribe semantics? How do we handle market data? How can we guarantee delivery? What do we do with slow consumers, last value cache, etc? What if the client is not currently active? What about partial data? How do I handle entitlements? ACL?
  • 15. Browser and Native Applications JMS XMPP AMQP B2B FTP VNC MQTT etc WebSocket TCP/IP Internet WebSocket Gateway WebSocket Gateway Protocol Layering is Possible WebSocket is a Transport layer
  • 16. Simplicity is a Useful Abstraction! Simplicity enables Innovation Complexity Innovation Higher Level APIs Reduce Complexity
  • 17. Higher Level APIs (over WebSocket) for JavaScript So if you can layer application protocols and APIs over WebSocket, what do you have? u Easier WebSocket programmability u Event-driven applications over the web u Event-driven APIs over the web u Not necessary to open non-standard ports u Web infrastructure now truly “disappears” u Reduction in complexity u Further opportunities to innovate u Mobile + cloud + HTML5/WebSocket u Internet of Things -> Web of Things u “Imagination is Everything”
  • 18. Publish/Subscribe Java Message Service (JMS) over WebSocket For Example…
  • 19. Java Message Service (JMS) u Java EE Message Oriented Middleware u JMS 1.0 2001, JMS 1.1 2002, JMS 2.0 2013 u Asynchronous Messaging vs. RPC u Loosely coupled vs. Tightly coupled u Pub/Sub, Topics, Queues u Transactions, Reliable
  • 20. Basic JMS conn = createConnection(); sess = conn.createSession(); topic = jndiContext.lookup(topic); pub = sess.createProducer(topic); pub.send(“hey Frank”); conn = createConnection(); sess = conn.createSession(); topic = jndiContext.lookup(topic); sub = sess.createConsumer(topic); sub.setMessageListener(this); … public void onMessage(Message m) { String s = m.getText(); … do stuff… } conn = createConnection(); sess = conn.createSession(); topic = jndiContext.lookup(topic); sub = sess.createConsumer(topic); sub.setMessageListener(this); … public void onMessage(Message m) { String s = m.getText(); … do stuff… } conn = createConnection(); sess = conn.createSession(); topic = jndiContext.lookup(topic); sub = sess.createConsumer(topic); sub.setMessageListener(this); … public void onMessage(Message m) { String s = m.getText(); … do stuff… } msg broker
  • 21. JMS Over the Web (JavaScript) Browser app - 100 msg/sec over port 80/443
  • 22. What WebSocket is Not u It is not a New AJAX AJAX was a lovable hack u It is not a Push mechanism WebSocket is full-duplex, bi-directional u It is not a Messaging system It’s an agnostic wire protocol It’s a low-level transport API u It is not a Replacement for HTTP HTTP is still great for static, cacheable info
  • 23. What’s next for WebSocket?
  • 24. Internet of Things (IoT) + Heterogeneity + Scale + Usability Futures
  • 25. The World is Naturally Event-based (“real-time”) Presentation Music Communication Logistics Big Data Risk Management Home Security Health Monitoring Intelligent Appliances Local Transportation Monitoring/ Management Remote control
  • 27. Let’s Take 1 Step Back to go 2 Steps Ahead… u Internet – Global system of interconnected networks that use IP to communicate u Internetworking – Connecting one network with another through a series of Gateways that provide a common method of communication
  • 28. The Web u A popular application service on the Internet u Based on TCP/IP u Advantages § Application deployment simplified – URI § Interoperable open standards and specifications § Ease of programmability – scripting § Global reach and Economy of scale § Accessed by ubiquitous Browsers and also non-Browsers u Two major protocols HTTP (1988/1999) and WebSocket (2007/2011)
  • 29. The Hidden Web – Most of the Web is Not Visible browsers APIs http://thumbs.dreamstime.com/x/iceberg-23503494.jpg
  • 30. Now… IoT, IIoT and M2M u A riff on “Ubiquitous Computing” (“Pervasive”) • Mark Weisner PARC 1988 u Its early so there’s different definitions • Similar to early days of Cloud Computing u M2M has been around for decades. • Primarily proprietary embedded systems and typically point-to-point (RPC) u IoT/IIoT (Industrial IoT) • Adds Internet connectivity • Networks of M2M systems connected via IP
  • 31. IoT/IIoT – Connectivity isn’t Sufficient u No formal API standards u Many protocol standards – interoperability low u No common, wide-reaching frameworks u No composition possibilities u Difficult to leverage economies of scale u Barrier to entry is high for millions of app developers u Also… we’re in a cloud, mobile, web api world
  • 32. u IoT – Internet of Things • Embedded computing endowed with Internet connectivity u WoT – Web of Things • Application and Services layer over IoT Developers! u Apply the benefits of the Web to IoT u WoT is a uniform interface to access IoT functionality u Provides the abstraction for control/monitoring (sensors/ actuators) u Accelerates innovation u Deployment, development, interoperability, economy of scale… IoT WoT Here’s Where the Web Comes In
  • 33. But Is HTTP the Right Choice? u Disadvantages of HTTP Request/Response u Lack of resiliency and robustness u Enterprise events retrieved by resource intensive polling techniques • Much bandwidth is wasted • Information can be delayed u Composite services brittle and lack transactionality u Enterprises learned advantages of ESB 10+ years ago u See failures of CORBA, Sun RPC, etc. u Clumsy AJAX/Comet workarounds to simulate real-time
  • 34. History Repeats Itself… RPC Asynchronous RPC Messaging REST Asynchronous REST Messaging ESB ISB? Enterprise Web/WoT • Can wait for response • Tight coupling • Centralized business processes • Vertical interaction • Easy to understand (xact) • Future response • Loose coupling • Independent business processes • More complexity (xact) Did I mention History repeats itself?...
  • 35. The Message is the Medium “…terse, self-classified messages, networking overhead isolated to a specialized tier of devices, and publish/subscribe relationships are the only way to fully distill the power of the coming Internet of Things” – Francis daCosta
  • 36. Typically an App Server and DB App Server is probably not the right architecture Data Flow – Human Web vs WoT Human Web WoT Large data to client Small data to server Do human-readable protocols make sense for non-humans?
  • 37. GW GW GW IoT/IIoT WoT WoT WoT Event Gateway Architecture
  • 38. Event Gateway Architecture – Future Directions GW GW GW GW GW GW Aggregator nodes GW • Scalability • Querying • Performance • Manageability • Composition • Circles of Trust • Event processing • CDN++
  • 39. Demos Click to Edit Master Title Style