Enviar pesquisa
Carregar
What's next for Java API for WebSocket (JSR 356)
•
6 gostaram
•
34,196 visualizações
Pavel Bucek
Seguir
Whats NEXT for Java API for WebSocket (JSR 356)
Leia menos
Leia mais
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 31
Baixar agora
Baixar para ler offline
Recomendados
WebSockets in Enterprise Applications
WebSockets in Enterprise Applications
Pavel Bucek
JavaOne 2014 BOF4241 What's Next for JSF?
JavaOne 2014 BOF4241 What's Next for JSF?
Edward Burns
Java API for WebSocket 1.0: Java EE 7 and GlassFish
Java API for WebSocket 1.0: Java EE 7 and GlassFish
Arun Gupta
CON5898 What Servlet 4.0 Means To You
CON5898 What Servlet 4.0 Means To You
Edward Burns
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Arun Gupta
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
Edward Burns
What's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and Beyond
Oracle
Changes in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must Know
Bruno Borges
Recomendados
WebSockets in Enterprise Applications
WebSockets in Enterprise Applications
Pavel Bucek
JavaOne 2014 BOF4241 What's Next for JSF?
JavaOne 2014 BOF4241 What's Next for JSF?
Edward Burns
Java API for WebSocket 1.0: Java EE 7 and GlassFish
Java API for WebSocket 1.0: Java EE 7 and GlassFish
Arun Gupta
CON5898 What Servlet 4.0 Means To You
CON5898 What Servlet 4.0 Means To You
Edward Burns
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Arun Gupta
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
Edward Burns
What's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and Beyond
Oracle
Changes in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must Know
Bruno Borges
Have You Seen Java EE Lately?
Have You Seen Java EE Lately?
Reza Rahman
Servlet 3.1
Servlet 3.1
Arun Gupta
Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!
Reza Rahman
JavaFX Uni Parthenope
JavaFX Uni Parthenope
Emanuela Giannetta
Introduction to ActiveMQ Apollo
Introduction to ActiveMQ Apollo
dejanb
Building Java Desktop Apps with JavaFX 8 and Java EE 7
Building Java Desktop Apps with JavaFX 8 and Java EE 7
Bruno Borges
Java EE Revisits GoF Design Patterns
Java EE Revisits GoF Design Patterns
Murat Yener
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
Arun Gupta
Java EE 8
Java EE 8
Ryan Cuprak
JavaFX and JEE 7
JavaFX and JEE 7
Vijay Nair
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Arun Gupta
GlassFish & Java EE Business Update @ CEJUG
GlassFish & Java EE Business Update @ CEJUG
Arun Gupta
Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.
Edward Burns
JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6
Bert Ertman
RESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
ejlp12
Introducing WebLogic 12c OTN Tour 2012
Introducing WebLogic 12c OTN Tour 2012
Bruno Borges
Great Java Application Server Debate
Great Java Application Server Debate
Hamed Hatami
Burns jsf-confess-2015
Burns jsf-confess-2015
Edward Burns
Java EE7 Demystified
Java EE7 Demystified
Ankara JUG
WebSockets - Realtime em Mundo Conectado
WebSockets - Realtime em Mundo Conectado
Bruno Borges
HTTP/2 Comes to Java - What Servlet 4.0 Means to You
HTTP/2 Comes to Java - What Servlet 4.0 Means to You
David Delabassee
WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015
Pavel Bucek
Mais conteúdo relacionado
Mais procurados
Have You Seen Java EE Lately?
Have You Seen Java EE Lately?
Reza Rahman
Servlet 3.1
Servlet 3.1
Arun Gupta
Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!
Reza Rahman
JavaFX Uni Parthenope
JavaFX Uni Parthenope
Emanuela Giannetta
Introduction to ActiveMQ Apollo
Introduction to ActiveMQ Apollo
dejanb
Building Java Desktop Apps with JavaFX 8 and Java EE 7
Building Java Desktop Apps with JavaFX 8 and Java EE 7
Bruno Borges
Java EE Revisits GoF Design Patterns
Java EE Revisits GoF Design Patterns
Murat Yener
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
Arun Gupta
Java EE 8
Java EE 8
Ryan Cuprak
JavaFX and JEE 7
JavaFX and JEE 7
Vijay Nair
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Arun Gupta
GlassFish & Java EE Business Update @ CEJUG
GlassFish & Java EE Business Update @ CEJUG
Arun Gupta
Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.
Edward Burns
JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6
Bert Ertman
RESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
ejlp12
Introducing WebLogic 12c OTN Tour 2012
Introducing WebLogic 12c OTN Tour 2012
Bruno Borges
Great Java Application Server Debate
Great Java Application Server Debate
Hamed Hatami
Burns jsf-confess-2015
Burns jsf-confess-2015
Edward Burns
Java EE7 Demystified
Java EE7 Demystified
Ankara JUG
Mais procurados
(19)
Have You Seen Java EE Lately?
Have You Seen Java EE Lately?
Servlet 3.1
Servlet 3.1
Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!
JavaFX Uni Parthenope
JavaFX Uni Parthenope
Introduction to ActiveMQ Apollo
Introduction to ActiveMQ Apollo
Building Java Desktop Apps with JavaFX 8 and Java EE 7
Building Java Desktop Apps with JavaFX 8 and Java EE 7
Java EE Revisits GoF Design Patterns
Java EE Revisits GoF Design Patterns
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
Java EE 8
Java EE 8
JavaFX and JEE 7
JavaFX and JEE 7
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
GlassFish & Java EE Business Update @ CEJUG
GlassFish & Java EE Business Update @ CEJUG
Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.
JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6
RESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
Introducing WebLogic 12c OTN Tour 2012
Introducing WebLogic 12c OTN Tour 2012
Great Java Application Server Debate
Great Java Application Server Debate
Burns jsf-confess-2015
Burns jsf-confess-2015
Java EE7 Demystified
Java EE7 Demystified
Semelhante a What's next for Java API for WebSocket (JSR 356)
WebSockets - Realtime em Mundo Conectado
WebSockets - Realtime em Mundo Conectado
Bruno Borges
HTTP/2 Comes to Java - What Servlet 4.0 Means to You
HTTP/2 Comes to Java - What Servlet 4.0 Means to You
David Delabassee
WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015
Pavel Bucek
WebRTC with Java
WebRTC with Java
amithap07
JavaOne 2014 Java EE 8 Booth Slides
JavaOne 2014 Java EE 8 Booth Slides
Edward Burns
What's New and Noteworthy on Oracle CAF 12.1.3
What's New and Noteworthy on Oracle CAF 12.1.3
Bruno Borges
CON 2107- Think Async: Embrace and Get Addicted to the Asynchronicity of EE
CON 2107- Think Async: Embrace and Get Addicted to the Asynchronicity of EE
Masoud Kalali
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Edward Burns
WebRTC Workshop - What is (and isn't WebRTC)
WebRTC Workshop - What is (and isn't WebRTC)
Oracle
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
Edward Burns
2015 UJUG, Servlet 4.0 portion
2015 UJUG, Servlet 4.0 portion
mnriem
Java EE7 in action
Java EE7 in action
Ankara JUG
Project Avatar (Lyon JUG & Alpes JUG - March 2014)
Project Avatar (Lyon JUG & Alpes JUG - March 2014)
David Delabassee
Java EE 7 et ensuite pourquoi pas JavaScript sur le serveur!
Java EE 7 et ensuite pourquoi pas JavaScript sur le serveur!
David Delabassee
Servlet 4.0 JavaOne 2017
Servlet 4.0 JavaOne 2017
Ed Burns
HTTP/2 in the Java Platform -- Java Champions call February 2016
HTTP/2 in the Java Platform -- Java Champions call February 2016
Ed Burns
Real-World RESTful Service Development Problems and Solutions
Real-World RESTful Service Development Problems and Solutions
Masoud Kalali
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
JDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDK
Wolfgang Weigend
Java Community and Overview Track - March 2016
Java Community and Overview Track - March 2016
Yolande Poirier
Semelhante a What's next for Java API for WebSocket (JSR 356)
(20)
WebSockets - Realtime em Mundo Conectado
WebSockets - Realtime em Mundo Conectado
HTTP/2 Comes to Java - What Servlet 4.0 Means to You
HTTP/2 Comes to Java - What Servlet 4.0 Means to You
WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015
WebRTC with Java
WebRTC with Java
JavaOne 2014 Java EE 8 Booth Slides
JavaOne 2014 Java EE 8 Booth Slides
What's New and Noteworthy on Oracle CAF 12.1.3
What's New and Noteworthy on Oracle CAF 12.1.3
CON 2107- Think Async: Embrace and Get Addicted to the Asynchronicity of EE
CON 2107- Think Async: Embrace and Get Addicted to the Asynchronicity of EE
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
WebRTC Workshop - What is (and isn't WebRTC)
WebRTC Workshop - What is (and isn't WebRTC)
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
2015 UJUG, Servlet 4.0 portion
2015 UJUG, Servlet 4.0 portion
Java EE7 in action
Java EE7 in action
Project Avatar (Lyon JUG & Alpes JUG - March 2014)
Project Avatar (Lyon JUG & Alpes JUG - March 2014)
Java EE 7 et ensuite pourquoi pas JavaScript sur le serveur!
Java EE 7 et ensuite pourquoi pas JavaScript sur le serveur!
Servlet 4.0 JavaOne 2017
Servlet 4.0 JavaOne 2017
HTTP/2 in the Java Platform -- Java Champions call February 2016
HTTP/2 in the Java Platform -- Java Champions call February 2016
Real-World RESTful Service Development Problems and Solutions
Real-World RESTful Service Development Problems and Solutions
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
JDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDK
Java Community and Overview Track - March 2016
Java Community and Overview Track - March 2016
Último
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
ScyllaDB
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
null - The Open Security Community
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Patryk Bandurski
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
BookNet Canada
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
BookNet Canada
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
SeasiaInfotech2
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
Manik S Magar
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
Sergiu Bodiu
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
Memoori
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
hariprasad279825
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
Enterprise Knowledge
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Fwdays
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
UiPathCommunity
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Safe Software
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
Padma Pradeep
Training state-of-the-art general text embedding
Training state-of-the-art general text embedding
Zilliz
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
Fwdays
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
Addepto
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
Hervé Boutemy
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
RankYa
Último
(20)
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
Training state-of-the-art general text embedding
Training state-of-the-art general text embedding
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
What's next for Java API for WebSocket (JSR 356)
1.
2.
3.
WebSocket API.NEXT Pavel
Bucek (pavel.bucek@oracle.com) Oracle September 29, 2014 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
4.
Safe Harbor Statement
The following is intended to outline our general product direcSon. It is intended for informaSon purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or funcSonality, and should not be relied upon in making purchasing decisions. The development, release, and Sming of any features or funcSonality described for Oracle’s products remains at the sole discreSon of Oracle. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
5.
Copyright © 2014,
Oracle and/or its affiliates. All rights reserved. | Program Agenda Short intro about JSR 356 – Java API for WebSocket WebSocket API 1.1 WebSocket.NEXT CDI, Frame API, Extensions, SubProtocols, Java EE integraSon, Client API enhancements, smaller issues (broadcast, clustering, security, …) 1 2 3 4
6.
Copyright © 2014,
Oracle and/or its affiliates. All rights reserved. | WebSocket protocol • RFC 6455 (December 2011) • Two-‐way communicaSon, replacement for Long-‐polling – Beaer resource uSlizaSon • Extensions, SubProtocol • WebSocket handshake uses HTTP, connecSon is then UPGRADEd to “websocket” protocol – No HTTP since this point, only WebSocket frame are allowed to be sent or received – ConnecSon can be closed using Close frame or just closing underlying TCP connecSon
7.
WebSocket protocol -‐
Frame Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
8.
Copyright © 2014,
Oracle and/or its affiliates. All rights reserved. | WebSocket protocol Client Server Polling request Response (server -‐> client channel) Long polling WebSocket HTTP requests (client -‐> server channel) Client Server Handshake Request (HTTP) Handshake Response (HTTP) Messages (WebSocket) Session Close (WebSocket)
9.
Copyright © 2014,
Oracle and/or its affiliates. All rights reserved. | Java API for WebSocket • JSR 356 – Part of Java EE 7 – 1.0 (May 2013) – 1.1 (August 2014) • Annotated and programmaSc way how to deploy and access WebSocket endpoints • Event-‐driven model -‐ @OnOpen, @OnMessage, @OnError, @OnClose • Encoders/Decoders, Path/Query parameter handling, Handshake headers interceptors, CDI integraSon, …
10.
Java API for
WebSocket – Annotated Endpoint Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
11.
Java API for
WebSocket – ProgrammaSc Endpoint Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
12.
Copyright © 2014,
Oracle and/or its affiliates. All rights reserved. | WebSocket 1.1 • JSR 356 Maintenance release – August 2014 • WEBSOCKET_SPEC-‐226: Session.addMessageHandler(…) and lambdas • Impact: JDK8, Nashorn, possibly any other JVM language
13.
Copyright © 2014,
Oracle and/or its affiliates. All rights reserved. | WebSocket 1.1 • Javax.websocket.Session#addMessageHandler(MessageHandler) – MessageHandler contains two sub interfaces, Whole<T> and Partial<T> – WebSocket implementaSon must know the generic type of added MessageHandler to be able to match appropriate javax.websocket.Decoder • SoluSon: add methods which provide the type directly as a parameter – Javax.websocket.Session#addMessageHandler(Class<T>, MessageHandler.Whole<T>) – Javax.websocket.Session#addMessageHandler(Class<T>, MessageHandler.Partial<T>) WEBSOCKET_SPEC-‐226
14.
Copyright © 2014,
Oracle and/or its affiliates. All rights reserved. | WebSocket 1.0 WebSocket 1.0 WebSocket 1.1
15.
Copyright © 2014,
Oracle and/or its affiliates. All rights reserved. | WebSocket 1.1 WebSocket 1.0 WebSocket 1.1
16.
Copyright © 2014,
Oracle and/or its affiliates. All rights reserved. | WebSocket 1.1 • Lesson learned: There is no reliable way how to get the generic type (*) – Not unSl generics reificaSon is introduced to the JDK • (*) during the runSme.
17.
Copyright © 2014,
Oracle and/or its affiliates. All rights reserved. | WebSocket.NEXT • Should be part of Java EE 8 • The scope is not clear yet
18.
Copyright © 2014,
Oracle and/or its affiliates. All rights reserved. | WebSocket.NEXT • Present in the specificaSon since 1.0 • WebSocket spec depends on Servlet (3.1) • Issue with CDI scope – @RequestScope – @SessionScope – @ApplicaSonScope – @ConversaSonScope • HapUpgradeHandler (from Servlet 3.1) has CDI scope “undefined” CDI integra?on
19.
WebSocket implementaSon Copyright
© 2014, Oracle and/or its affiliates. All rights reserved. | WebSocket.NEXT CDI integra?on Client Servlet Container Web ApplicaSon Handshake Request HapServletRequest HapServletResponse Handshake Response HapUpgradeHandler modifyHandshake() Endpoint onOpen() Init() onMessage() onError()* onClose() send()* onDataAvail() write()* messages…
20.
WebSocket implementaSon Copyright
© 2014, Oracle and/or its affiliates. All rights reserved. | WebSocket.NEXT CDI integra?on Client Servlet Container Web ApplicaSon Handshake Request HapServletRequest HapServletResponse Handshake Response HapUpgradeHandler modifyHandshake() Endpoint onOpen() Init() onMessage() onError()* onClose() send()* onDataAvail() write()* messages… @RequestScope
21.
WebSocket implementaSon Copyright
© 2014, Oracle and/or its affiliates. All rights reserved. | WebSocket.NEXT CDI integra?on Client Servlet Container Web ApplicaSon Handshake Request HapServletRequest HapServletResponse Handshake Response HapUpgradeHandler modifyHandshake() Endpoint onOpen() Init() onMessage() onError()* onClose() send()* onDataAvail() write()* messages… undefined
22.
Copyright © 2014,
Oracle and/or its affiliates. All rights reserved. | WebSocket.NEXT Low level Frame API • Support for direct handling of WebSocket Frames – Direct manipulaSon with payload or other frame properSes – Custom encrypSon, encoding, compression, … • WebSocket Extension support – Currently WebSocket API contains only negoSaSon-‐related bits • (and not very well executed – not able to negoSate extension parameters, …) – Extending current API is possible, but…
23.
Low level Frame
API – WebSocket Extensions Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | WebSocket.NEXT • ExisSng WebSocket Extensions proposals: – “Compression Extensions for WebSocket” -‐ Submiaed to IESG for PublicaSon – “A MulSplexing Extension for WebSockets” – expired • Other opSon is just state that implementaSon must/can support some list of extensions • Common API for Extensions might be hard to crat, since there are no exact rules about what WebSocket Extension might specify. – (this extension must be run as first when receiving frame and last when sending, …)
24.
Copyright © 2014,
Oracle and/or its affiliates. All rights reserved. | WebSocket.NEXT Extensions/Message(*) processing • WEBSOCKET_SPEC-‐199 – “Add the ability to define filters and interceptor” • API for filtering – Handshake requests? • It may be worth to have beaer control in handshake process – currently only response headers can be modified, no possibility to deny the request/return HTTP 5xx response – WebSocket Frames? – Decoded/extracted messages (Frame payload)?
25.
Copyright © 2014,
Oracle and/or its affiliates. All rights reserved. | WebSocket.NEXT SubProtocol support • ExisSng WebSocket SubProtocol proposals – The WebSocket Protocol as a Transport for the Session IniSaSon Protocol (SIP) – published – RFC 7118 – An XMPP Sub-‐protocol for WebSocket – almost done – Submiaed for publicaSon – The WebSocket Protocol as a Transport for the Message Session Relay Protocol (MSRP) – Use of the WebSocket Protocol as a Transport for the Remote Framebuffer Protocol – CoAP over WebSockets
26.
Copyright © 2014,
Oracle and/or its affiliates. All rights reserved. | WebSocket.NEXT SubProtocol support • WebSocket API supports SubProtocols only for negoSaSon – Which might be OK • It is not clear what everything might be needed for implemenSng other protocol (again, depends on the subprotocol specificaSon) • There seem to be common paaern – Using WebSocket as a Socket (or just stream) to send/receive messages/frames of the tunneled protocol – We could modify exisSng cases to suite those needs (Streamed MessageHandlers, RemoteEndpoint#getSendStream())
27.
Copyright © 2014,
Oracle and/or its affiliates. All rights reserved. | WebSocket.NEXT Java EE integra?on • JAX-‐P, JAX-‐B, JSON-‐P, JSON-‐B, … – Problem with missing metadata • Bean validaSon • Servlet 4.0 (HTTP/2) • CDI – injectable managed Client/Session/RemoteEndpoint • CDI – support external events (like CDI event which invokes broadcast)
28.
Copyright © 2014,
Oracle and/or its affiliates. All rights reserved. | WebSocket.NEXT Client API improvements • Asynchronous connectToServer method • Security – HTTP Basic/Digest/custom authenScaSon schemes • Security – SSL related sexngs, ideally per client connecSon – Might be problemaSc to agree on single API, could be solved on different level and shared among all Java EE specificaSon which do provide client API • HTTP Proxy support – (at least state that sexng Proxy in java-‐way should be picked up)
29.
Copyright © 2014,
Oracle and/or its affiliates. All rights reserved. | WebSocket.NEXT Smaller issues (in terms of API changes) • Broadcast support – Introduce something beaer than iteraSng over Set<Session> • Security – @RolesAllowed, … -‐ fine grain control for on endpoint level • Clustering – Current API is not very friendly to clustered environment – ProblemaSc parts: Session#getContainer(), Session#(add|get|del)MessageHandler, Session#getUserProperSes, … – Enhancements like intercepSng messages sent from other nodes, …
30.
WebSocket.NEXT – QuesSons?
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | • WebSocket API 1.1.NEXT • WebSocket-‐spec: haps://java.net/projects/websocket-‐spec – haps://java.net/jira/browse/WEBSOCKET_SPEC • Reference ImplementaSon: Tyrus haps://tyrus.java.net – users@tyrus.java.net – haps://java.net/jira/browse/TYRUS • Pavel Bucek: pavel.bucek@oracle.com
31.
Copyright © 2014,
Oracle and/or its affiliates. All rights reserved. |
Baixar agora