Games, chat, and finance Toward a truly interactive web with Comet, BAM, and HMTP Emil Ong Chief Evangelist.

Slides:



Advertisements
Similar presentations
Login to Top Hat Password Log In Need a Top hat Account – sign up here. I forgot my password You must log in first Display error Messages here.
Advertisements

ITCR Success through Innovation iTCR Success through Innovation CiTRs DECADE Strategy ä DECADE vision integrated electronic customer access.
3 Copyright © 2005, Oracle. All rights reserved. Designing J2EE Applications.
Designing Web Applications. client server architectures design patterns model 2 web applications.
COM vs. CORBA.
Jabber and Extensible Messaging and Presence Protocol (XMPP) Presenter: Michael Smith Cisc 856 Dec. 6, 2005.
MMOs and Socket Servers Diego O. Scarpa 10 y 11 de Diciembre – Hotel Panamericano - Buenos Aires.
C# and Windows Programming Application Domains and Remoting.
Online Educational Game of Snakes and Ladders -Shalini Pradhan -Manali Joshi -Uttara Paingankar -Seema Joshi.
Nikola Dimitroff Creating Genres creatinggenres.com.
AJAX Presented by: Dickson Fu Dimas Ariawan Niels Andreassen Ryan Dial Jordan Nielson CMPUT 410 University of Alberta 2006.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
Web Services Members Troy Tony Ellen Vincent. Web Services What is it Why is it useful What have been solved Demo Alternative technologies Question.
Event Application Using Pushlets by Patricia Ferrao December, 2002.
A Distributed Proxy Server for Wireless Mobile Web Service Kisup Kim, Hyukjoon Lee, and Kwangsue Chung Information Network 2001, 15 th Conference.
LYU9901-Travel Net LYU9901-Travel Net Supervisor: Prof. Michael R. Lyu Students: Ho Chi Ho Malcolm Lau Chi Ho Arthur (Presentation on )
1 Web Search Interfaces. 2 Web Search Interface Web search engines of course need a web-based interface. Search page must accept a query string and submit.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
© 2012 Cisco and/or its affiliates. All rights reserved. CDN-4698 Cisco Public Collaboration Enabled Business Transformation (CEBT) Integration Platform.
31 January 2007Craig E. Ward1 Large-Scale Simulation Experimentation and Analysis Database Programming Using Java.
AJAX Chat Analysis and Design Rui Zhao CS SPG UCCS.
Guide to TCP/IP, Second Edition1 Guide To TCP/IP, Second Edition Chapter 6 Basic TCP/IP Services.
Exploring Real-time apps with ColdFusion and Blaze DS / Live Cycle Data Services ES Dan Blackman
1 What Can HTML5 WebSocket Do For You? Sidda Eraiah Director of Management Services Kaazing Corporation.
JavaScript, Fourth Edition Chapter 12 Updating Web Pages with AJAX.
Institute of Computer and Communication Network Engineering OFC/NFOEC, 6-10 March 2011, Los Angeles, CA Lessons Learned From Implementing a Path Computation.
M i SMob i S Mob i Store - Mobile i nternet File Storage Platform Chetna Kaur.
Presented by Xiaoyu Qin Virtualized Access Control & Firewall Virtualization.
Lecture 15 Introduction to Web Services Web Service Applications.
Csi315csi315 Client/Server Models. Client/Server Environment LAN or WAN Server Data Berson, Fig 1.4, p.8 clients network.
Orbited Scaling Bi-directional web applications A presentation by Michael Carter
Source: Peter Eeles, Kelli Houston, and Wojtek Kozaczynsky, Building J2EE Applicationa with the Rational Unified Process, Addison Wesley, 2003 Prepared.
4BP1 Electronic & Computer Engineering Paul Gildea th Year Interim Project Presentation.
® IBM Software Group © 2007 IBM Corporation Best Practices for Session Management
Jsp (Java Server Page) Is a server side program.
Plug-in for Singleton Service in Clustered environment and improving failure detection methodology Advisor:By: Dr. Chung-E-WangSrinivasa c Kodali Department.
Update on CORBA Support for Babel RMI Nanbor Wang and Roopa Pundaleeka Tech-X Corporation Boulder, CO Funded by DOE OASCR SBIR.
CS 501: Software Engineering Fall 1999 Lecture 12 System Architecture III Distributed Objects.
WHIM Presentation Topic : Comet and Jetty 6 Yu Song April

Web application architecture1 Based on Jim Conallen: Web Applications with UML.
Web Technology Introduction AJAXAJAX. AJAX Outline  What is AJAX?  Benefits  Real world examples  How it works  Code review  Samples.
S O A P ‘the protocol formerly known as Simple Object Access Protocol’ Team Pluto Bonnie, Brandon, George, Hojun.
Markus Hjort Reaktor Innovations Java Web Development T WWW-palvelun HUT
Jabber Technical Overview Presenter: Ming-Wei Lin.
1 Introduction to Servlets. Topics Web Applications and the Java Server. HTTP protocol. Servlets 2.
JS (Java Servlets). Internet evolution [1] The internet Internet started of as a static content dispersal and delivery mechanism, where files residing.
ASP.NET SignalR SoftUni Team Technical Trainers Software University
WebObjects Matt Aguirre Lally Singh. What Is It? A Java based development platform specifically designed for database-backed web applications.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Seminar on Service Oriented Architecture Distributed Systems Architectural Models From Coulouris, 5 th Ed. SOA Seminar Coulouris 5Ed.1.
1 Java Server Pages A Java Server Page is a file consisting of HTML or XML markup into which special tags and code blocks are inserted When the page is.
AJAX and REST. Slide 2 What is AJAX? It’s an acronym for Asynchronous JavaScript and XML Although requests need not be asynchronous It’s not really a.
Message Framework Topic subscribe for javascript/flex client.
Java Networking I IS Outline  Quiz #3  Network architecture  Protocols  Sockets  Server Sockets  Multi-threaded Servers.
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
Keith Telle Lead Software Engineer Bit Wizards Behind the Magic: SignalR Demystified.
Research of Web Real-Time Communication Based on WebSocket
Last Class: Introduction
CS5220 Advanced Topics in Web Programming Introduction to WebSocket
Application layer 1 Principles of network applications 2 Web and HTTP
ASP.NET SignalR SoftUni Team C# MVC Frameworks Technical Trainers
Google Web Toolkit Tutorial
AJAX and REST.
Creating Novell Portal Services Gadgets: An Architectural Overview
WEB API.
Pub/sub-based Web Applications
Introduction to Servlets
WCF Data Services and Silverlight
Presentation transcript:

Games, chat, and finance Toward a truly interactive web with Comet, BAM, and HMTP Emil Ong Chief Evangelist

Caucho Technology Resin has been around for 10 years Over 8000 customers, even more open source users User base consists of both early and conservative adopters Now the top Java web server in NetCraft 340,000 domains

Groundbreaking Innovations Hessian web services protocol Top clustering implementation Quercus: PHP in Java Server-push And now... a revolutionary approach to the interactive web

The Interactive Web Common properties 1) Sessions are long-lived 2) Must be responsive/ real time 3) Must not overburden server 4) Communication is bidirectional Killer apps Games Chat Finance

The Interactive Web with HTTP 1) Sessions are long-lived 2) Must be responsive/real time 3) Must not overburden server 4) Communication is bidirectional This is harder with HTTP Comet has shown this is possible

Simulating Bidirectional Communication with HTTP Client generated events are easy They are simply requests AJAX just makes those requests without changing the page What about the other direction?

Sending events from server to client using HTTP Polling Requests at regular intervals that complete immediately Long Polling Requests that wait for the next event, then restart Server-push (Comet) Socket held open with streaming updates from the server

Techniques compared

Server-Push (Comet) Current hot technology Implementations Resin Grizzly (Glassfish) Jetty Tomcat All solve the problem of threads dedicated to a socket All have a different programming model

The problem of Bidirectional Communication with HTTP Different techniques for send and receive Use AJAX to send data from client Use Comet to receive data on client Two connections required* Places limitations on TCP that were necessary for scalability in the past A necessary evil at the moment

Truly Interactive Communication Must be capable of long-lived connections Must be responsive/real time Must not overburden server Must be bidirectional Must have a simple, coherent API/architecture

Creating the architecture Start with the communication patterns Messages Request/response Truly bidirectional communication Client -> Server Server -> Client Both must be supported in both patterns

Creating the architecture Representation of entities Agents Bidirectional communication implies that clients are first class citizens Agents represent both clients and servers A broker manages communication between agents

Brokered Agent Messaging (BAM) Broker Handles communication between agents It's not CORBA Agents Represent both clients and services Messaging Messages Request/response (asynchronous)

Example: Sudoku Demo

Client 1 Resin Broker Client 2 Login Query Client Agent 1 Login Query Client Agent 2 Logging In Sudoku Service

Game 1 Avatar Agent 1 Client 1 Resin Broker Client 2 Client Agent 1 Client Agent 2 Sudoku Service Start Query Wait Result Start Query Avatar Agent 2 Start Result Start Message Starting a game

Game 1 Avatar Agent 1 Client 1 Resin Broker Client 2 Client Agent 1 Client Agent 2 Sudoku Service Move Query Avatar Agent 2 Move Message Move Result Making a Move

Game 1 Avatar Agent 1 Client 1 Resin Broker Client 2 Client Agent 1 Client Agent 2 Sudoku Service Move Query Avatar Agent 2 Move Message Move Result Game over Message Game over Message Ending the Game

Design notes Agents can be long-lived SudokuService Client Agents can be short-lived SudokuAvatar Agents are lightweight and dynamic Non-agents can interact with the system SudokuGame

Code sample: SudokuAvatar public boolean sendQuerySet(long id, String to, String from, Serializable value) { if (value instanceof MoveQuery) { MoveQuery query = (MoveQuery) value; MoveResult result = _game.move(query, getJid()); _broker.sendQueryResult(id, from, to, result); return true;...

BAM API void sendMessage(String to, String from, Serializable value) boolean sendQueryGet(long id, String to, String from, Serializable query) boolean sendQuerySet(long id, String to, String from, Serializable query)

Address space Agent names look like addresses: First component: service name ( sudoku ) Second component: domain ( caucho.com ) Third component: instance identifier ( /3 ) Address structure reflects lightweight nature of agents

Hessian Message Transfer Protocol (HMTP) Wire protocol on which BAM is based Uses Hessian for compact serialization Evolved from XMPP (Jabber)

Target platforms Flash/Flex Silverlight JavaFX Java Applets Comet (interim) Java Quercus (PHP).NET

Conclusion Interactive applications will become more common HTTP is not sufficient to handle them BAM outlines a new architecture and API to make the development of these applications easier

What's next? Technical Convenience functions Making a PHP page a BAM service HMTP standardization Promotional Game contest

Thank you! Questions? Comments?

More information

Appendix: Bridging BAM and Comet Initial Comet request creates agent Agent triggers event to client on messages On AJAX requests, pull agent name from session