Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lightning Talk Fred Rodriguez Aakash Juneja CPSC 473 March 16, 2012.

Similar presentations


Presentation on theme: "Lightning Talk Fred Rodriguez Aakash Juneja CPSC 473 March 16, 2012."— Presentation transcript:

1 Lightning Talk Fred Rodriguez Aakash Juneja CPSC 473 March 16, 2012

2  The Classical Network Socket – is a communication method that is used between applications on the same computer or on different computers, and is provided by the operating system: ◦ Provides bi-directional, full-duplex communication ◦ Depends on network Ports, IP addresses to deliver data ◦ The API is a classical C based interface, that depends on the OS ◦ Is still used in networking applications Server Client Data Socket 1 Socket 2

3  Websocket – is a bi-directional socket that is primarily used between a Web browser and Web Server; they are Web- centric, and Object-Oriented sockets that improve and speed up the communication between browsers and servers Server Client Data Websocket 1 Websocket 2

4  Websocket – is a web technology that: ◦ Provides bi-directional, full duplex communication (information flows in both directions) ◦ Runs on top of a standard Transmission Control Protocol socket ◦ Helps implement Real-Time, bi-directional communication ◦ Is not port based like a classical socket, and can by-pass Port based security ◦ Less complicated when compared to using Comet to implement a transmit and receive communication path ◦ An HTTP request and response is not needed every time a message is sent between the Web Browser and the Web Server ◦ Websockets are not subject to the same origin-policy (the browser can open a socket with a server that is different from the server that originally served the web page) ◦ HTML 5 supports Websockets

5  The Web Socket API is designed to hide much of the complexity of socket communication  The Web Socket API is object oriented, which means: ◦ A socket is opened when a Websocket object is constructed ◦ Once the socket connection is established, the browser and server can send data back and forth ◦ Once the socket is closed, it cannot be reopened; a new WebSocket objected must be constructed. ◦.

6  Web sockets can be an efficient solution for a web applications that require regular communication with a server  Because a web socket is established once and used repeatedly without the need for communication over HTTP, it can greatly reduce the overhead of sending multiple HTTP headers back and forth  In addition, web sockets can eliminate the need for inefficient communication practices such as polling, in which the browser checks repeatedly for new data on the server  Because a web socket is an open communication channel, the browser only needs to listen for incoming messages.  When the server has new data, it sends a new message to the browser. The browser receives the message as it arrives ◦.

7 Use case-  Multiplayer online games  Chat applications  Live sports ticker  Realtime updating social streams  Is your application truely-web competitve?  Low-latency?  Bandwidth efficient?  Cloud-ready?  Web scale?  Plugins?

8  Issues  Poor browser support require fallbacks  Multiple versions of the protocol in play  Protocol versions incompatible and are likely  to change again  Possible security issues  Not suitable for all applications (but better  than AJAX!)  Resource considerations  Firefox 4 and Opera 11 disabled the protocol due to security issues

9  Currently, only Internet Explorer 10, Chrome 16 and Firefox 11 support this API  Latest specification of the protocol defines standards for unencripted and encrypted connections

10  Websockets API: ◦ http://www.w3.org/TR/websockets/ http://www.w3.org/TR/websockets/  Websockets Organization: http://websocket.org/ http://websocket.org/  Websockets Projects: ◦ http://drupal.org/project/websockets http://drupal.org/project/websockets


Download ppt "Lightning Talk Fred Rodriguez Aakash Juneja CPSC 473 March 16, 2012."

Similar presentations


Ads by Google