SlideShare una empresa de Scribd logo
1 de 67
Descargar para leer sin conexión
goo.gl/tZZdKa
WebSocket Perspectives 2015
Clouds, Streaming, Microservices and the Web of Things
@frankgreco
goo.gl/tZZdKa
Background
§  Director of Technology
§  Chairman NYJavaSIG (javasig.com)
§  Largest Java UG in NA 8k+ members
§  First Java UG ever! Sept 1995
§  email: frank.greco@kaazing.com
§  Twitter: @frankgreco
§  Yell: “Hey Frank!”
goo.gl/tZZdKa
WIN A COPY!
goo.gl/tZZdKa
1.  Introduction to HTML5 WebSocket
2.  The WebSocket API
3.  The WebSocket Protocol
4.  Building Instant Messaging and Chat over
WebSocket with XMPP
5.  Using Messaging over WebSocket with STOMP
6.  VNC with the Remote Frame Buffer Protocol
7.  WebSocket Security
8.  Deployment Considerations
goo.gl/tZZdKa
WIN A COPY!
goo.gl/tZZdKa
§  Web Communications Then and Now
§  Web APIs
§  Communications Models, Protocols, Frameworks
§  Where WebSocket Fits
§  IoT/WoT
§  Microservices Transports
§  Cloud Connectivity
Outline – Things to Consider
goo.gl/tZZdKa
goo.gl/tZZdKa
tcp
http
web server
and/or
app server
app protocols
Web – “over the firewall” (early 90’s – 2011)
Page and Visitor hits used to be the report card
You are visitor ßRemember these?
goo.gl/tZZdKa
goo.gl/tZZdKa
The Hidden Web – Most of the Web is Not Visible
http://thumbs.dreamstime.com/x/iceberg-23503494.jpg
browsers
APIs
goo.gl/tZZdKa
goo.gl/tZZdKa
3,617,293,229You are API call # today
2,391You are visitor # this year
2015
2012
goo.gl/tZZdKa
§  APIs from Everywhere, Consumed by Every [one|thing]
§  ~14K public APIs and even more Mashups
§  programmableweb.com/apis/directory
§  Amazon, Facebook, LinkedIn, AT&T, Google, Microsoft,
NYTimes, Orange, SalesForce, Telefonica, Twitter, Visa,
Vodafone, Bloomberg, NYSE, Thomson-Reuters, etc.
§  Over time, more will be event-based
§  Enterprise and B2B APIs
§  Services… Services… Services…
Explosion of Open Web APIs
goo.gl/tZZdKa
Chuck Norris has an API and It can Kill you
% groovy -e 
'println new URL("http://api.icndb.com/jokes/random").getText()”
| grep joke | tr -d "{}" | sed -e 's/.*joke": "//' -e 's/".*$//’
Chuck Norris compresses his files by doing a flying round
house kick to the hard drive.
% groovy -e 
'println new URL("http://api.icndb.com/jokes/random").getText()”
| grep joke | tr -d "{}" | sed -e 's/.*joke": "//' -e 's/".*$//’
Chuck Norris played Russian Roulette with a fully loaded gun
and won.
goo.gl/tZZdKa
Using the Web without a Browser
% REPO=kaazing/gateway
% printf 'As of %s, repo [%s] has %s forksn' 
"`date +%D`”
$REPO
`curl --user ”XXXXX:YYYYY" https://api.github.com/repos/$REPO 2>&1
grep -i forks_count |
cut -d: -f2 |
tr -d ,`
As of 10/16/15, repo [kaazing/gateway] has 34 forks
Services integration from anywhere on the planet
to any device.
goo.gl/tZZdKa
goo.gl/tZZdKa
Services integration is important.
Asynchronicity is next.
goo.gl/tZZdKa
History
History
A Primary Tenet of Computing
If History Repeats Itself, Is There No Future?
goo.gl/tZZdKa
Reactive Programming, Streams and Events – The Alive Web
Reactive programming is programming
with asynchronous data streams.
Functional Reactive Programming
goo.gl/tZZdKa
goo.gl/tZZdKa
Web Communication Protocols for Event-Driven World
HTTP/1.1 – 1997
RFC 2068
Great for caching, synchronous req/
resp, XHR for client async polling
(AJAX), Comet for push
HTTP/2 – 2015
RFC 7540
Binary, mux over TCP, header
compression, server can push into
client cache, AJAX/Comet, 30-50%+
WebSocket – 2011
RFC 6455
Binary/Text, full-duplex, persistent
connection, TCP for the Web
JSR 356/JEE7
SSE HTML5 – 2009
W3C
Standardization of Comet (push),
uni-directional, uses HTTP
goo.gl/tZZdKa
Web Communication Mechanisms for Event-Driven World
Web Notifications
2015 - W3C
Browser Notifications outside webpage, can
use with Service Workers (and WS)
Push API
2015 - W3C
Scripted access to push data, use with
Service Workers (and WS)
2007
User-defined HTTP callbacks (POST)
Event-driven architecture, non-blocking I/O
API, JS for server
2009
Java/WebSocket JSR 356 – Glassfish OpenMQ
Java/C API
2013-2014
goo.gl/tZZdKa
Do I Still Use WebSocket with HTTP/2?
§  WebSocket is not a REST (JAX-RS/Jersey)
replacement.
§  WebSocket is complementary to HTTP (and REST)
§  Simple Notifications can be easily done with HTTP
§  Higher level APIs for Polyglot world Needed (e.g., JS)
§  WebSocket used for Full-duplex Persistent
connection… a TCP for the Web
§  Non-Browser use is where it gets interesting
goo.gl/tZZdKa
§  Kaazing
§  Java EE – JSR 356, Project Tyrus, Grizzly
§  Node.js/socket.io/SockJS/engine.io
§  ActiveMQ
§  Tomcat
§  Jetty
§  Oracle Glassfish
§  Play Framework – Reactive Apps
§  Rabbit MQ
§  JBoss
§  IIS/ASP .NET 4.5
§  PHP, Objective-C, Ruby, Python, C/C++, JVM-
langs…
§  Many more… (100+ implementations)
WebSocket Projects
goo.gl/tZZdKa
WebSocket
TCP/IP
JMS XMPP AMQP B2B FTP VNC MQTT etc
Browser and Native Applications
WebSocket
Gateway
Internet
WebSocket
Gateway
Protocol Layering is Possible
WebSocket is a
Transport layer
Protocols are the
key to
Integration
goo.gl/tZZdKa
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?
What do Protocols give us?
goo.gl/tZZdKa
Internet of Things (IoT) – Java ME
+
Heterogeneity + Scale + Usability
WoT Now?
goo.gl/tZZdKa
Communication
Presentation Music
Logistics
Big
Data
Risk
Management
Home
Security
Health
Monitoring
Intelligent
Appliances
Local
Transportation
Monitoring/
Management
Remote
control
The World is Naturally Event-based (“real-time”)
goo.gl/tZZdKa
Web of Things – Its All About SERVICES!
http://www.w3.org/2014/02/wot/
goo.gl/tZZdKa
goo.gl/tZZdKa
§  No formal API standards
§  Many protocol standards – interoperability low
§  No common, wide-reaching frameworks
§  No composition possibilities
§  Difficult to leverage economies of scale
§  Barrier to entry is high for millions of app developers
IoT/IIoT – Connectivity isn’t Sufficient
goo.gl/tZZdKa
§  IoT – Internet of Things
Embedded computing endowed with Internet connectivity
§  WoT – Web of Things
Application and Services layer over IoT
IoT
WoT
Developers!
Here’s Where the Web Comes In
goo.gl/tZZdKa
§  Apply the benefits of the Web to IoT
§  WoT is a uniform interface to access IoT functionality
§  Provides the abstraction for control/monitoring
(sensors/actuators)
§  Accelerates innovation
§  Deployment, development, interoperability, economy of
scale…
Here’s Where the Web Comes In
goo.gl/tZZdKa
§  Disadvantages of HTTP Request/Response
§  Lack of resiliency and robustness
§  Enterprise events retrieved by resource intensive polling
techniques
Ø Much bandwidth is wasted
Ø Information can be delayed
§  Composite services brittle and lack transactionality
§  Enterprises learned advantages of ESB 10+ years ago
§  See failures of CORBA, Sun RPC, etc.
§  Clumsy AJAX/Comet workarounds to simulate real-time
But Is HTTP the Right Choice?
goo.gl/tZZdKa
“…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
The Message is the Medium
goo.gl/tZZdKa
Typically an App
Server and DB
App Server is
probably not the
right
architecture
Human
Web
WoT
Large data to client
Small data to server
Data Flow – Human Web vs WoT
Do human-readable protocols make sense for non-humans?
goo.gl/tZZdKa
goo.gl/tZZdKa
Why are we talking about Microservices?
§  It’s an SOA (lightweight SOA)
§  It’s SOA without WS-*, SOAP, etc, crap
§  Older technique now useful with modern
infrastructure
§  An App is a Collection of Services
§  Nothing really “micro” about Microservices
§  If you need more than two pizzas to feed the
team with the largest service, its not small
enough
goo.gl/tZZdKa
Monoliths vs Microservices
§  Long builds, complex internals, scale issues
§  Scale by replicating entire monolith on multiple
servers
§  Hard to modify
§  Not necessarily bad – depends on team
Monoliths
goo.gl/tZZdKa
Monoliths vs Microservices
§  Small services – more agile
§  Scale by replicating services
§  Independent distributed services
§  The Unix way
§  % cat myfile | tr "A-Z" "a-z" | tr -cs 'a-z' 'n' | sort | uniq
§  Requires more management
§  Still early
Microservices
But we’ve had this idea for a while…
Let’s take a step back
goo.gl/tZZdKa
A Trip Down Memory Lane…
In the beginning…
IBM VM/370
goo.gl/tZZdKa
History of Separate, Protected Environments
•  IBM VM/370 – 1972
•  hypervisor emulated a machine
•  Separate addr space, virtual devices, fs
•  Unix chroot(2) – 1979 Unix V7
•  Created a virtual root of fs
•  Useful for testing a clean environment
•  Shared users, procs, network – imperfect
•  BSD Jails - 2000
•  Virtual root fs, hostname, IP addr, users, su
•  Still shared host OS
goo.gl/tZZdKa
History of Separate, Protected Environments
•  Solaris – Zones/Containers - 2004
•  Totally isolated, secure system resources
•  “Zones” renamed “Containers” then back to “Zones”
•  Separate CPU resources, memory and network
•  Very low overhead. No hypervisor required
•  LXC – Linux Containers – 2008
•  Run multiple Linux instances on a single Linux
•  Uses cgroups – to manage cpu, memory, i/o, of a
collection of processes
•  Docker – 2013
•  Auto deployment
•  Adds its own libcontainer for linux virtualization
•  Rides PaaS trend
goo.gl/tZZdKa
Containers vs Virtual Machines (VM)
Server
Host OS
Hypervisor
Server
Host OS
Guest OS Guest OS Guest OS
bin/libs bin/libs bin/libs
App A App B App C
bin/libs
App
A
App
B
bin/libs
App
C
App
D
App
E
container container
goo.gl/tZZdKa
Containers vs Virtual Machines (VM)
Server
Host OS
Hypervisor
Server
Host OS
Guest OS Guest OS Guest OS
bin/libs bin/libs bin/libs
App A App B App C
bin/libs
App
A
App
B
bin/libs
App
C
App
D
App
E
container container
Container Engine
goo.gl/tZZdKa
Clouds and Microservices – the bottom line
§  More services per an OS
§  Greater Services Mobility – dev and ops
§  Easier application patching
§  Faster provisioning
§  10 min for VM, 10 sec (or less) for microservice
§  Container internals visible to help maximize
optimization
§  Avoids cloud framework lock
§  Intercloud portability
§  Allows services to be located most appropriate
part of architecture
§  Allows policies to be applied per container
goo.gl/tZZdKa
Clouds and Microservices – the bottom line
§  The Microservices Synchronicity Penalty
§  Many ecommerce sites use 150-200
microservices for personalization. Amazon.com
§  Many are REST-based… ie, synchronous (wait for
a reply). And many are chained, so the penalty
is additive.
§  Significant resources are needed for high levels
of scalability (S = G/C)
goo.gl/tZZdKa
goo.gl/tZZdKa
Enterprise
Customer
Service	
  
• Access must be on-demand, secure and real-time
• Requires lengthy VPN installation process, open ports or worse
Service	
  
Cloud services frequently require on-premises access
VPN
TCP
WebSocket for Hybrid Cloud Connectivity
goo.gl/tZZdKa
Click to Edit Master Title Style
Demos
goo.gl/tZZdKa
WIN A COPY!
goo.gl/tZZdKa
1.  Introduction to HTML5 WebSocket
2.  The WebSocket API
3.  The WebSocket Protocol
4.  Building Instant Messaging and Chat over
WebSocket with XMPP
5.  Using Messaging over WebSocket with STOMP
6.  VNC with the Remote Frame Buffer Protocol
7.  WebSocket Security
8.  Deployment Considerations
goo.gl/ebiksb
WIN A COPY!
goo.gl/tZZdKa
Stretching Web Communication to Its Limits
goo.gl/tZZdKa
Browser - Server
Stretching Web Communication to Its Limits
goo.gl/tZZdKa
TodoMVC – Angular with Kaazing
goo.gl/tZZdKa
Browser - Server
Native (mobile, desktop) - Server
Stretching Web Communication to Its Limits
goo.gl/tZZdKa
In a single 3½ hour race,
[racing company] broadcasts
over 6 times as many messages
as Twitter does in an entire day
Twitter
Traffic
(Daily)
NASCAR
Traffic
(One race)
0
1 billion
2 billion
3 billion
Messagesperday
1.5 billion
2.5 billion
3.5 billion
0.5 billion
Over a Billion Messages an Hour
goo.gl/tZZdKa
Browser - Server
Native (mobile, desktop) - Server
IoT/Embedded - Server
Stretching Web Communication to Its Limits
goo.gl/tZZdKa
Browser - Server
Native (mobile, desktop) - Server
IoT/Embedded - Server
Server - Server
Stretching Web Communication to Its Limits
goo.gl/tZZdKa
CloudOn-Premise
LDAP Server
SaaS
Application
LDAP Client
A2A for B2B. No VPN Needed.
goo.gl/tZZdKa
CloudOn-Premise
LDAP Server
SaaS
Application
LDAP Client
A2A for B2B. No VPN Needed.
goo.gl/tZZdKa
CloudOn-Premise
LDAP Server
SaaS
Application
LDAP Client
A2A for B2B. No VPN Needed.
goo.gl/tZZdKa
CloudOn-Premise
LDAP Server
SaaS
Application
LDAP Client
A2A for B2B. No VPN Needed.
goo.gl/tZZdKa
CloudOn-Premise
LDAP Server
SaaS
Application
LDAP Client
A2A for B2B. No VPN Needed.
goo.gl/tZZdKa
CloudOn-Premise
LDAP Server
SaaS
Application
LDAP Client
A2A for B2B. No VPN Needed.
goo.gl/tZZdKa
1.  Introduction to HTML5 WebSocket
2.  The WebSocket API
3.  The WebSocket Protocol
4.  Building Instant Messaging and Chat over
WebSocket with XMPP
5.  Using Messaging over WebSocket with STOMP
6.  VNC with the Remote Frame Buffer Protocol
7.  WebSocket Security
8.  Deployment Considerations
goo.gl/ebiksb
WIN A COPY!
goo.gl/tZZdKa
Raffle time
% echo $(( $RANDOM % 50 + 1 ))
45
goo.gl/tZZdKa
Thank You!
@frankgreco

Más contenido relacionado

La actualidad más candente

vlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentationvlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets PresentationVolodymyr Lavrynovych
 
Top 10 real life WebSocket use cases & experiences - Devoxx UK 2015
Top 10 real life WebSocket use cases & experiences - Devoxx UK 2015Top 10 real life WebSocket use cases & experiences - Devoxx UK 2015
Top 10 real life WebSocket use cases & experiences - Devoxx UK 2015Rich Cullen
 
Connecting Physical Devices to the Web - Event Driven Architecture using WebS...
Connecting Physical Devices to the Web - Event Driven Architecture using WebS...Connecting Physical Devices to the Web - Event Driven Architecture using WebS...
Connecting Physical Devices to the Web - Event Driven Architecture using WebS...Peter Moskovits
 
Real Life WebSocket Case Studies and Demos
Real Life WebSocket Case Studies and DemosReal Life WebSocket Case Studies and Demos
Real Life WebSocket Case Studies and DemosPeter Moskovits
 
Building great mobile apps: Somethings you might want to know
Building great mobile apps: Somethings you might want to knowBuilding great mobile apps: Somethings you might want to know
Building great mobile apps: Somethings you might want to knowshwetank
 
Getting Started with WebSocket and Server-Sent Events in Java
Getting Started with WebSocket and Server-Sent Events in JavaGetting Started with WebSocket and Server-Sent Events in Java
Getting Started with WebSocket and Server-Sent Events in JavaArun Gupta
 
WebRTC - On Standards, Identity and Telco Strategy
WebRTC - On Standards, Identity and Telco StrategyWebRTC - On Standards, Identity and Telco Strategy
WebRTC - On Standards, Identity and Telco StrategyJose de Castro
 
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!Masoud Kalali
 
Getting Started with WebSockets and Server-Sent Events
Getting Started with WebSockets and Server-Sent EventsGetting Started with WebSockets and Server-Sent Events
Getting Started with WebSockets and Server-Sent EventsArun Gupta
 
WebGL and Real-Time Web Communication
WebGL and Real-Time Web CommunicationWebGL and Real-Time Web Communication
WebGL and Real-Time Web CommunicationPeter Moskovits
 
Blockchain as a Service and Hyperledger in 15 Minutes
Blockchain as a Service and Hyperledger in 15 MinutesBlockchain as a Service and Hyperledger in 15 Minutes
Blockchain as a Service and Hyperledger in 15 MinutesStefania Kaczmarczyk
 
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(3)
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(3)課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(3)
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(3)Jollen Chen
 
Apache httpd 2.4 overview
Apache httpd 2.4 overviewApache httpd 2.4 overview
Apache httpd 2.4 overviewJim Jagielski
 

La actualidad más candente (19)

The HTML5 WebSocket API
The HTML5 WebSocket APIThe HTML5 WebSocket API
The HTML5 WebSocket API
 
vlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentationvlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentation
 
Top 10 real life WebSocket use cases & experiences - Devoxx UK 2015
Top 10 real life WebSocket use cases & experiences - Devoxx UK 2015Top 10 real life WebSocket use cases & experiences - Devoxx UK 2015
Top 10 real life WebSocket use cases & experiences - Devoxx UK 2015
 
J web socket
J web socketJ web socket
J web socket
 
Connecting Physical Devices to the Web - Event Driven Architecture using WebS...
Connecting Physical Devices to the Web - Event Driven Architecture using WebS...Connecting Physical Devices to the Web - Event Driven Architecture using WebS...
Connecting Physical Devices to the Web - Event Driven Architecture using WebS...
 
Real Life WebSocket Case Studies and Demos
Real Life WebSocket Case Studies and DemosReal Life WebSocket Case Studies and Demos
Real Life WebSocket Case Studies and Demos
 
WebSockets - Boosting Web Communication - SDC 2011
WebSockets - Boosting Web Communication - SDC 2011WebSockets - Boosting Web Communication - SDC 2011
WebSockets - Boosting Web Communication - SDC 2011
 
Building great mobile apps: Somethings you might want to know
Building great mobile apps: Somethings you might want to knowBuilding great mobile apps: Somethings you might want to know
Building great mobile apps: Somethings you might want to know
 
Getting Started with WebSocket and Server-Sent Events in Java
Getting Started with WebSocket and Server-Sent Events in JavaGetting Started with WebSocket and Server-Sent Events in Java
Getting Started with WebSocket and Server-Sent Events in Java
 
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerryjWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
 
WebRTC - On Standards, Identity and Telco Strategy
WebRTC - On Standards, Identity and Telco StrategyWebRTC - On Standards, Identity and Telco Strategy
WebRTC - On Standards, Identity and Telco Strategy
 
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
 
Getting Started with WebSockets and Server-Sent Events
Getting Started with WebSockets and Server-Sent EventsGetting Started with WebSockets and Server-Sent Events
Getting Started with WebSockets and Server-Sent Events
 
HTML5 ADEO
HTML5 ADEOHTML5 ADEO
HTML5 ADEO
 
WebGL and Real-Time Web Communication
WebGL and Real-Time Web CommunicationWebGL and Real-Time Web Communication
WebGL and Real-Time Web Communication
 
Blockchain as a Service and Hyperledger in 15 Minutes
Blockchain as a Service and Hyperledger in 15 MinutesBlockchain as a Service and Hyperledger in 15 Minutes
Blockchain as a Service and Hyperledger in 15 Minutes
 
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(3)
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(3)課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(3)
課程名稱:八屏一雲時代來臨 教你HTML5六小時打通(3)
 
Grizzly 20080925 V2
Grizzly 20080925 V2Grizzly 20080925 V2
Grizzly 20080925 V2
 
Apache httpd 2.4 overview
Apache httpd 2.4 overviewApache httpd 2.4 overview
Apache httpd 2.4 overview
 

Similar a WebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoT

Going Live! with Comet
Going Live! with CometGoing Live! with Comet
Going Live! with CometSimon Willison
 
Web of Things - Connecting People and Objects on the Web
Web of Things - Connecting People and Objects on the WebWeb of Things - Connecting People and Objects on the Web
Web of Things - Connecting People and Objects on the WebDominique Guinard
 
Nodejs and WebSockets
Nodejs and WebSocketsNodejs and WebSockets
Nodejs and WebSocketsGonzalo Ayuso
 
HTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the WebHTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the WebPeter Lubbers
 
The Web of Things
The Web of ThingsThe Web of Things
The Web of ThingsFrank Greco
 
Monitoring the unknown, 1000*100 series a day - Big Data Vilnius 2017
Monitoring the unknown, 1000*100 series a day - Big Data Vilnius 2017Monitoring the unknown, 1000*100 series a day - Big Data Vilnius 2017
Monitoring the unknown, 1000*100 series a day - Big Data Vilnius 2017Quentin Adam
 
V2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocketV2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocketbrent bucci
 
Nuts and Bolts of WebSocket Devoxx 2014
Nuts and Bolts of WebSocket Devoxx 2014Nuts and Bolts of WebSocket Devoxx 2014
Nuts and Bolts of WebSocket Devoxx 2014Arun Gupta
 
Introduction to WebSockets
Introduction to WebSocketsIntroduction to WebSockets
Introduction to WebSocketsGunnar Hillert
 
Nodejs a-practical-introduction-oredev
Nodejs a-practical-introduction-oredevNodejs a-practical-introduction-oredev
Nodejs a-practical-introduction-oredevFelix Geisendörfer
 
FIWARE Wednesday Webinars - Short Term History within Smart Systems
FIWARE Wednesday Webinars - Short Term History within Smart SystemsFIWARE Wednesday Webinars - Short Term History within Smart Systems
FIWARE Wednesday Webinars - Short Term History within Smart SystemsFIWARE
 
Comet: Making The Web a 2-Way Medium
Comet: Making The Web a 2-Way MediumComet: Making The Web a 2-Way Medium
Comet: Making The Web a 2-Way MediumJoe Walker
 
Supercharge your IOT toolbox with MQTT and Node-RED
Supercharge your IOT toolbox with MQTT and Node-REDSupercharge your IOT toolbox with MQTT and Node-RED
Supercharge your IOT toolbox with MQTT and Node-REDSimen Sommerfeldt
 
The State of WebSockets in Django
The State of WebSockets in DjangoThe State of WebSockets in Django
The State of WebSockets in DjangoRami Sayar
 
Why you’re going to fail running java on docker!
Why you’re going to fail running java on docker!Why you’re going to fail running java on docker!
Why you’re going to fail running java on docker!Red Hat Developers
 
Real-Time Python Web: Gevent and Socket.io
Real-Time Python Web: Gevent and Socket.ioReal-Time Python Web: Gevent and Socket.io
Real-Time Python Web: Gevent and Socket.ioRick Copeland
 
End-to-end HTML5 APIs - The Geek Gathering 2013
End-to-end HTML5 APIs - The Geek Gathering 2013End-to-end HTML5 APIs - The Geek Gathering 2013
End-to-end HTML5 APIs - The Geek Gathering 2013Alexandre Morgaut
 

Similar a WebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoT (20)

Going Live! with Comet
Going Live! with CometGoing Live! with Comet
Going Live! with Comet
 
Web of Things - Connecting People and Objects on the Web
Web of Things - Connecting People and Objects on the WebWeb of Things - Connecting People and Objects on the Web
Web of Things - Connecting People and Objects on the Web
 
Nodejs and WebSockets
Nodejs and WebSocketsNodejs and WebSockets
Nodejs and WebSockets
 
Grizzly Comet Aquarium Paris
Grizzly Comet Aquarium ParisGrizzly Comet Aquarium Paris
Grizzly Comet Aquarium Paris
 
HTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the WebHTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the Web
 
The Web of Things
The Web of ThingsThe Web of Things
The Web of Things
 
Monitoring the unknown, 1000*100 series a day - Big Data Vilnius 2017
Monitoring the unknown, 1000*100 series a day - Big Data Vilnius 2017Monitoring the unknown, 1000*100 series a day - Big Data Vilnius 2017
Monitoring the unknown, 1000*100 series a day - Big Data Vilnius 2017
 
Time for Comet?
Time for Comet?Time for Comet?
Time for Comet?
 
V2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocketV2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocket
 
Nuts and Bolts of WebSocket Devoxx 2014
Nuts and Bolts of WebSocket Devoxx 2014Nuts and Bolts of WebSocket Devoxx 2014
Nuts and Bolts of WebSocket Devoxx 2014
 
Introduction to WebSockets
Introduction to WebSocketsIntroduction to WebSockets
Introduction to WebSockets
 
Nodejs a-practical-introduction-oredev
Nodejs a-practical-introduction-oredevNodejs a-practical-introduction-oredev
Nodejs a-practical-introduction-oredev
 
FIWARE Wednesday Webinars - Short Term History within Smart Systems
FIWARE Wednesday Webinars - Short Term History within Smart SystemsFIWARE Wednesday Webinars - Short Term History within Smart Systems
FIWARE Wednesday Webinars - Short Term History within Smart Systems
 
Comet: Making The Web a 2-Way Medium
Comet: Making The Web a 2-Way MediumComet: Making The Web a 2-Way Medium
Comet: Making The Web a 2-Way Medium
 
Supercharge your IOT toolbox with MQTT and Node-RED
Supercharge your IOT toolbox with MQTT and Node-REDSupercharge your IOT toolbox with MQTT and Node-RED
Supercharge your IOT toolbox with MQTT and Node-RED
 
The State of WebSockets in Django
The State of WebSockets in DjangoThe State of WebSockets in Django
The State of WebSockets in Django
 
Why you’re going to fail running java on docker!
Why you’re going to fail running java on docker!Why you’re going to fail running java on docker!
Why you’re going to fail running java on docker!
 
Real-Time Python Web: Gevent and Socket.io
Real-Time Python Web: Gevent and Socket.ioReal-Time Python Web: Gevent and Socket.io
Real-Time Python Web: Gevent and Socket.io
 
End-to-end HTML5 APIs - The Geek Gathering 2013
End-to-end HTML5 APIs - The Geek Gathering 2013End-to-end HTML5 APIs - The Geek Gathering 2013
End-to-end HTML5 APIs - The Geek Gathering 2013
 
Node azure
Node azureNode azure
Node azure
 

Último

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Último (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

WebSocket Perspectives 2015 - Clouds, Streams, Microservices and WoT

  • 1. goo.gl/tZZdKa WebSocket Perspectives 2015 Clouds, Streaming, Microservices and the Web of Things @frankgreco
  • 2. goo.gl/tZZdKa Background §  Director of Technology §  Chairman NYJavaSIG (javasig.com) §  Largest Java UG in NA 8k+ members §  First Java UG ever! Sept 1995 §  email: frank.greco@kaazing.com §  Twitter: @frankgreco §  Yell: “Hey Frank!”
  • 4. goo.gl/tZZdKa 1.  Introduction to HTML5 WebSocket 2.  The WebSocket API 3.  The WebSocket Protocol 4.  Building Instant Messaging and Chat over WebSocket with XMPP 5.  Using Messaging over WebSocket with STOMP 6.  VNC with the Remote Frame Buffer Protocol 7.  WebSocket Security 8.  Deployment Considerations goo.gl/tZZdKa WIN A COPY!
  • 5. goo.gl/tZZdKa §  Web Communications Then and Now §  Web APIs §  Communications Models, Protocols, Frameworks §  Where WebSocket Fits §  IoT/WoT §  Microservices Transports §  Cloud Connectivity Outline – Things to Consider
  • 7. goo.gl/tZZdKa tcp http web server and/or app server app protocols Web – “over the firewall” (early 90’s – 2011) Page and Visitor hits used to be the report card You are visitor ßRemember these?
  • 9. goo.gl/tZZdKa The Hidden Web – Most of the Web is Not Visible http://thumbs.dreamstime.com/x/iceberg-23503494.jpg browsers APIs
  • 11. goo.gl/tZZdKa 3,617,293,229You are API call # today 2,391You are visitor # this year 2015 2012
  • 12. goo.gl/tZZdKa §  APIs from Everywhere, Consumed by Every [one|thing] §  ~14K public APIs and even more Mashups §  programmableweb.com/apis/directory §  Amazon, Facebook, LinkedIn, AT&T, Google, Microsoft, NYTimes, Orange, SalesForce, Telefonica, Twitter, Visa, Vodafone, Bloomberg, NYSE, Thomson-Reuters, etc. §  Over time, more will be event-based §  Enterprise and B2B APIs §  Services… Services… Services… Explosion of Open Web APIs
  • 13. goo.gl/tZZdKa Chuck Norris has an API and It can Kill you % groovy -e 'println new URL("http://api.icndb.com/jokes/random").getText()” | grep joke | tr -d "{}" | sed -e 's/.*joke": "//' -e 's/".*$//’ Chuck Norris compresses his files by doing a flying round house kick to the hard drive. % groovy -e 'println new URL("http://api.icndb.com/jokes/random").getText()” | grep joke | tr -d "{}" | sed -e 's/.*joke": "//' -e 's/".*$//’ Chuck Norris played Russian Roulette with a fully loaded gun and won.
  • 14. goo.gl/tZZdKa Using the Web without a Browser % REPO=kaazing/gateway % printf 'As of %s, repo [%s] has %s forksn' "`date +%D`” $REPO `curl --user ”XXXXX:YYYYY" https://api.github.com/repos/$REPO 2>&1 grep -i forks_count | cut -d: -f2 | tr -d ,` As of 10/16/15, repo [kaazing/gateway] has 34 forks Services integration from anywhere on the planet to any device.
  • 16. goo.gl/tZZdKa Services integration is important. Asynchronicity is next.
  • 17. goo.gl/tZZdKa History History A Primary Tenet of Computing If History Repeats Itself, Is There No Future?
  • 18. goo.gl/tZZdKa Reactive Programming, Streams and Events – The Alive Web Reactive programming is programming with asynchronous data streams. Functional Reactive Programming
  • 20. goo.gl/tZZdKa Web Communication Protocols for Event-Driven World HTTP/1.1 – 1997 RFC 2068 Great for caching, synchronous req/ resp, XHR for client async polling (AJAX), Comet for push HTTP/2 – 2015 RFC 7540 Binary, mux over TCP, header compression, server can push into client cache, AJAX/Comet, 30-50%+ WebSocket – 2011 RFC 6455 Binary/Text, full-duplex, persistent connection, TCP for the Web JSR 356/JEE7 SSE HTML5 – 2009 W3C Standardization of Comet (push), uni-directional, uses HTTP
  • 21. goo.gl/tZZdKa Web Communication Mechanisms for Event-Driven World Web Notifications 2015 - W3C Browser Notifications outside webpage, can use with Service Workers (and WS) Push API 2015 - W3C Scripted access to push data, use with Service Workers (and WS) 2007 User-defined HTTP callbacks (POST) Event-driven architecture, non-blocking I/O API, JS for server 2009 Java/WebSocket JSR 356 – Glassfish OpenMQ Java/C API 2013-2014
  • 22. goo.gl/tZZdKa Do I Still Use WebSocket with HTTP/2? §  WebSocket is not a REST (JAX-RS/Jersey) replacement. §  WebSocket is complementary to HTTP (and REST) §  Simple Notifications can be easily done with HTTP §  Higher level APIs for Polyglot world Needed (e.g., JS) §  WebSocket used for Full-duplex Persistent connection… a TCP for the Web §  Non-Browser use is where it gets interesting
  • 23. goo.gl/tZZdKa §  Kaazing §  Java EE – JSR 356, Project Tyrus, Grizzly §  Node.js/socket.io/SockJS/engine.io §  ActiveMQ §  Tomcat §  Jetty §  Oracle Glassfish §  Play Framework – Reactive Apps §  Rabbit MQ §  JBoss §  IIS/ASP .NET 4.5 §  PHP, Objective-C, Ruby, Python, C/C++, JVM- langs… §  Many more… (100+ implementations) WebSocket Projects
  • 24. goo.gl/tZZdKa WebSocket TCP/IP JMS XMPP AMQP B2B FTP VNC MQTT etc Browser and Native Applications WebSocket Gateway Internet WebSocket Gateway Protocol Layering is Possible WebSocket is a Transport layer Protocols are the key to Integration
  • 25. goo.gl/tZZdKa 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? What do Protocols give us?
  • 26. goo.gl/tZZdKa Internet of Things (IoT) – Java ME + Heterogeneity + Scale + Usability WoT Now?
  • 28. goo.gl/tZZdKa Web of Things – Its All About SERVICES! http://www.w3.org/2014/02/wot/
  • 30. goo.gl/tZZdKa §  No formal API standards §  Many protocol standards – interoperability low §  No common, wide-reaching frameworks §  No composition possibilities §  Difficult to leverage economies of scale §  Barrier to entry is high for millions of app developers IoT/IIoT – Connectivity isn’t Sufficient
  • 31. goo.gl/tZZdKa §  IoT – Internet of Things Embedded computing endowed with Internet connectivity §  WoT – Web of Things Application and Services layer over IoT IoT WoT Developers! Here’s Where the Web Comes In
  • 32. goo.gl/tZZdKa §  Apply the benefits of the Web to IoT §  WoT is a uniform interface to access IoT functionality §  Provides the abstraction for control/monitoring (sensors/actuators) §  Accelerates innovation §  Deployment, development, interoperability, economy of scale… Here’s Where the Web Comes In
  • 33. goo.gl/tZZdKa §  Disadvantages of HTTP Request/Response §  Lack of resiliency and robustness §  Enterprise events retrieved by resource intensive polling techniques Ø Much bandwidth is wasted Ø Information can be delayed §  Composite services brittle and lack transactionality §  Enterprises learned advantages of ESB 10+ years ago §  See failures of CORBA, Sun RPC, etc. §  Clumsy AJAX/Comet workarounds to simulate real-time But Is HTTP the Right Choice?
  • 34. goo.gl/tZZdKa “…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 The Message is the Medium
  • 35. goo.gl/tZZdKa Typically an App Server and DB App Server is probably not the right architecture Human Web WoT Large data to client Small data to server Data Flow – Human Web vs WoT Do human-readable protocols make sense for non-humans?
  • 37. goo.gl/tZZdKa Why are we talking about Microservices? §  It’s an SOA (lightweight SOA) §  It’s SOA without WS-*, SOAP, etc, crap §  Older technique now useful with modern infrastructure §  An App is a Collection of Services §  Nothing really “micro” about Microservices §  If you need more than two pizzas to feed the team with the largest service, its not small enough
  • 38. goo.gl/tZZdKa Monoliths vs Microservices §  Long builds, complex internals, scale issues §  Scale by replicating entire monolith on multiple servers §  Hard to modify §  Not necessarily bad – depends on team Monoliths
  • 39. goo.gl/tZZdKa Monoliths vs Microservices §  Small services – more agile §  Scale by replicating services §  Independent distributed services §  The Unix way §  % cat myfile | tr "A-Z" "a-z" | tr -cs 'a-z' 'n' | sort | uniq §  Requires more management §  Still early Microservices But we’ve had this idea for a while… Let’s take a step back
  • 40. goo.gl/tZZdKa A Trip Down Memory Lane… In the beginning… IBM VM/370
  • 41. goo.gl/tZZdKa History of Separate, Protected Environments •  IBM VM/370 – 1972 •  hypervisor emulated a machine •  Separate addr space, virtual devices, fs •  Unix chroot(2) – 1979 Unix V7 •  Created a virtual root of fs •  Useful for testing a clean environment •  Shared users, procs, network – imperfect •  BSD Jails - 2000 •  Virtual root fs, hostname, IP addr, users, su •  Still shared host OS
  • 42. goo.gl/tZZdKa History of Separate, Protected Environments •  Solaris – Zones/Containers - 2004 •  Totally isolated, secure system resources •  “Zones” renamed “Containers” then back to “Zones” •  Separate CPU resources, memory and network •  Very low overhead. No hypervisor required •  LXC – Linux Containers – 2008 •  Run multiple Linux instances on a single Linux •  Uses cgroups – to manage cpu, memory, i/o, of a collection of processes •  Docker – 2013 •  Auto deployment •  Adds its own libcontainer for linux virtualization •  Rides PaaS trend
  • 43. goo.gl/tZZdKa Containers vs Virtual Machines (VM) Server Host OS Hypervisor Server Host OS Guest OS Guest OS Guest OS bin/libs bin/libs bin/libs App A App B App C bin/libs App A App B bin/libs App C App D App E container container
  • 44. goo.gl/tZZdKa Containers vs Virtual Machines (VM) Server Host OS Hypervisor Server Host OS Guest OS Guest OS Guest OS bin/libs bin/libs bin/libs App A App B App C bin/libs App A App B bin/libs App C App D App E container container Container Engine
  • 45. goo.gl/tZZdKa Clouds and Microservices – the bottom line §  More services per an OS §  Greater Services Mobility – dev and ops §  Easier application patching §  Faster provisioning §  10 min for VM, 10 sec (or less) for microservice §  Container internals visible to help maximize optimization §  Avoids cloud framework lock §  Intercloud portability §  Allows services to be located most appropriate part of architecture §  Allows policies to be applied per container
  • 46. goo.gl/tZZdKa Clouds and Microservices – the bottom line §  The Microservices Synchronicity Penalty §  Many ecommerce sites use 150-200 microservices for personalization. Amazon.com §  Many are REST-based… ie, synchronous (wait for a reply). And many are chained, so the penalty is additive. §  Significant resources are needed for high levels of scalability (S = G/C)
  • 48. goo.gl/tZZdKa Enterprise Customer Service   • Access must be on-demand, secure and real-time • Requires lengthy VPN installation process, open ports or worse Service   Cloud services frequently require on-premises access VPN TCP WebSocket for Hybrid Cloud Connectivity
  • 49. goo.gl/tZZdKa Click to Edit Master Title Style Demos
  • 51. goo.gl/tZZdKa 1.  Introduction to HTML5 WebSocket 2.  The WebSocket API 3.  The WebSocket Protocol 4.  Building Instant Messaging and Chat over WebSocket with XMPP 5.  Using Messaging over WebSocket with STOMP 6.  VNC with the Remote Frame Buffer Protocol 7.  WebSocket Security 8.  Deployment Considerations goo.gl/ebiksb WIN A COPY!
  • 53. goo.gl/tZZdKa Browser - Server Stretching Web Communication to Its Limits
  • 55. goo.gl/tZZdKa Browser - Server Native (mobile, desktop) - Server Stretching Web Communication to Its Limits
  • 56. goo.gl/tZZdKa In a single 3½ hour race, [racing company] broadcasts over 6 times as many messages as Twitter does in an entire day Twitter Traffic (Daily) NASCAR Traffic (One race) 0 1 billion 2 billion 3 billion Messagesperday 1.5 billion 2.5 billion 3.5 billion 0.5 billion Over a Billion Messages an Hour
  • 57. goo.gl/tZZdKa Browser - Server Native (mobile, desktop) - Server IoT/Embedded - Server Stretching Web Communication to Its Limits
  • 58. goo.gl/tZZdKa Browser - Server Native (mobile, desktop) - Server IoT/Embedded - Server Server - Server Stretching Web Communication to Its Limits
  • 65. goo.gl/tZZdKa 1.  Introduction to HTML5 WebSocket 2.  The WebSocket API 3.  The WebSocket Protocol 4.  Building Instant Messaging and Chat over WebSocket with XMPP 5.  Using Messaging over WebSocket with STOMP 6.  VNC with the Remote Frame Buffer Protocol 7.  WebSocket Security 8.  Deployment Considerations goo.gl/ebiksb WIN A COPY!
  • 66. goo.gl/tZZdKa Raffle time % echo $(( $RANDOM % 50 + 1 )) 45