200 likes | 350 Views
Peer services: from Description to Invocation. Manuel Oriol. International Workshop on Agents and Peer-to-Peer Computing (AP2PC 2002). Introduction. P2P networks may be characterised by the fact that they are: Decentralised. Potentially Large. Very Dynamic. Heterogeneous.
E N D
Peer services: from Description to Invocation Manuel Oriol International Workshop on Agents and Peer-to-Peer Computing (AP2PC 2002)
Introduction • P2P networks may be characterised by the fact that they are: • Decentralised. • Potentially Large. • Very Dynamic. • Heterogeneous. • Provides (Distributed) Services.
Focus • We want to ease the use of services from peer to peer: • Adding services seamlessly. • Deciding to invoke the most adapted service on demand. • Using a mechanism adapted to the high dynamicity of P2P networks. • Contribution • An infrastructure for peer services that relies on...
Principles • Associative Naming: Peers are not named at all but they specify what do the services they provide. Peers do not call methods on other peers, they specify what they want. • Late Binding A request is served and bound on demand. • Asynchronous Communications All communications are asynchronous and peers do not block.
How to Specify? • Functionality: What does it do? (comparable to a method name) • Behaviour How does it do it? (comparable to method signature) • QoS How well does it do it? (comparable to the description of a method in an API)
Example of Code: Service providers • Service BubbleSort(F: "sort": "BubbleSort", B: argument: (int a[]: return: int[], char a[] : return: char []), QoS: local)[2,5,2]{...} • Service QuickSort(F: "sort": ”QuickSort", B: argument: int a[]: return: int[], QoS: local: “Complexity”: “Nlog(N)"), )[2,5,2]{...} Minimal Matching
Services Trees: BubbleSort ( , , ) QoS F B « Sort » argument local « BubbleSort » int [] char [] return return int [] char []
Services Trees: QuickSort QoS F B « Sort » argument local « QuickSort » int [] « Complexity » return « Nlog(N) » int [] ( , , )
Example of code: Clients • int a[]; T=Invoke((F: "sort", B: argument: a: return: int[], QoS: local: "Complexity": "Nlog(N)"), [2, 5, 2]); • char a[]; T=Invoke((F: "sort”: “QuickSort”, B: argument: a: return: char[], QoS: local), [3, 5, 2]); Minimal Matching
Clients trees (1) QoS QoS F F B B « Sort » « Sort » argument argument local local « QuickSort » « BubbleSort » int [] « Complexity » int [] char [] return « Nlog(N) » return return int [] int [] char [] ( , , ) QoS F B « Sort » argument local int [] « Complexity » return « Nlog(N) » int []
Client Trees (2) QoS QoS F F B B « Sort » « Sort » argument argument local local « QuickSort » « BubbleSort » int [] int [] char [] « Complexity » return return return « Nlog(N) » int [] int [] char [] ( , , ) QoS F B « Sort » argument local « QuickSort » char [] « Complexity » return « Nlog(N) » char []
Special Labels for Matching • Ø: adds 1 to the depth of this branch. • Ø*: the branch matches at an infinite depth. • : the branch should terminate there (otherwise the depth is 0). • ? : the label may be everything.
Relocalizing Peer Services in JXTA PeerGroup Services Basic With Service Manager
Conclusion • We presented our architecture that addresses the problem of services in very dynamic environments through associative naming, late binding and asynchrony. • We give a way of quantifying how well (possibly complex) descriptions match and prefer some services to others. • We show that the principles may be adapted to decentralized P2P networks.
Future work • We want to implement a prototype of this architecture on top of JXTA. • We want to investigate further the use of already existing ontology technologies.
QoS F B « Sort » argument local « QuickSort » int [] « Complexity » return « Nlog(N) » int []
QoS B argument local int [] char [] return return int [] char [] F « Sort » « BubbleSort »