29
HTTP Server Push HTTP Server Push Techniques Techniques www.folio3.com @folio_3

HTTP Server Push Techniques

Embed Size (px)

Citation preview

Page 1: HTTP Server Push Techniques

HTTP Server Push HTTP Server Push TechniquesTechniques

www.folio3.com@folio_3

Page 2: HTTP Server Push Techniques

Folio3 – OverviewFolio3 – Overview

www.folio3.com @folio_3

Page 3: HTTP Server Push Techniques

Who We Are

We are a Development Partner for our customers

Design software solutions, not just implement them

Focus on the solution – Platform and technology agnostic

Expertise in building applications that are:

Mobile Social Cloud-based Gamified

Page 4: HTTP Server Push Techniques

What We Do Areas of Focus

Enterprise

Custom enterprise applications

Product development targeting the enterprise

Mobile

Custom mobile apps for iOS, Android, Windows Phone, BB OS

Mobile platform (server-to-server) development

Social Media

CMS based websites for consumers and enterprise (corporate, consumer,

community & social networking)

Social media platform development (enterprise & consumer)

Page 5: HTTP Server Push Techniques

Folio3 At a Glance Founded in 2005

Over 200 full time employees

Offices in the US, Canada, Bulgaria & Pakistan

Palo Alto, CA. Sofia, Bulgaria

Karachi, Pakistan

Toronto, Canada

Page 6: HTTP Server Push Techniques

Areas of Focus: Enterprise Automating workflows

Cloud based solutions

Application integration

Platform development

Healthcare

Mobile Enterprise

Digital Media

Supply Chain

Page 7: HTTP Server Push Techniques

Some of Our Enterprise Clients

Page 8: HTTP Server Push Techniques

Areas of Focus: Mobile Serious enterprise applications for Banks,

Businesses

Fun consumer apps for app discovery,

interaction, exercise gamification and play

Educational apps

Augmented Reality apps

Mobile Platforms

Page 9: HTTP Server Push Techniques

Some of Our Mobile Clients

Page 10: HTTP Server Push Techniques

Areas of Focus: Web & Social Media

Community Sites based on

Content Management Systems

Enterprise Social Networking

Social Games for Facebook &

Mobile

Companion Apps for games

Page 11: HTTP Server Push Techniques

Some of Our Web Clients

Page 12: HTTP Server Push Techniques

HTTP Server Push HTTP Server Push TechniquesTechniques

www.folio3.com @folio_3

Page 13: HTTP Server Push Techniques

Agenda Existing HTTP Protocol Architecture

Traditional Methods for Server Push Polling Long Polling / Comet Pushlets / Streaming

Comet in detail Possible issues with Comet and their solutions Comet Demonstration : MediaMorph

Where does HTML5 fit-in?

HTML 5 Server Sockets

Page 14: HTTP Server Push Techniques

Existing HTTP Protocol Architecture Existing HTTP

Stateless protocol

Request – Response … The end !

Client initiated communication, Always !

Server is forgetful

AJAX comes for help

Page 15: HTTP Server Push Techniques

Traditional Methods : Polling Polling

Periodic requests by the client

Time between requests would always be N time units

Page 16: HTTP Server Push Techniques

Traditional Methods : Polling Merits

Works better with very high frequency updates

May suit a very fast / frequent updating system

Very simple to implement, mostly easiest of all methods

Works with ancient systems too

Page 17: HTTP Server Push Techniques

Traditional Methods : Polling De-Merits

Too much network overhead

At times slower than expected results

The updates would always come after N time units

Possibly too many unnecessary requests

Possible browser performance degradation on the client side

Does not allow cross-domain access

Page 18: HTTP Server Push Techniques

Traditional Methods : Long Polling Long Polling / Comet

Client requests and waits for the server to respond

The server only responds back when there is any update or data available

Page 19: HTTP Server Push Techniques

Traditional Methods : Long Polling Merits

Behaves very similar to what a real server push mechanism would do

Immediate response in case of an update from the server

Comparative to Polling very low network overhead and request count

Works with most old and new systems

Works even with IE 6 !!!

Page 20: HTTP Server Push Techniques

Traditional Methods : Long Polling De-Merits

Slightly more complex to implement than polling

May not work well with very frequent updates

Needs special server & client configurations

Needs to take into account the Read Timeout enforcements by intermediate gateway or proxies

Does not allow cross-domain access

Page 21: HTTP Server Push Techniques

Traditional Methods : Streaming Streaming / Pushlet

One request to the server

Infinitely long response with continuous messages from the server

Client does not talk back unless with a new request

Javascript <Script> tag enclosed code snippets

Script tag’s URL would be a comet server side URL. Sending Javascript code snippets time to time.

Page 22: HTTP Server Push Techniques

Traditional Methods : Streaming Merits

Behaves very similar to what a real server push mechanism would do

Allows cross-domain implementations, since javascript urls can be cross-domain

Immediate response in case of an update from the server

Possibly very low network overhead

Negligible request count

Page 23: HTTP Server Push Techniques

Traditional Methods : Streaming De-Merits

May not be supported by some old systems

May cause browser memory overhead because of a long list of script tags executed on the page

Client is unable to send new request parameters in normal scenarios

All post-event logic needs to be written on the server side

Proxy servers could buffer responses causing issues

Page 24: HTTP Server Push Techniques

Possible issues with Comet and their solutions

Read timeout

Orphaned requests

Very frequent updates – Hybrid Poll – Push.

Page 25: HTTP Server Push Techniques

Comet DemonstrationComet Demonstration

www.folio3.com @folio_3

Page 26: HTTP Server Push Techniques

Where does HTML5 fit-in?

HTML5 offers many solutions addressing issues with existing architectures

One of the solutions is WebSockets

WebSockets address almost all issues with the existing systems

Page 27: HTTP Server Push Techniques

HTML5 WebSockets HTML5 WebSockets

Provides bi-directional, full-duplex communications channels

New URL schems ws:// - For Plain WebSocket wss:// - For Secure WebSocket

Very low network overhead

Only one request, true full-duplex communication

Still a long way to go. It is substantial infrastructural change

Page 28: HTTP Server Push Techniques

How HTML5 WebSockets Work ? Four step lifecycle

Browser Requests

Server Responds with Acknowledgement Tokens

Connection Establishment for Two way communication

Connection closed by either party

Page 29: HTTP Server Push Techniques

Contact

For more details about our

services, please get in touch with

us.

[email protected]

US Office: (408) 365-4638

www.folio3.com