14-1 JXTA for J2ME. 14-1 Learning Objectives ● This module will help you... – Learn about the architecture of JXTA for J2ME – Learn the JXTA for J2ME.

Slides:



Advertisements
Similar presentations
Introduction to WSDL presented by Xiang Fu. Source WSDL 1.1 specification WSDL 1.1 specification – WSDL 1.2 working draft WSDL.
Advertisements

1-1 Introduction. The time is right for P2P and Project JXTA Peer to Peer (P2P) is not new. However, the time is now right for the broad P2P applications.
Extensible Networking Platform IWAN 2005 Extensible Network Configuration and Communication Framework Todd Sproull and John Lockwood
Service Oriented Architectures in Heterogeneous Environments
Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)
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.
JXTA P2P Platform Denny Chen Dai CMPT 771, Spring 08.
JXTA Protocol Introduction Student : Jia-Hui Huang Adviser : Kai-Wei Ke Date : 2005/11/22.
Peer to Peer Discovery Nate Thrasher. Peer to Peer Discovery ● 2 Basic Categories – Hardware Discovery – Information Discovery ● JXTA (
Socket Programming.
Self-Constructing P2P Networks on the Project JXTA Platform Bill Yeager Chief Technologist Project JXTA Sun Microsystems, Inc.
1 JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000 M.S. Thesis Defense Joseph W. Longson March 30, 2000.
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
CSCI 4550/8556 Computer Networks Comer, Chapter 3: Network Programming and Applications.
CSE 636 Data Integration Web Services.
Intro to Programming Java Web Services using the Java TM API for XMLWeb Services (JAX-WS) Bill Champlin UCCS / CS526 Spring ‘09.
Networking Support In Java Nelson Padua-Perez Bill Pugh Department of Computer Science University of Maryland, College Park.
JXTA Lecture 1.JXTA Overview a) Background to Project JXTA b) Design Constraints c) Terminology d) Overview and Architecture e) Introducing the Concepts.
Middleware for P2P architecture Jikai Yin, Shuai Zhang, Ziwen Zhang.
MobileMAN Kickoff1 Prototype Development Kit & P2P Middleware Proposal Giovanni Turi IIT - CNR Pisa
Chapter 2 Architectural Models. Keywords Middleware Interface vs. implementation Client-server models OOP.
Networking Nasrullah. Input stream Most clients will use input streams that read data from the file system (FileInputStream), the network (getInputStream()/getInputStream()),
Cli/Serv.: JXTA/151 Client/Server Distributed Systems v Objective –explain JXTA, a support environment for P2P services and applications ,
思科网络技术学院理事会. 1 Application Layer Functionality and Protocols Network Fundamentals – Chapter 3.
Getting Started with JXTA for J2ME Advisor : Dr. Ching-Long Yeh Report : DI.2, 洪泰昌 ( ) Course: XML 文件管理.
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
Peer To Peer Applications
An program As a simple example of socket programming we can implement a program that sends to a remote site As a simple example of socket.
1 A P2P Collaborative System Using JXTA Hosei Graduation School ITPC 02R3315 Katsuhiro CHIBA.
Project JXTA : An Open Peer-to-Peer Network Environment Gene Kan Project JXTA Sun Microsystems, Inc.
11-1 Pipes. Learning Objectives ● This module will help you... – Understand key JXTA pipe concepts – Understand how pipes work – Gain familiarity with.
Module 12: Routing Fundamentals. Routing Overview Configuring Routing and Remote Access as a Router Quality of Service.
Indo-US Workshop, June23-25, 2003 Building Digital Libraries for Communities using Kepler Framework M. Zubair Old Dominion University.
Implementing Universal Plug And Play In Smart Objects And Intelligent Appliances Bengt Christensson CTO Axis Communications.
Open Data Protocol * Han Wang 11/30/2012 *
INMIDIO: an INteroperable MIddleware for service Discovery and service InteractiOn Daniele Sacchetti
Interoperability between Scientific Workflows Ahmed Alqaoud, Ian Taylor, and Andrew Jones Cardiff University 10/09/2008.
3-1 JXTA Platforms. 3-1 Learning Objectives ● Learn about the different platform implementations of the JXTA protocols – Features provided by each implementation.
Distributed Systems Concepts and Design Chapter 4.
XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer /11/05.
1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 — Simple Object Access Protocol (SOAP) and Microsoft BizTalk™ Outline 23.1Introduction 23.2Simple.
9-1 JXTA Discovery Learning Objectives This module will help you... – Understand how JXTA advertisements are published, cached, and.
13-1 Monitoring and Metering Learning Objectives ● This module will help you... – Understand the JXTA monitoring and metering functionality – Gain.
1 ObjectRiver Metadata Compilers Programmatic WebSockets JavaOne 2014 – Steven Lemmo.
Module 7: Advanced Application and Web Filtering.
Ipgdec5-01 Remarks on Web Services PTLIU Laboratory for Community Grids Geoffrey Fox, Marlon Pierce, Shrideep Pallickara, Choonhan Youn Computer Science,
Interprocess Communications
© 2009 Research In Motion Limited Advanced Java Application Development for the BlackBerry Smartphone Trainer name Date.
Kemal Baykal Rasim Ismayilov
7DS - Node Cooperation and Information Exchange in Mostly Disconnected Networks Suman Srinivasan, Arezu Moghadam, Se Gi Hong, Henning Schulzrinne IRT Lab,
S O A P ‘the protocol formerly known as Simple Object Access Protocol’ Team Pluto Bonnie, Brandon, George, Hojun.
Service Oriented Architecture + SOAP -Robin John.
REST By: Vishwanath Vineet.
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.
Peer Simple P2P implementation based on JXTA. JXTA history Started by SUN Microsystems in 1999 Released Open Source in 2001.
15-1 Service Wrapper Example Learning Objectives ● This module will help you... – Understand how to create your own advertisement – Understand how.
Confidential & Proprietary Information of Digital Focus J2ME and the IVY Platform.
Department of Communications, Optics & Materials Technical University of Denmark JXTA protocols Colin Chaballier Advanced.
10-1 JXTA Messages Learning Objectives ● This module will help you... – Develop applications and services which exchange messages either through.
OE-NIK HP Advanced Programming Web services Standards and protocols Using web services Using web services with asynchronous calls.
Project JXTA Kaarthik Sivashanmugam. JXTA..? JXTA is a set of open, generalized peer-to-peer (P2P) protocols that allow any connected device on the network.
USING ANDROID WITH THE INTERNET. Slide 2 Lecture Summary Getting network permissions Working with the HTTP protocol Sending HTTP requests Getting results.
Echo Networking COMP
Network Infrastructure Services Supporting WAP Clients
Building Distributed Educational Applications using P2P
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
Service Oriented Architecture + SOAP
Message Passing Systems Version 2
Message Passing Systems
Presentation transcript:

14-1 JXTA for J2ME

14-1 Learning Objectives ● This module will help you... – Learn about the architecture of JXTA for J2ME – Learn the JXTA for J2ME APIs – Learn how the JXTA for J2ME APIs can be used to build a simple peer-to-peer (p2p) application

14-1 What is JXTA for J2ME? ● Provides a peer-to-peer infrastructure for small devices ● Interoperates with Project JXTA protocols ● Provides a simple and easy-to-use API ● Has a small footprint: only about 10k ● MIDP-1.0 compliant ● Supports iAppli ● Network and carrier-independent

14-1 Project JXTA Virtual Network Peer HTTP TCP/IP Relay

14-1 Architecture Peer JXTA Relay JXTA Proxy JXTA Network Firewall

14-1 Architecture (continued) ● HTTP Relay – Relays messages between HTTP clients – Provides a Message Store for disconnected operation ● JXTA Proxy – Stores JXTA Advertisements – Filters JXTA traffic – Processes JXTA's XML messages and converts them to a compact, binary, easy- to-parse format

14-1 JXTA Relay ● Runs on publicly-addressable peers ● Provides connectivity for peers that are behind NAT and/or firewall ● Provides a message store for disconnected operation ● Lease management ● Uses the HTTP protocol ● GET and POST messages in a single round-trip to minimize latency

14-1 JXTA Proxy ● Is a JXTA Service ● Provides services for clients that – Have limited storage – Are on networks with limited bandwidth ● Translates client requests to JXTA protocols and the other way around – Currently supports Discovery and Pipe protocols ● Asynchronous

14-1 API Design Goals ● Minimize the number of classes: no interfaces, factories, listeners, inner classes ● Minimize the number of threads ● Have a low conceptual weight, low barrier-to-entry ● Hide complexity for the casual developer, while allowing low-level access for the advanced developer ● Use method overloading

14-1 API Overview ● PeerNetwork – Abstraction for a Network of Peers in a particular Group ● Message – Abstraction for a JXTA Message ● Element – Each JXTA Message can be composed of multiple elements

14-1 API: PeerNetwork static PeerNetwork createInstance(String peerName) – Factory method, used to create an instance of a PeerNetwork. byte[] connect(String relayURL, byte[] state) – Connect to a relay. create(PEER|GROUP|PIPE, String name, String arg) – Create a JXTA peer, group, or pipe. search(PEER|GROUP|PIPE, String query) – Search for JXTA peers, groups, or pipes.

14-1 API: PeerNetwork (continued) listen(String pipeName, String pipeId, String pipeType) – Open a pipe for input. close(String pipeName, String pipeId) – Close an input pipe. send(String pipeName, String pipeId, String pipeType, Message data) – Send data to the specified pipe. Message poll(int timeout) – Poll the relay for messages addressed to this peer.

14-1 API: Message Message(Element[] elements) – Construct a Message from an array of Elements. int getElementCount() – Return the number of Elements contained in this Message. Element getElement(int index) – Return t he Element contained in this Message at the specified index. int getSize() – Returns the size in bytes of this Message.

14-1 API: Element Element(String name, byte[] data, String nameSpace, String mimeType) – Create an Element from its parts. String getName() – Return the name of the Element. byte[] getData() – Return the data in the Element. String getNameSpace() – Return the namespace used by the Element name. String getMimeType() – Return the MIME type of the data in the Element.

14-1 JXME Example : Chat ● IRC Style chat group chat ● Supports 1-1 IM style chat as well ● Interoperates with J2SE Group Chat and JXTA- C Group Chat

14-1 Example: part 1 class Sample implements Runnable { String RELAY = “ PeerNetwork peer = null; Sample() { peer = PeerNetwork.createInstance(“sample-peer”); peer.connect(RELAY, null); peer.listen(“sample-pipe”, null, PeerNetwork.PROPAGATE_PIPE); }

14-1 Example: part 2 WaitForPipeId() { do { Message msg = peer.poll(1000); if (msg != null) { pipeId = processPipeIdResponse(msg); } } while (pipeId == null);

14-1 Example: part 3 String processPipeIdResponse(Message m) { for (int i=0; i < m.getElementCount(); i++) { Element e = m.getElement(i); if (Message.REQUESTID_TAG.equals(e.getName())) { requestId = new String(e.getData()); } else if (Message.ID_TAG.equals(e.getName()) { pipeId = new String(e.getData()); } return pipeId; }

14-1 Example: part 4 send(String text) { Element[] el = new Element[2]; el[0] = new Element(“JxtaTalkSenderName”, “sample-peer”.getBytes(), null, null); el[1] = new Element(“JxtaTalkSenderMessage”, text.getBytes(), null, null); Message m = new Message(el); peer.send(“sample-pipe”, pipeId, PeerNetwork.PROPAGATE_PIPE, m); }

14-1 Example: part 5 Run() { Message message = null; while (true) { m = peer.poll(1000); if (m != null) { for (int i = 0; i < m.getElementCount(); i++) { Element e = m.getElement(i); if ("JxtaTalkSenderName".equal(e.getName())...

14-1 Resources ● Go to for the source code, white papers, API documentation, sample applications and programmer's guide ● Send mail to for help

14-1 End – JXTA for J2ME