CS556: Distributed Systems - PowerPoint PPT Presentation

1 / 31
About This Presentation
Title:

CS556: Distributed Systems

Description:

Federations of software services and/or devices ... a collection of co-operating peers. Eg: in the context of a service. World Peer Group ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 32
Provided by: dimp9
Category:

less

Transcript and Presenter's Notes

Title: CS556: Distributed Systems


1
CS-556 Distributed Systems
Jini JXTA
  • Manolis Marazakis
  • maraz_at_csd.uoc.gr

2
Distributed programming
  • Distributed computing is more difficult than
    local computing because of
  • Network latency
  • Concurrency issues
  • Memory (state) management
  • Inevitable partial failure

Remote increasingly looks like local
3
Jini
  • A set of interfaces protocols
  • Spontaneous networking
  • Federations of software services and/or devices
  • H/W S/W entities are represented by Java
    objects
  • Located accessed via Java interfaces
  • Self-healing networks
  • Vision
  • Make the installation use of devices app.
    software as simple as plugging in a phone
  • Java tone

4
Jini Java
  • Java VM
  • homogeneous network
  • Portable object code
  • architecture independence
  • Downloadable code
  • dynamic environment
  • Unified type system
  • Key component
  • Lookup Service
  • repository of service proxies
  • Clients download services
  • on-demand

5
Using the Lookup service
Clients inquire by service type
Discovery Join protocols - based on UDP
multicast
6
Discovery Join
  • Traditional Technology
  • Device is added to computer
  • Device definition is edited in node configuration
    table
  • Computer is restarted
  • Updated configuration table is pushed to network
    device map
  • Jini Technology
  • Device is plugged in powered up
  • Lookup service receives multicast
  • Lookup service authenticates source
  • Lookup service sends advertisement
  • Device joins Lookup service

7
Finding using a service
  • Communication is bet. the service
  • its proxy
  • Independent of wire protocol
  • Protocol can change without
  • affecting client
  • - RMI semantics

8
Distributed leasing (I)
  • Protocol for managing resources using a
    renewable, duration-based model
  • Contract between objects (grantor holder)
  • Resources can be shared or private
  • Provides a method of managing resources in an
    environment where partial failures occur
  • Time-based grants of resources or services
  • Negotiated for a set period of time
  • Can be shared or exclusive
  • Leases may be
  • Cancelled (explicit cleanup)
  • Renewed (explicit extension)
  • Allowed to expire (implicit cleanup)
  • Obtained manipulated by 3rd parties

9
Distributed leasing (II)
  • Resources are allocated only as long as continued
    interest is shown
  • The lease holder is responsible to renew lease
    before expiry
  • The network is self-healing

10
Distributed Events
  • Extend Java event model to work in a distributed
    network
  • Register interest, receive notification
  • Allow for use of event managers
  • Support various delivery models
  • Push, pull, filter
  • Use the Distributed Leasing protocol

11
Distributed transactions
  • Designed for distributed object coordination
  • Light weight, object-oriented
  • Supports two-phase commit
  • Uses Distributed Leasing protocol
  • Implemented in Transaction Manager service

12
Jini JavaSpaces
13
Architecture layers
14
Communication Events
15
Processes (I)
  • A JavaSpace can be replicated on all machines.
    The dotted lines show the partitioning of the
    JavaSpace into subspaces.
  • Tuples are broadcast on WRITE
  • READs are local, but the removing of an instance
    when calling TAKE must be broadcast

16
Processes (II)
  • Unreplicated JavaSpace.
  • A WRITE is done locally.
  • A READ or TAKE requires the template tuple to be
    broadcast in order to find a tuple instance

17
Processes (III)
  • Partial broadcasting of tuples template tuples.

18
The Jini Lookup Service (I)
19
The Jini Lookup Service (II)
  • Examples of predefined tuples for service items.

20
Synchronization of Transactions
21
PAM
22
Evolution of network computing
C/S model is increasingly seen as a limiting
factor !
23
Motivation for peer-to-peer (p2p)
  • Vast underutilization of Internet assets
  • Information
  • World data production 2x1018 bytes/year
  • Published 3x1012 bytes
  • Transient data cannot be captured by Web crawlers
  • Google 1.3x108 pages
  • Bandwidth
  • x 106 increase since 1975
  • x2 every 16 months
  • Yet hot spots remain !
  • Computing resources
  • Concentrated in data centers
  • Crippling rate of increase of workloads
  • Hard to keep up with demand !

24
JXTA software architecture
Platform- transport-independent protocols
25
JXTA concepts (I)
  • UUID 128-bit internal identifier per entity
  • Must be explicitly bound to external name to form
    a security principal
  • The authenticity of the binding can be ensured by
    including digital signatures
  • Advertisement
  • XML document that names describes the existence
    of a resource
  • Peer, peer group, pipe, services (codats)
  • Messages
  • Datagram-like, assuming unreliable, asynchronous,
    uni-directional transport
  • Envelope header, msg digest, source end-point
    (optional), destination end-point
  • Stack of protocol headers bodies
  • Variable number of bytes security credentials

26
JXTA concepts (II)
  • Peers
  • any entity that can interact with (a subset of)
    the JXTA protocols
  • End-point
  • a URI identifying a logical destination on a
    transport that supports datagram-like messaging
  • Peer group
  • a collection of co-operating peers
  • Eg in the context of a service
  • World Peer Group
  • Pipes
  • Asynchronous, uni-directional comm. Channels
  • A pipes end-point can be bound to one or more
    peer end-points
  • Usually dynamically, at run-time

27
JXTA protocols
  • Peer discovery
  • Find advertisements
  • Peer resolver
  • Search for peers, peer groups, pipes,
  • Peer information
  • Inquire a peers capabilities status
  • Peer membership
  • Obtain group membership requirements
  • Specs of credentials, authenticator,
  • Apply for/update/cancel membership
  • Pipe binding
  • Bind an advertisement to a pipe end-point
  • End-point routing
  • Ask a peer router for available routes for a
    destination
  • Peers may not be directly connected
  • Different transports, Firewalls, NATs

28
JXTA Shell (I)
  • Command-line access to the JXTA platform
  • Publish, search execute codats
  • Discover peers groups
  • Create pipes to connect peers
  • Send/receive messages
  • Stdin default input pipe
  • Stdout default output pipe
  • Pipes can be dynamically disconnected
    reconnected
  • cat myfile grep jxta
  • cat myfile gtp1 grep ltp1 jxta
  • grep ltp1 unix

29
JXTA Shell (II)
  • cat
  • Display advertisement, message, structured
    document (as read using importfile)
  • mkpipe io ltpipe-advgt
  • mkmsg
  • send ltoutPipegt ltmsggt
  • recv -t lttimeoutgt ltinPipegt
  • Codats can be imported into codat containers
  • share ltURIgt
  • Currently, only local file// URIs are supported
  • Symbolic name size MIME type encoding
  • ls
  • listing of codats currently cached by the local
    peer
  • For the current peer group

30
JXTA Shell (III)
  • whoami -g
  • Display the local peers or current peer groups
    advertisement
  • mkadv
  • mkgrp
  • chgrp
  • join
  • leave
  • peers r
  • Propagate peer inquiry
  • Results are cached locally
  • peers
  • Display currently known peers
  • peerinfo ltidgt
  • groups

31
References
  • Jini Network Technology Web site
  • http//www.sun.com/jini/
  • Jiniology articles
  • http//www.artima.com/jini/jiniology/
  • JXTA project Web site
  • http//www.jxta.org/
Write a Comment
User Comments (0)
About PowerShow.com