HTML5 WebSocket for the Real-Time Weband the Internet of ThingsPeter Moskovits
Abstract: In his talk Peter gives a brief introduction to WebSocket and discusses how real-time Web communications technologies can be applied to an always connected Web and mobile world. Then, he walks you through how to provide interactivity and collaboration by controlling physical objects remotely. The presentation features several live demonstrations of the concepts discussed throughout the session.
Comet approaches overview, benefits and drawbacks: polling, long-polling, HTML5 server-side events, HTML5 WebSocket.
Example of WebSocket and Spring 4 integration using STOMP protocol.
Asynchronous Web Programming with HTML5 WebSockets and JavaJames Falkner
(Talk originally given @ KCDC - http://kcdc.info ).
Over the last decade, advances in web computing have removed many of the barriers to entry for developers. New languages, frameworks, and development methodologies have kickstarted new ideas and new ways to develop web applications to make modern life easier and more efficient. WebSockets (introduced as part of HTML5) is one such technology that enables a new class of scalable, super-responsive, collaborative, and real-time web applications with a wide range of uses.
In this talk, we will first cover the basics of asynchronous web programming using WebSockets, including predecessors such as polling and long-polling, applications of WebSockets, its limitations and potential bottlenecks, and potential future improvements.
Next, we will demo and dissect a real-world use case for realtime social data analytics, using the Apache Tomcat implementation of WebSockets and the Java-based Liferay Portal Server. This will include a discussion about development of WebSocket endpoints, its lifecycle within the application container and browser, debugging WebSockets, and scalability topics.
HTML5 WebSocket for the Real-Time Weband the Internet of ThingsPeter Moskovits
Abstract: In his talk Peter gives a brief introduction to WebSocket and discusses how real-time Web communications technologies can be applied to an always connected Web and mobile world. Then, he walks you through how to provide interactivity and collaboration by controlling physical objects remotely. The presentation features several live demonstrations of the concepts discussed throughout the session.
Comet approaches overview, benefits and drawbacks: polling, long-polling, HTML5 server-side events, HTML5 WebSocket.
Example of WebSocket and Spring 4 integration using STOMP protocol.
Asynchronous Web Programming with HTML5 WebSockets and JavaJames Falkner
(Talk originally given @ KCDC - http://kcdc.info ).
Over the last decade, advances in web computing have removed many of the barriers to entry for developers. New languages, frameworks, and development methodologies have kickstarted new ideas and new ways to develop web applications to make modern life easier and more efficient. WebSockets (introduced as part of HTML5) is one such technology that enables a new class of scalable, super-responsive, collaborative, and real-time web applications with a wide range of uses.
In this talk, we will first cover the basics of asynchronous web programming using WebSockets, including predecessors such as polling and long-polling, applications of WebSockets, its limitations and potential bottlenecks, and potential future improvements.
Next, we will demo and dissect a real-world use case for realtime social data analytics, using the Apache Tomcat implementation of WebSockets and the Java-based Liferay Portal Server. This will include a discussion about development of WebSocket endpoints, its lifecycle within the application container and browser, debugging WebSockets, and scalability topics.
Top 10 real life WebSocket use cases & experiences - Devoxx UK 2015Rich Cullen
This talk walks you through 10 widely used WebSocket scenarios, providing a detailed topology and deployment overview of them. The presentation discusses the various client technologies, including HTML5, Java, native iOS and Android, and Raspberry Pi and Arduino for the IoT use cases. The use cases range from collaboration scenarios through second screen, and real-time stock quotes all the way to collecting telemetry data from sensors and controlling physical devices over the Web. Most demos come with code samples too. The presentation discusses some of the challenges of real-life WebSocket deployments, including hostile proxies, firewalls, and routers, and offers scalability and security considerations.
This attack was made possible due to a programming vulnerability in OpenSSL libraries. The attack was discovered in 2014. It can help attackers steal very sensitive data like session Ids, cookies, etc.
This presentation explains the basics of WebSockets and how a Developer can leverage its features to enhance a Mobile User Experience and offer real timing applications
Presentation MobileTechCon 2010, Mainz, Germany: Stay Connected - Mobile Pushing Apps with jWebSocket:
Whether on-line games, or online collaboration, streaming, chat, remote control or monitoring applications - real-time communication has long ago moved into cross-platform and cross-browser web solutions. HTML5 WebSockets are the ideal basis for bidirectional high-speed data exchange in real time.
Explaining the benefits of using WebSockets, the difference comparing with Ajax and explaining the code we should write on both ends. The server and the client.
More information about the Java course I deliver can be found at java.course.lifemichael.com
More information about the Node.js course I deliver can be found at nodejs.course.lifemichael.com
More information about the FED course I deliver can be found at fed.course.lifemichael.com
Webinar slides "Building Real-Time Collaborative Web Applications"Sachin Katariya
Key Takeaways:
1> Key technology enablers for real-time collaboration
2> Supporting open source technologies such as Node.js, WebSocket and HTML5
3> Enriching user experience with real-time collaboration
4> Demonstration of a sample real-time collaborative web application
5> Performance benchmarks
Webinar - Building Real-Time Collaborative Web Applications
The digital revolution has brought in a change in the way we communicate and collaborate. Research shows that number of mobile workers will reach up to 1.3 billion by 2015. The pace of information flow has been astounding. These factors have fuelled the pressing demand among customers, businesses, for real time web applications.
Real-time web applications have been around for many years. But today, the users expect collaborative, personalized and an amazingly interactive experience using real time web technologies.
Key Takeaways:
Key technology enablers for real-time collaboration
Supporting open source technologies such as Node.js, WebSocket and HTML5
Enriching user experience with real-time collaboration
Demonstration of a sample real-time collaborative web application
Performance benchmarks
Based on the Star Wars theme, this session focuses on how Java EE 7 provides an extensive set of new and enhanced features to support standards such as HTML5, WebSocket, and Server-sent events, among others. The session shows how these new features are designed and matched to work together for developing lightweight solutions matching end users’ high expectations for Web application responsiveness. It covers best practices and design patterns associating the technologies with analogies from Star Wars. So join me in this fun filled talk where technology meets science and innovation..
May the force be with you!
The time of static or dynamically generated sites is long gone. Non-stop interaction with users is the new normal. However, polling with Ajax requests is processor intensive and cumbersome. Websockets allow you to interact with users in real-time without increasing system load. We'll go through the basics and see all the different options, illustrated with live examples of how and when to use it, as well as when not to use it.
Similar to vlavrynovych - WebSockets Presentation (20)
7. WebSocket
Standard W3C protocol (RFC6455)
Web Browsers include window.WebSocket
object. No plugins required
Java EE 7 includes WebSocket API (JSR-356)
10. How it works?
1. Establish a socket connection via HTTP for
the initial handshake
2. Switch the protocol from HTTP to a socket-
based protocol
3. Send messages in both directions
simultaneously
12. Polling – overhead calculation
A:
1,000 clients polling every second: Network throughput is (959 x 1,000) =
959,000 bytes = 7,672,000 bits per second (7,67 megabits per second)
B:
10,000 clients polling every second: Network throughput is (959 x 10,000) =
9,590,000 bytes = 76,720,000 bits per second (76,72 Mbps)
C:
10,000 clients polling every second: Network throughput is (959 x 100,000) =
95,900,000 bytes = 767,200,000 bits per second (767,2 Mbps)
13. WebSocket – overhead calculation
A:
1,000 clients receive 1 message per second: Network throughput is (2 x 1,000) =
2,000 bytes = 16,000 bits per second (0.016 megabits per second)
B:
10,000 clients receive 1 message per second: Network throughput is (2 x
10,000) = 20,000 bytes = 160,000 bits per second (0.16 Mbps)
C:
100,000 clients receive 1 message per second: Network throughput is (2 x
100,000) = 200,000 bytes = 1,600,000 bits per second (1,6 Mbps)
14. Comparing overheads
megabits per second
Polling, C,
767.2
Polling, B,
76.72
Polling, A, 7.67
WebSocket, C,
1.6
WebSocket, B,
0.16
WebSocket, A,
0.016
WebSocket Polling
16. JS: WebSocket events
Event Event Handler Description
open ws.onopen This event occurs when socket
connection is established.
message ws.onmessage This event occurs when client
receives data from server.
error ws.onerror This event occurs when there is
any error in communication.
close ws.onclose This event occurs when
connection is closed.
17. JS: WebSocket methods
Method Description
ws.send() The send(data) method transmits data
using the connection.
ws.close() The close() method would be used to
terminate any existing connection.
20. How to?
Create an endpoint class.
Implement the lifecycle methods of the
endpoint.
Add your business logic to the endpoint.
Deploy the endpoint inside a web application.
31. My notes
WebSockets needed 20 sec to identify disconnection
on client-side
No possibility to identify disconnection on server-side
To get HttpSession or other data from outside you
should use your implementation of
ServerEndpointConfig.Configurator class.
Each connection to WebSocket server creates new
instance of javax.websocket.Session class
32. Compatibility
IE Firefox Chrome Safari Opera
iOS
Safari
Opera
Mini
Android
Browser
Blackberry
Browser
IE
Mobile
Current 11.0 25.0 30.0 7.0 17.0 7.0 5.0-7.0 4.2-4.3 10.0 10.0
Near
future 31.0 18.0
Source: http://caniuse.com/#feat=websockets
34. Links
Java API for WebSocket
http://docs.oracle.com/javaee/7/tutorial/doc/websocket.htm
HTML5 - WebSockets Tutorial
http://www.tutorialspoint.com/html5/html5_websocket.htm
The WebSocket API
http://www.w3.org/TR/websockets/
Flash-based workaround
https://github.com/gimite/web-socket-js