Message Framework Topic subscribe for javascript/flex client.

Slides:



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

1 CGICGI Common Gateway Interface Server-side Programming Lecture.
.NET Remoting. .Net Remoting Replaces DCOM (Distributed Component Object Model – a proprietary Microsoft technology for communication among software components.
Nikola Dimitroff Creating Genres creatinggenres.com.
1/ November 2008 / EDS Internal Web Push Technology Dušan Chromý SOA Integration Consulting Reverse Ajax/Comet Explained.
Notes to the presenter. I would like to thank Jim Waldo, Jon Bostrom, and Dennis Govoni. They helped me put this presentation together for the field.
Application Servers What is it? General A set of software frameworks, components, utilities, functionality that enables you to develop and deliver n-tiered.
Vending Machine FSM Benjamin Welton 03/20/2010 CS 480.
Brief Overview of.NET Remoting.NET Remoting is a Java RMI-like remote method invocation mechanism Infrastructure of.NET Remoting is highly customizable.
Portal Technologies An overview of portal products and other software.
Performed by:Gidi Getter Svetlana Klinovsky Supervised by:Viktor Kulikov 08/03/2009.
Object-Oriented Programming with Java Lecture 2 The Java Event Model.
ECSE Software Engineering 1I HO 7 © HY 2012 Lecture 7 Publish/Subscribe.
AJAX Introduction Drupal Commerce Camp September 2011.
Networking java.net package, which provides support for networking. Its creators have called Java “programming for the Internet.” Socket :- A network socket.
Using RADIUS Within the Framework of the School Environment Ed Register Consultant April 6, 2011.
Chapter 6 DOJO TOOLKITS. Objectives Discuss XML DOM Discuss JSON Discuss Ajax Response in XML, HTML, JSON, and Other Data Type.
Online Game JAVA for PDA WAP for Mobile Phone. Java for PDA  Hardware limit - Java API Power Memory  JDK 2M byte. Connectivity Display size.
1 DWR – Easy Ajax for Java Ivanka Todorova April 4, 2007.
1 LiveViz – What is it? Charm++ library Visualization tool Inspect your program’s current state Client runs on any machine (java) You code the image generation.
AJAX Chat Analysis and Design Rui Zhao CS SPG UCCS.
JavaScript & jQuery the missing manual Chapter 11
Exploring Real-time apps with ColdFusion and Blaze DS / Live Cycle Data Services ES Dan Blackman
JavaScript, Fourth Edition Chapter 12 Updating Web Pages with AJAX.
Intro to Ajax Fred Stluka Jan 25, /25/2006Intro to AjaxFred Stluka2 What is Ajax? "Asynchronous JavaScript and XML" New name for an old technique:
2006 Adobe Systems Incorporated. All Rights Reserved. 1 Flex, Java and Data Intensive Applications Cornel Creanga Platform Evangelist
ANSTO E-Science workshop Romain Quilici University of Sydney CIMA CIMA Instrument Remote Control Instrument Remote Control Integration with GridSphere.
Google Web Toolkit An Overview By Shauvik Roy Choudhary.
Orbited Scaling Bi-directional web applications A presentation by Michael Carter
Web Automation Testing With Selenium By Rajesh Kanade.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Spring MVC Views Rendering custom views.

Pushlets Introduce A comet framework Zhang Haipeng
1 Introduction to Servlets. Topics Web Applications and the Java Server. HTTP protocol. Servlets 2.
Spring and DWR Frameworks for Rich Web Enterprise Application Thomas Wiradikusuma Presentation to the 20 th.
What is a Servlet? Java Program that runs in a Java web server and conforms to the servlet api. A program that uses class library that decodes and encodes.
Ajax VS Flex A comparison based on shopping cart implementation PoHsu Yeh py2157.
What is J2EE Platform The Java 2 Platform Enterprise Edition (J2EE) defines the standard for developing multitier enterprise applications.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
Ceilometer + Gnocchi + Aodh Architecture
Intro to Web Services Dr. John P. Abraham UTPA. What are Web Services? Applications execute across multiple computers on a network.  The machine on which.
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
Computer Network Architecture Lecture 6: OSI Model Layers Examples 1 20/12/2012.
ASP.Net ICallback Vijayalakshmi G M Senior Trainer Binary Spectrum.
Expense Tracking System Developed by: Ardhita Maharindra Muskan Regmi Nir Gurung Sudeep Karki Tikaprem Gurung Date: December 05 th, 2008.
Interstage BPM v11.2 1Copyright © 2010 FUJITSU LIMITED INTERSTAGE BPM ARCHITECTURE BPMS.
Ext JS - Direct Bridging The Gap A DMSBT Presentation By Timothy Chandler.
USING ANDROID WITH THE INTERNET. Slide 2 Lecture Summary Getting network permissions Working with the HTTP protocol Sending HTTP requests Getting results.
Technologies For Creating Rich Internet Applications Presenter's name
Brice Copy, Mirjam Labrenz
Google Web Toolkit Tutorial
Data Virtualization Tutorial… CORS and CIS
Java Distributed Computing
Tracking and Booking Taxi
Platform as a Service.
Pre-assessment Questions
Chapter 3: Windows7 Part 4.
Java Messaging Service (JMS)
DWR: Direct Web Remoting
Java Messaging Service (JMS)
COP 3813 Intro to Internet Computing
Enter the World of Industry 4.0 with UniStream MQTT
Objectives In this lesson you will learn about: Need for servlets
Intro to Ajax Fred Stluka Jan 25, 2006.
J2EE Lecture 13: JMS and WebSocket
Chapter 42 Web Services.
Standards, APIs, and Applications
Your computer is the client
Astronomy Visualization Service
Presentation transcript:

Message Framework Topic subscribe for javascript/flex client

Requirements Topic, message management Publish topic messages to javascript client Publish topic messages to flex client Subscribe topic by javascript client Subscribe topic by flex client

System Topology JavaScript Client Flex Client Domain A Rest Framework Message Framework Other Component Topic Manager dwr Flex data service subscribe publish subscribe

TopicManager Rest framework or other components can send topic messages by TopicManager API: protected void notifyJSClient(String topic, List messages) Send messages to javascript client Send messages to flex client

Send message to javascript DWR DWR is a Java library that enables Java on the server and JavaScript in a browser to interact and call each other as simply as possible. DWR Reverse Ajax, it gives us the ability to asynchronously send data from a web-server to a browser. DWR Reverse Ajax supports 3 methods of pushing the data from to the browser: Piggyback, Polling and Comet. More detail refer to

Send message to javascript Using dwr to manager the topics, messages and clients Public api in TopicManager: protected void notifyJSClient(String topic, List messages) Dwr configuration, refer to web.xml: dwr-invoker DWR Servlet Direct Web Remoter Servlet com.vitria.dwr.servlet.OSGiDwrServlet …… org.directwebremoting.extend.Compressor org.directwebremoting.impl.LegacyCompressor

activeReverseAjaxEnabled true <!-- This enables full streaming mode. If set to -1, it will using full streaming model totally. If it is set to <500, client will restart a new connection without wait after write which is the same with set to 0. It's probably better to leave this out if you are running across the internet. --> maxWaitAfterWrite 5000 <!-- This enables polling streaming mode, set the wait time before next polling. For polling model only. For "Early Closing Mode", it will compute the disconnectedTime dynamically according the server load--> disconnectedTime 5000 url:/call/plainpoll/ com.vitria.dwr.reverse.TopicPollHandler ……

Send messages to flex client Using flex BlazeDS to implement Public api in TopicManager: protected void notifyASClient(String topic, List messages) BlazeDS configuration, refer to messaging-config.xml: false

Javascript client Based on DWR Reverse Ajax APIs, refer to engine.js New APIs for subscribe topics, refer to reverse.js: /** * Register the callback on one topic and the reverse ajax will be started when register. topic_id, the topic id to subscribe. callback, the listener on the topic, should accept one parameter just like {"topic": "topic_id", "messages": ["message1", "message2"]}. **/ dwr.reverse.register = function(topic_id, callback) { } /** * Unregister the callback on one topic. topic_id, the topic id to unsubscribe. callback, the listener on the topic; if null, the whole topic will unsubscribe. **/ dwr.reverse.unregister = function(topic_id, callback) { }

Flex client Based on Flex Messaging APIs New APIs for subscribe topics, refer to RestMessageManager.as: /** * Register the callback on one topic. topic_id, the topic id to subscribe. callback, the listener on the topic, should accept one parameter of TopicMessage instance. **/ public function register(topic:String, callback:Function):void { } /** * Unregister the callback on one topic. topic_id, the topic id to unsubscribe. callback, the listener on the topic; if null, the whole topic will unsubscribe. **/ public function unregister(topic:String, callback:Function):void { }