Pushlets Introduce A comet framework Zhang Haipeng 2011-4-10.

Slides:



Advertisements
Similar presentations
Vrije Universiteit amsterdamPostacademische Cursus Informatie Technologie Web Applications – The Object Web combining servers and client-applications multiple.
Advertisements

Java Script Session1 INTRODUCTION.
DT228/3 Web Development WWW and Client server model.
Object Oriented Programming with Java (150704).   Applet  AWT (Abstract Window Toolkit)  Japplet  Swing Types of Applet.
1/ November 2008 / EDS Internal Web Push Technology Dušan Chromý SOA Integration Consulting Reverse Ajax/Comet Explained.
Retrieving compound pages This work is licensed under a Creative Commons Attribution-Noncommercial- Share Alike 3.0 License. Skills: none IT concepts:
Web Security Model CSE 591 – Security and Vulnerability Analysis Spring 2015 Adam Doupé Arizona State University
MC365 Application Servers: Servlets. Today We Will Cover: What a servlet is The HTTPServlet and some of its more important methods How to configure the.
Application Servers What is it? General A set of software frameworks, components, utilities, functionality that enables you to develop and deliver n-tiered.
Event Application Using Pushlets by Patricia Ferrao December, 2002.
Facedroid Facebook for Android. Facebook Application - API key - Secret key - PHP page Facebook Application - API key - Secret key - PHP page Facebook.
Active X Microsoft’s Answer to Dynamic Content Reference: Using Active X by Brian Farrar QUE
Multiple Tiers in Action
Apache Tomcat Server Typical html Request/Response cycle
1 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText Transfer Protocol Performance Enhancements.
Hello Vaadin! CS 3130 Summer 2015.
1 JavaScript & AJAX CS , Spring JavaScript.
SE-2840 Dr. Mark L. Hornick1 Java Servlet-based web apps Servlet Architecture.
Implementing search with free software An introduction to Solr By Mick England.
Struts. Agenda Preface Struts and its components An example The architecture required for Struts Applications.
Agenda What is AJAX? What is jQuery? Demonstration/Tutorial Resources Q&A.
Computer Concepts 2014 Chapter 7 The Web and .
Agenda Web Development Chapter 7 Review Class Discussion Issues.
Web Design Vocab 12 The Last one! Applet, HTTPS, RGB Color, Rollover, Server.
DSpace Users Group - Jan DSpace As A Platform Creating Custom Interfaces With Content Packaging Plugins Don Gourley Washington Research Library Consortium.
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
Standalone Java Application vs. Java Web Application
Embedding CenterView and Hosting External Content.
(1) Real Time Web. (2) Request – Response How would you create: A stock price ticker? A sports game cast app? A server status app? 1. Polling 2. Long.
Cross Site Integration “mashups” cross site scripting.
Orbited Scaling Bi-directional web applications A presentation by Michael Carter
Java Servlets. Servlets When we run small Java programs within a browser these are referred to as Applets... And when we run small Java programs within.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Java Servlets Lec 27. Creating a Simple Web Application in Tomcat.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
Introduction to ASP.NET1. 2 Web applications in general Web applications are divided into two parts –The server part –The client part The server part.
C# AND ASP.NET What will I do in this course?. MAJOR TOPICS Learn to program in the C# language with the Visual Studio IDE (Interactive Development Environment)
Chapter 2 An Overview of Servlet and JSP Technology.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
Web Design (1) Terminology. Coding ‘languages’ (1) HTML - Hypertext Markup Language - describes the content of a web page CSS - Cascading Style Sheets.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 14 Database Connectivity and Web Technologies.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
JSF Framework Java Server Faces Presented by Songkran Totiya (6/10/2014)
Server-side Programming The combination of –HTML –JavaScript –DOM is sometimes referred to as Dynamic HTML (DHTML) Web pages that include scripting are.
Java Servlet API CGI / HTTP Concepts Java Servlet API.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Asynchronous Javascript And XML AJAX : an introduction UFCEUS-20-2 : Web Programming.
Zz SOCKET.IO going real time with Arnout Kazemier
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
1 Introduction to Servlets. Topics Web Applications and the Java Server. HTTP protocol. Servlets 2.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 14 Database Connectivity and Web Technologies.
UMass Lowell Computer Science Java and Distributed Computing Prof. Karen Daniels Fall, 2000 Lecture 21 Java Servlets Wed. 11/22/00 based on material.
Chapter 2: Develop A One Page Web Application Liu, Jie Professor Department of Computer Science Western Oregon University
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
Message Framework Topic subscribe for javascript/flex client.
Albert F. Cervantes, M.S. California State University, Los Angeles
1 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText Transfer Protocol Performance Enhancements.
OOSD Using Java CBTS Framework. 11/2/04CBTS2 Servlet  A servlet is a Java program that can extends Web server’s functionality.  Servlets interact with.
1 Web Programming with Servlets & JSPs WEB APPLICATIONS – AN OVERVIEW.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
Dive into web development
Google Web Toolkit Tutorial
AJAX.
04 | Web Applications Gerry O’Brien | Technical Content Development Manager Paul Pardi | Senior Content Publishing Manager.
Today’s Objectives Week 12 Announcements ASP.NET
AJAX CS-422 Dick Steflik.
Introduction to Java Servlets
If the person is married and has more than 5 dependents MOVE MSG-1 TO MSG-PR, if the person is married and does not have more than 5 dependents MOVE MSG-2.
Client-Server Model: Requesting a Web Page
Struts BY: Tejashri Udavant..
Presentation transcript:

Pushlets Introduce A comet framework Zhang Haipeng

Index Comet Pushlets Applications Other…

What is Comet? Comet is a web application model in which a long-held HTTP request allows a web server to PUSH data to a browser, without the browser EXPLICITY requesting it.

HTTP

Pushlets An Free and Open Source HTTP-based publish/subscribe framework. Pushlets are a servlet-based mechanism where data is pushed directly from server-side Java objects to HTML pages within a client-browser without using Java applets or plug-ins. This allows a web page to be periodically updated by the server

Publish/Subscribe

How to use pushlets?? -- integration with your web app Add pushlets.jar to your classpath Add javascript to you web app Config web.xml pushlet nl.justobjects.pushlet.servlet.Pushlet 1 pushlet /pushlet.srv

How to use pushlets?? -- message receiver window.onload = page_init; var displayDiv = null; function page_init(){ displayDiv = document.getElementById("displayDiv"); p_join_listen('/chat'); } function onData(event) { content = event.get('msg'); var newDiv = document.createElement("DIV"); newDiv.innerHTML = content; displayDiv.appendChild(newDiv); }

How to use pushlets?? -- send msg with javascript window.onload = page_init; function page_init(){ p_join_listen('/chat'); } function sendMsg(){ var inputObj = document.getElementById("txt"); var txt = inputObj.value; p_publish('/chat', 'msg', txt); }

How to use pushlets?? -- send message with Java Event anEvent = null; anEvent = Event.createDataEvent("/chat"); anEvent.setField("msg", "servlet sended!"); Dispatcher.getInstance().broadcast(anEvent);

How to use pushlets?? -- send message with java public class MyEventSource extends EventPullSource protected long getSleepTime() { return Rand.randomLong(3000, 5000); protected Event pullEvent() { Event event = Event.createDataEvent("/chat"); event.setField("msg", new Date().toString()); return event; } Source.properties source7=com.chinaoryx.web.MyEventSource

Displayer javaScript API