Boosting Web Communication with WebSockets

Preview:

DESCRIPTION

Boosting Web Communication with WebSockets. jWebSocket – The Open Source Solution for Real-Time Web Developers. Alexander Schulze & Claudia Gillrath Innotrade GmbH, Germany. SDC 2011 April 04-05, 2011 Göteborg Convention Centre Göteborg, Sweden. Realtime Presentation. - PowerPoint PPT Presentation

Citation preview

Boosting Web Communicationwith WebSockets

jWebSocket – The Open Source Solution for Real-Time Web Developers

SDC 2011April 04-05, 2011

Göteborg Convention Centre

Göteborg, Sweden

Alexander Schulze & Claudia GillrathInnotrade GmbH, Germany

Boosting Web Communication with WebSockets 205.04.2011

Follow the presentation at...

http://jwebsocket.org/sdc

Enjoy the slides in realtimedriven by WebSockets

Realtime Presentation

Boosting Web Communication with WebSockets 305.04.2011

Agenda

• Introduction:Status, Technology, Targets

• Use and Benefits vs. http

• Models, Migration and Implementation

• Solutions, Aspects and Prospects

• Discussion

Today's Session

The Web becomes more and more

Necessity of evolution to a platform for real-time data exchange

WebSocket technology is the fundament

Boosting Web Communication with WebSockets

405.04.2011

Introduction

pervasive interactive social mobile

Status of Web Communication

Boosting Web Communication with WebSockets

505.04.2011

The HTTP Protocol

• Designed for document transmission

• Cumbersome, nearly real-time tricks• Polling, Long-Polling• Reverse-AJAX, Comet etc.

• Ultimately non-standardized hacks

• Remains a Request/Response mechanism

Boosting Web Communication with WebSockets

605.04.2011

WebSockets – Technology

What are WebSockets?

• Bidirectional, full-duplex, permanent TCP connections 4oo times less overhead ⅓ of latency

• Standardized in HTML5 by W3C and IETF protects investments

• Single TCP port saves 50% server resources

Boosting Web Communication with WebSockets

705.04.2011

WebSockets – Technology

What else?

• Designed for interactiveWeb Applications

• Open for all kind ofstationary and mobilebrowser based and native apps

• Not just a protocol, but a new paradigmRequest/Response Real-Time Comm.

Demand from Developers, Providers and Users

• CompatibilityInteroperability

• IndependencyIntegratability

• ReliabilitySecurity

Boosting Web Communication with WebSockets

805.04.2011

WebSockets – Targets

Demand from Developers, Providers and Users

• AvailabilityScalability

• ExtendabilityFlexibility

• SimplicityMaintainability

Boosting Web Communication with WebSockets

905.04.2011

WebSockets – Targets

Boosting Web Communication with WebSockets

1005.04.2011

WebSockets – Concept

The Concept

• Framework vs. Client/Server

• 3rd Party Engines and Servers

• Message Routing, Stream, Send, Broadcast, Events, Channels

• Tokens and Plug-ins

• Listeners and Apps

• Filters and Encryption

Boosting Web Communication with WebSockets

1105.04.2011

WebSockets – Models

jWebSocket FrameworkjWebSocket Framework

TCPNIOTCPNIO

JBossNettyJBossNetty

Glass-Fish

Glass-Fish

EclipseJetty

EclipseJetty

System

Plug-in

System

Plug-in

Custom

App

Custom

App

3rd-PartyApp

3rd-PartyApp

Custom

Plug-in

Custom

Plug-in

jWebSocket Framework

• Replacible Engines

• Stand-Alone orEmbedded Operation

• Plug-ins andWebSocket Apps

• Completely open

Engines

Plug-ins Apps

Boosting Web Communication with WebSockets

1205.04.2011

WebSockets – Models

XMLJSON

jWebSocket Tokens

• WebSocket nodes are stupid

• Need for a common languageto understand incoming packets

• DataformatsJSON, XML or CSV

• Solution: Abstract Data objects, so called „Tokens“

jWebSocket FrameworkjWebSocket Framework

Token-ProcessorToken-Processor

NativeClientNativeClient

BrowserClient

BrowserClient

Boosting Web Communication with WebSockets

1305.04.2011

WebSockets – Interoperability

jWebSocket FrameworkjWebSocket Framework

WebSocket Services

WebSocket Services

WebSocketApps

WebSocketApps

X-Browser-Compatibility

• Native Support inChrome 4+, FF 4,Safari 5, Opera 11

• Flash-Fallback forIE and older Browsers

• Long-Polling orComet Fallback

jWebSocket FrameworkjWebSocket Framework

WebSocket Services

WebSocket Services

WebSocketApps

WebSocketApps

Boosting Web Communication with WebSockets

1405.04.2011

WebSockets – Interoperability

X-Platform-Compatibility

• Android (Dalvik VM)

• iPad/iPhone (iOS)

• Symbian/BlackBerry(Java ME)

• Windows Phone andSamsung Bada pending

jWebSocket Security

• SSL-Encryption

• wss://[host][:port][/path]...

• Authentication & Authorization

• Filter & Validation

• Virus-Scanning

• Spam-Filter & Banning

Boosting Web Communication with WebSockets

1505.04.2011

WebSockets – Models

wss://

jWebSocket FrameworkjWebSocket Framework

In System-Filter OutIn System-Filter Out

ClientClient

In Custom-Filter OutIn Custom-Filter Out

Filterchain

Boosting Web Communication with WebSockets

1605.04.2011

WebSockets – Models

jWebSocket FrameworkjWebSocket Framework

Collaboration Suite

Collaboration SuiteOnline-GameOnline-Game

Channel 2„WorkTogether“

Channel 2„WorkTogether“

Channel 1„PlayTheGame“

Channel 1„PlayTheGame“

Player 1

Player 1

Player 2

Player 2

Collab.Memb1Collab.Memb1

Collab.Memb2Collab.Memb2

jWebSocket Channels

• Publish/SubscribeMechanism

• Private and PublicChannels

• Authentication

• Separate Applications

Boosting Web Communication with WebSockets 1705.04.2011

jWebSocket Events

• Event-Driven Programming using the Observable Pattern

• Objects are „observable“

• Clients or other instancesobserve objects andare notified by events

• Easy, flexible and effective

WebSocket –Models

Observ

e

Observer 1( Client )

Observer 1( Client )

Observer 2( Client )

Observer 2( Client )

ws://or wss://

Observable (Server)Observable (Server)

Boosting Web Communication with WebSockets

1805.04.2011

WebSockets – Models

Synchronization Backbone

ClientClient

Node 3Node 3Node 2Node 2Node 1Node 1

Re-director

Re-director

LoadBal.LoadBal.

ClientClientjWebSocket Clusters

• Load-Balancer

• Redirector

• Backbone simplyWebSocket based

• ExternalService Nodes

Ext. Serv.Node

Ext. Serv.Node

Boosting Web Communication with WebSockets 1905.04.2011

jWebSocket Plug-ins

• JDBC, SMTP, XMPP

• Remote Procedure CallsC2S-, S2C-, C2C-RPCs

• Object-, Filesharing

• Logging, Stats, Admin

• Chat, Stream, Twitter

WebSocket – Plug-ins

JDBCJDBC SMTPSMTP XMPPXMPP RPCRPC ......

BrowserClien

t

BrowserClien

t

Desktop

Client

Desktop

Client

Custom

Client

Custom

Client

StreamStream Sharing

Sharing ChatChat TwitterTwitter ......

MobileClientMobileClient

jWebSocket FrameworkjWebSocket Framework

Boosting Web Communication with WebSockets

2005.04.2011

WebSockets – Application Areas

Where to use WebSockets?

• Chats, Messaging and Mail

• Remote Control and Monitoring

• Push and Streaming Services, Financial Ticker, Weather, News, Video

• Bidirectional Remote Procedure Calls

• Sharing Objects, Databases, Files

• Uniting Stationary and Mobile Applications

Boosting Web Communication with WebSockets

2105.04.2011

WebSockets – Prospects

What is the future of WebSockets?

• New Dimension of Online-Collaboration

• New Level of Online-Entertainment

• New Opportunities for Online-Education

• New Social Participation and Contribution

What comes to your mind?

Questions & AnswersAlexander Schulze

a.schulze@jwebsocket.org

Forum & Download: http://jwebsocket.org, @jWebSocket

Boosting Web Communication with WebSockets

2205.04.2011

Thank you for your attention!