9-1 JXTA Discovery www.jxta.org. 9-1 Learning Objectives This module will help you... – Understand how JXTA advertisements are published, cached, and.

Slides:



Advertisements
Similar presentations
ArrayLists The lazy mans array. Whats the matter here? int[] list = new int[10]; list[0] = 5; list[2] = hey; list[3] = 15; list[4] = 23;
Advertisements

Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
CSE 333 – SECTION 8 Networking and sockets. Overview Network Sockets IP addresses and IP address structures in C/C++ DNS – Resolving DNS names Demos.
ScaLAB seminar 21st October Intrinsic References in Distributed Systems Presented by: Nimish Pachapurkar.
Project JXTA.
Developers: Alexey Rastvortsev, Ilya Kolchinsky Supervisors: Roy Friedman, Alex Kogan.
Introduction to Jini & JavaSpaces
1 Internet Networking Spring 2006 Tutorial 8 DNS and DHCP as UDP applications.
Service Oriented Architectures in Heterogeneous Environments
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 (
JXTA: Tech Brief Dan Berger, Suvidhean Dhirakaosal, Essia Hamouda, Demetris Zeinalipour CS 202 Spring 2003.
Supporting Mobile Sensors and Typed Data Exchange Through the JXTA p2p Framework Supporting Mobile Sensors and Typed Data Exchange Through the JXTA p2p.
JXTA Selo TE Introduction What is JXTA ( pronounced Juxta ) What is JXTA ( pronounced Juxta ) Jxta – an open, network computing platform designed.
Hands-On Microsoft Windows Server 2003 Networking Chapter 7 Windows Internet Naming Service.
Fionn Murtagh Dimitri Zervas Pedro Contreras Royal Holloway, University of London Munich, 24 of June 2005 JXTA P2P, Web Services and WS-Talk.
Project Jxta Prepared by: Sameh El-Ansary SICS AB.
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.
Cli/Serv.: JXTA/151 Client/Server Distributed Systems v Objective –explain JXTA, a support environment for P2P services and applications ,
Project JXTA Instructor: Dr. Erdogan Dogdu Presented by: Liu Shuai
Getting Started with JXTA for J2ME Advisor : Dr. Ching-Long Yeh Report : DI.2, 洪泰昌 ( ) Course: XML 文件管理.
1 3. Implementing Web Services 1.Create SOAP proxy interfaces and WSDL based service descriptions 2.Register/publish services 3.Stores service descriptions.
1 A P2P Collaborative System Using JXTA Hosei Graduation School ITPC 02R3315 Katsuhiro CHIBA.
Triana: Service-Oriented Examples Ian Taylor Cardiff University, and the Center for Computation and Technology LSU.
Rev PA102/03/20041 Communication Between Peer Wireless Sensor Networks over 2.5G/3G Mobile Networks Srdjan Krco R&D Ericsson Ireland
KEx objectives Supporting distributed and heterogeneous organizations in managing their knowledge processes, by technologically implementing the basic.
11-1 Pipes. Learning Objectives ● This module will help you... – Understand key JXTA pipe concepts – Understand how pipes work – Gain familiarity with.
22 April 2005EPSRC e-Science Meeting AMUSE Autonomic Management of Ubiquitous Systems for e-Health Prof. J. Sventek University of Glasgow
January 26, Bob Scheifler Copyright 1999 Sun Microsystems, Inc., all rights reserved. Jini™ Lookup Service Bob Scheifler Senior Staff Engineer Sun.
8-1 Hello World. 8-1 Learning Objectives ● This module will help you... – Get started with running a simple JXTA application – Understand the JXTA configuration.
Hyung-Min Lee ©Networking Lab., 2001 Chapter 8 ARP and RARP.
2-1 JXTA Concepts. 2-1 Learning Objectives ● This module will help you... – Understand P2P principles – Learn about JXTA virtual network core building.
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.
Module 7: Resolving NetBIOS Names by Using Windows Internet Name Service (WINS)
14-1 JXTA for J2ME Learning Objectives ● This module will help you... – Learn about the architecture of JXTA for J2ME – Learn the JXTA for J2ME.
16-1 Developer Libraries and Services Learning Objectives: ● This module will help you... – Learn about optional JXTA libraries and services – Understand.
1 MSc Project Yin Chen Supervised by Dr Stuart Anderson 2003 Grid Services Monitor Long Term Monitoring of Grid Services Using Peer-to-Peer Techniques.
Dr. Ian Wang Cardiff University, U.K.. Ian Wang, Cardiff University Peer-to-Peer and Grids What does the Peer-to-Peer paradigm offer Grids? Scalable Decentralized.
Draft-gu-ppsp-peer-protocol-02 Presenter : Gu Yingjie IETF-81, Quebec, July, 2011.
13-1 Monitoring and Metering Learning Objectives ● This module will help you... – Understand the JXTA monitoring and metering functionality – Gain.
Topic 1 Object Oriented Programming. 1-2 Objectives To review the concepts and terminology of object-oriented programming To discuss some features of.
1 Lecture 16 Jini Technology Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung Institute of Technology
Jini Architecture Introduction System Overview An Example.
18-1 Summary (Day 2) Learning Summary – What is JXTA ? – Understand the fundamental concepts of JXTA – Learn about the various implementations of.
ECEG Group. iSpace Room Before iSpace Room After.
Spring RabbitMQ Martin Toshev.
Comunication&Synchronization threads 1 Programación Concurrente Benemérita Universidad Autónoma de Puebla Facultad de Ciencias de la Computación Comunicación.
© 2008 by Wind River; made available under the EPL v1.0 | 19-Nov-2008 TCF The Target Communication Framework Michael Scharf, Wind River wiki.eclipse.org/DSDP/TM/TCF_FAQ.
6-1 How to Write JXTA Applications. 6-1 Learning Objectives ● This module will help you... – Gain familiarity with guidelines and design conventions that.
15-1 Service Wrapper Example Learning Objectives ● This module will help you... – Understand how to create your own advertisement – Understand how.
© 2004 IBM Corporation WS-ResourceFramework Service Groups Tom Maguire.
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.
Orion Contextbroker PROF. DR. SERGIO TAKEO KOFUJI PROF. MS. FÁBIO H. CABRINI PSI – 5120 – TÓPICOS EM COMPUTAÇÃO EM NUVEM
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.
Project JXTA By Jude Mercado.
Resource subscription using DDS in oneM2M
M. Ranganathan ITG/ANTD/NIST
Peergroups.
Network Services Interface
Java Beans Sagun Dhakhwa.
Pre-assessment Questions
Network Services Interface
null, true, and false are also reserved.
Overview Multimedia: The Role of WINS in the Network Infrastructure
More on Discovery and Advertisement
Presentation transcript:

9-1 JXTA Discovery

9-1 Learning Objectives This module will help you... – Understand how JXTA advertisements are published, cached, and expired – Understand the JXTA discovery mechanism – Gain familiarity with the JXTA Discovery Service API

9-1 Advertisements XML documents – Provide platform-independent representation of objects that can be exchanged between different platforms (e.g., Java and C) Common operations – Create – Publish – Discover/search

9-1 Publishing Advertisements Cache Manager Discovery Service Index Store Expiration Store Expiration Persistence – Locally – Remotely – Out of band Horizon – Where to publish – When not to publish

9-1 Advertisement Caching Advertisements may be cached by peers – Protocols don't specify how peers cache info – Standard JXTA API bindings automatically perform caching Each advertisement published with a time-to-live – Relative expiration date – When expired, advertisements are removed – Advertisements can be re-published

9-1 Publish versus RemotePublish Publish() – Stores advertisement in persistent local cache – Exposes advertisements within peergroup – Can specify lifetime and expiration for others (DEFAULT_LIFETIME and DEFAULT_EXPIRATION) RemotePublish() – Publishes advertisement within local subnet and to connected rendezvous peers within the context of the group – Advertisements held in other peers' cache for specified duration (DEFAULT_EXPIRATION)

9-1 Rendezvous Peers Each peer group has a set of rendezvous peers – Rendezvous peers cache indices to edge peer advertisements – Discovery queries routed between rendezvous peers Any peer may become a rendezvous peer Peers can be pre-configured to know certain rendezvous peers or can discover them dynamically

9-1 Discovery Service Asynchronous mechanism for discovering advertisements (peers, peer groups, pipes, services) Implements Peer Discovery Protocol (PDP) Can retrieve advertisements in local cache Can send Discovery Query Message – To a specific peer – Propagated to JXTA network

9-1 Peergroup Services Services are accessible through the peergroup object: Java discService = peerGroup.getDiscoveryService(); C Jxta_PG_get_discovery_service(group, &discovery); PeerGroup Services Membership Pipe Discovery Rendezvous Resolver Endpoint PeerInfo

9-1 Asynchronous Discovery Model Peer propagates discovery request within a peergroup Responses are received asynchronously – Can query local cache (advertisements are stored asynchronously as they arrive) – Can use event-based notification (implement discovery listener) No guarantees when/if a response will be received

9-1 Guidelines Discovery – Limit discovery within NetPeerGroup to boot- strapping operation (i.e. Finding group, etc.) – Scope discovery of other resources within a smaller peergroup Publishing Advertisements – Should search for advertisements before creating – may already be published – Don't introduce inconsistencies (e.g., advertisements are uniquely identified by an ID, and some thought should be given when discovering by name)

9-1 Discovery Service – Java API void publish(Advertisement advertisement, int type) – Publish an advertisement with default lifetime and expiration for others. void publish(Advertisement adv, int type, long lifetime, long lifetimeForOthers) – Publish an advertisement that will expire after a certain time. void remotePublish(Advertisement advertisement, int type) – Remote publish an advertisement: will attempt to remote publish adv on all configured transports.. void remotePublish(Advertisement adv, int type, long lifetime) – Remote publish an advertisement: will attempt to remote publish adv on all configured transports. The Advertisement will carry a a expiration of lifetime. Publish Advertisements

9-1 Enumeration getLocalAdvertisements(int type, String attribute String value) – Retrieve stored peer, group, and general JXTA advertisements. void getRemoteAdvertisements(String peerid, int type,String attribute, String value, int threshold, net.jxta.discovery.DiscoveryListener listener) – Discovery JXTA peer, group, and general JXTA advertisements. void addDiscoveryListener(DiscoveryListener listener) – Add a discovery listener, to be notified on discovery events.. boolean removeDiscoveryListener(DiscoveryListener listener) – Remove a discovery listener. void flushAdvertisements(String id, int type) – Flush stored advertisements. Discovery Service – Java API Discover and Flush Advertisements

9-1 Discovery Example – Java public class DiscoveryDemo implements DiscoveryListener { static PeerGroup netPeerGroup = null; private DiscoveryService discovery; PeerAdvertisement peerAdv; static public void main(String args[]) { DiscoveryDemo myapp = new DiscoveryDemo(); myapp.startJxta(); myapp.run(); } // method to start the JXTA platform private void startJxta() { try { netPeerGroup =PeerGroupFactory.newNetPeerGroup(); } catch ( PeerGroupException e) {... } // Get the discovery service from our peer group discovery = netPeerGroup.getDiscoveryService(); }

9-1 Discovery Example – Java (continued) P ublic void discoveryEvent(DiscoveryEvent ev) { DiscoveryResponseMsg res = ev.getResponse(); String name = “unknown”; // Get the responding peer's advertisement // get the peer advertisement PeerAdvertisement peerAdv = res.getPeerAdvertisement(); if (peerAdv != null) { name = peerAdv.getName(); } System.out.println(" [ Got a Discovery Response ["+ res.getResponseCount()+ " elements] from peer : " + name +" ]"); // get the discovered Advertisements.... Enumeration responses = res.getAdvertisements(); }

9-1 Discovery Example – Java (continued) public void run() { try { discovery.addDiscoveryListener(this); while (true) { System.out.println("Sending a Peer Discovery Message"); discovery.getRemoteAdvertisements(null, DiscoveryService.PEER, null, null, 5, null); try { Thread.sleep(10 * 1000); }.. }.. }

9-1 Discovery Service – C API Jxta_status discovery_service_publish(Jxta_discovery_service *service, Jxta_advertisement *adv, short type, long lifetime, long lifetimeForOthers) Publish an advertisement that will expire after a certain time. Jxta_status discovery_service_remote_publish(Jxta_discovery_service *service, Jxta_id *peerid, Jxta_advertisement *adv, short type, long expirationtime) Remote publish an advertisement: will attempt to remote publish adv on all configured transports with the specified expiration. Jxta_status discovery_service_flush_advertisements(Jxta_discovery_service *service, char *id, short type) Flush stored advertisement Publish and Flush Advertisements

9-1 Discovery Service – C API Jxta_status discovery_service_get_local_advertisements (Jxta_discovery_service *service, short type, const char *attribute, const char *value, Jxta_vector **advertisements) – Retrieve stored peer, group and general JXTA advertisements. Jxta_status discovery_service_get_remote_advertisements (Jxta_discovery_service *service, Jxta_id *peerid, short type, const char *attribute, const char *value, int threshold, Jxta_discovery_listener *listener) – Discover peer, group, and general JXTA advertisements. Discover and Retrieve Advertisements

9-1 Discovery Service – C API Jxta_status discovery_service_add_discovery_listener (Jxta_discovery_service *service, Jxta_discovery_listener *listener) – Register a discovery listener, to be notified on discovery events. Jxta_status discovery_service_remove_discovery_listener (Jxta_discovery_service *service, Jxta_discovery_listener *listener) – Remove a discovery listener. Discovery Listeners

9-1 Discovery Example – C Jxta_PG_get_discovery_service(group, &discovery); discovery_service_get_local_advertisements(discovery, DISC_GROUP, (char *)jstring_get_string(attr), (char *)jstring_get_string(value), & res_vec); if (res_vec != NULL ) { int i; printf("restored %d group advertisement(s) \n",jxta_vector_size(res_vec)); for (i=0; i < jxta_vector_size(res_vec); i++ ){ Jxta_PGA * pgadv; Jstring * xml; jxta_vector_get_object_at (res_vec, (Jxta_object**)&pgadv, i); jxta_PGA_getxml( pgadv, &xml ); printf( (char *)jstring_get_string(xml) ); JXTA_OBJECT_RELEASE(pgadv); JXTA_OBJECT_RELEASE(xml); } JXTA_OBJECT_RELEASE(res_vec); }

9-1 End – JXTA Discovery