• Keine Ergebnisse gefunden

Infrastructure (“middleware”) for dynamic, cooperative, spontaneously networked systems

N/A
N/A
Protected

Academic year: 2021

Aktie "Infrastructure (“middleware”) for dynamic, cooperative, spontaneously networked systems"

Copied!
17
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Jini

Kurzfassung als Kapitel für die Vorlesung „Verteilte Systeme“

ƒ

Infrastructure (“middleware”) for dynamic, cooperative, spontaneously networked systems

ƒ facilitates realization of distributed applications

Jini

(2)

F. Ma. 3

ƒ

Infrastructure (“middleware”) for dynamic, cooperative, spontaneously networked systems

ƒ facilitates realization of distributed applications

Jini

• framework of APIs with useful functions / services

• helper services (discovery, lookup,...)

• suite of standard protocols and conventions

ƒ

Infrastructure (“middleware”) for dynamic, cooperative, spontaneously networked systems

ƒ facilitates realization of distributed applications

Jini

• services, devices, … find each other automatically (“plug and play”)

• dynamically added / removed components

• changing communication relationships

• mobility

(3)

F. Ma. 5

Jini

ƒ

Infrastructure (“middleware”) for dynamic, cooperative, spontaneously networked systems

ƒ facilitates realization of distributed applications

ƒ

Based on Java

ƒ may use RMI (Remote Method Invocation)

ƒ typed (object-oriented) communication structure

ƒ requires JVM / bytecode everywhere

ƒ code shipping

Jini

ƒ

Strictly service-oriented

ƒ everything considered a service (hardware, software, user)

ƒ Jini system is a federation of services

ƒ

Infrastructure (“middleware”) for dynamic, cooperative, spontaneously networked systems

ƒ facilitates realization of distributed applications

ƒ

Based on Java

ƒ may use RMI (Remote Method Invocation)

ƒ typed (object-oriented) communication structure

ƒ requires JVM / bytecode everywhere

ƒ code shipping

(4)

F. Ma. 7

ƒ

(Almost) everything is a service

ƒ e.g. persistent storage, software filter, …

ƒ

Jini’s run-time infrastructure offers mechanisms for adding, removing, finding, and using services

ƒ

Services are defined by interfaces and provide their functionality via their interfaces

ƒ services are characterized by their type and their attributes(e.g. “600 dpi”, “version 21.1”)

ƒ

Services (and service users) “spontaneously”

form a system (“federation”)

Service Paradigm

Jini: Global Architecture

ƒ Lookup Service(LUS)

ƒ main registry entity and brokerage service for services and clients

ƒ maintains information about available services

ƒ Services

ƒ specified by Java interfaces

ƒ register together with proxy objects and attributes at the LUS

ƒ Clients

ƒ know the Java interfaces of the services, but not their implementation

ƒ find services via the LUS

ƒ use services via proxy objects

Lookup Service Client

Client

Client ServiceServiceService

(5)

F. Ma. 10

Network Centric

ƒ Jini is centered around the network

ƒ “the network is the computer”

ƒ Network = hardware and software infrastructure

ƒ View is “network to which devices are connected to”, not “devices that get networked”

ƒ network always exists, devices and services are transient

ƒ Set of networked devices is dynamic

ƒ components and communication relations come and go

ƒ Jini supports dynamic networks and adaptive systems

ƒ adding and removing components should only minimally affect other components

Spontaneous Networking

ƒ

Objects in an open, distributed, dynamic world find each other and form a transitory community

ƒ cooperation, service usage, …

ƒ

Typical scenario: client wakes up (device is

switched on, plugged in, …) and asks for services in its vicinity

ƒ

Finding each other and establishing a connection

should be fast, easy, and automatic

(6)

F. Ma. 14

Some Fallacies of Common

Distributed Computing Systems

ƒ

The “classical” idealistic view…

ƒ the network is reliable

ƒ latency is zero

ƒ bandwidth is infinite

ƒ the network is secure

ƒ the topology is stable

ƒ there is a single administrator

ƒ

…isn’t true in reality

ƒ Jini addresses some of these issues

ƒ at least it does not hide or ignore them

Bird’s-Eye View on Jini

ƒ

Jini consists of a number of APIs

ƒ

Is an extension to the Java platform dealing with distributed computing

ƒ

Is an abstraction layer between the application and the

underlying infrastructure (network, OS)

ƒ Jini is a kind of “middleware”

Network Operating system

Java technology Jini technology Jini technology Applications Services

(7)

F. Ma. 16

Jini’s Use of Java

ƒ

Jini requires JVM (as bytecode interpreter)

ƒ homogeneity in a heterogeneous world

ƒ is this realistic?

ƒ

But: devices that are not “Jini-enabled” or that do not have a JVM can be managed by a software proxy which resides somewhere in the net

run protocols for discovery and join; have a JVM

Jini Infrastructure

ƒ

Main components are:

ƒ lookup service as repository / naming service / trader

ƒ protocols based on TCP/UDP/IP

ƒ discovery & join, lookup of services

ƒ proxy objects

ƒ transferred from service to clients

ƒ represent the service locally at the client

ƒ

Goal: spontaneous networking and formation of federations without prior knowledge of local network environment

ƒ

Problem: How do service providers and clients

learn about their local environments?

(8)

F. Ma. 18

Lookup Service (LUS)

ƒ

Main component of every Jini federation

ƒ

Repository of services

ƒ

Similar to RMI registry or naming services of other middleware architectures

ƒ

Functions as a “help-desk” for services and clients

ƒ registration of services (services advertise themselves)

ƒ distribution of services (clients lookup and find services)

ƒ

Has mechanisms to bring together services and clients

Lookup Service

Client

Lookup service

Service

-

registe lookup r

use Jini- Federation

(9)

F. Ma. 20

Example

Lookup service

Office application

Printer

proxy arbitrary protocol

Communication between application and printer via functional calls of the proxy

Printer proxy

Printer proxy

Lookup Service

ƒ Uses Java RMIfor communication

ƒ objects („proxies“) can migrate through the net

ƒ Not only name/address of a service is stored (as in traditional naming services), but also

ƒ set of attributes

ƒ e.g.: printer(color: true, dpi: 600, ...)

ƒ proxies, which may be complex classes

ƒ e.g. user interfaces

ƒ Further possibilities:

ƒ increase robustness by running redundant lookup services

ƒ responsibility can be distributed to a number of (logically separated) lookup services

(10)

F. Ma. 22

Discovery: Finding a LUS

ƒ

Goal: Find a lookup service (without knowing anything about the network) to

ƒ advertise (register) a service

ƒ find (look up) an existing service

ƒ

Discovery protocol:

ƒ multicast to well-known address/port

ƒ lookup service replies with a serialized object (its proxy)

ƒ communication with LUS via this proxy

Discovery

Where is the lookup

service?

Lookup Service

???

Lookup Service That’s me!!!

Multicast Request

Reply

Lookup Service

Lookup Service Lookup Service

Proxy Proxy

Lookup-Service

Proxy Proxy

(11)

F. Ma. 24

Multicast Discovery Protocol

ƒ Search for lookup services

ƒ no information about the host network needed

ƒ Discovery request uses multicast UDPpackets

ƒ multicast addressfor discovery is 224.0.1.85

ƒ default port numberof lookup services is 4160

ƒ recommended time-to-liveis 15

ƒ usually does not cross subnet boundaries

ƒ Discovery replyis establishment of a TCP connection

ƒ port for reply is included in multicast request packet

Join: Registering a Service

ƒ

Assumption: Service provider already has a proxy of the lookup service (Æ discovery)

ƒ

It uses this proxy to register its service

ƒ

Gives to the lookup service

ƒ its service proxy

ƒ attributes that further describe the service

ƒ

Service provider can now be found and used in

this Jini federation

(12)

F. Ma. 26

...

Lookup Service

Service database in LUS

Join

Lookup Service Lookup Service

Proxy Proxy

Entry 1 Entry 2...Entry n Service

proxy

Entry1Entry2...Entry n Service

proxy

Registration Service

Registration

Join: More Features

ƒ To join, a service supplies:

ƒ its proxy

ƒ its ServiceID(if previously assigned; “universally unique identifier”)

ƒ set of attributes

ƒ (possibly empty) set of specific lookup servicesto join

ƒ Service waits a random amount of time after start-up

ƒ prevents packet storm after restarting a network segment

ƒ Registration with a lookup service is bound to a lease

ƒ service has to renewits lease periodically

(13)

F. Ma. 28

Lookup: Searching Services

ƒ Client creates query for lookup service

ƒ in the form of a “service template”

ƒ matching by registration numberof service and/or service type and/or attributes possible

ƒ attributes: only exact matchingpossible (no “larger-than”, ...)

ƒ wildcardspossible („null“)

ƒ Via its proxy at the client, the lookup service returns zero, one or more matches (i.e., server proxies)

ƒ Selection of several matches usually done by client

ƒ Client uses service by calling functions of the service proxy

ƒ Any “private” protocol between service proxy and service provider is possible

...

Lookup Service

Service database in LUS Entry1Entry2...Entry n Service

Service proxy proxy

Entry1Entry2...Entry n Service

Service proxy proxy

Lookup

Lookup Service

Proxy

Proxy

?

Lookup

? ?

proprie tary proprie

tary protocol protocol

Client

Entry1Entry2...Entry n Service

Service proxy proxy

(14)

F. Ma. 31

Proxies

ƒ

Proxy object is stored in the lookup service upon registration

ƒ serialized object

ƒ implements one or more service interfaces

ƒ

Upon request, stored object is sent to the client as a local proxy of the service

ƒ client communicates with service implementation via its proxy: client invokes methods of the proxy object

ƒ proxy implementation hidden from client

Smart Proxies

ƒ Parts of or whole functionality may be executed by the proxyat the client

ƒ When dealing with large volumes of data, it usually makes sense to preprocess parts of or all the data

ƒ e.g.: compressing video data before transfer

ƒ Partition of service functionality depends on service implementer’s choice

ƒ client needs appropriate resources

Client

Client ServiceService Proxy

Proxy Communication

Client

Client ServiceService Proxy

Proxy Comm ication

(15)

F. Ma. 33

Leases

ƒ

Leases are contracts between two parties

ƒ

Leases introduce a notion of time

ƒ resource usage is restricted to a certain time frame

ƒ

Repeatedly express interest in some resource:

ƒ I’m still interestedin X

ƒ renew lease periodically

ƒ lease renewal can be denied

ƒ I don’t needX anymore

ƒ cancel lease or let it expire

ƒ lease grantor can use X for something else

Distributed Events

ƒ

Objects on one JVM can register interest in certain events of another object on a different JVM

ƒ

“Publisher/subscriber” model

Subscriber Event

source

1. Registration

2. Event occurs 3. Send notification

(16)

F. Ma. 36

Distributed Events – Example

ƒ Example: printer is plugged in

ƒ printer registersitself with local lookup service

ƒ Maintenance application wants to update software

Lookup-Service

Maintenance application

Any protocol Proxy, attributes

Proxy, attributes

Proxy, attributes

ƒ Maintenance application is run on demand, search for printers is “outsourced”

ƒ “sensor service” looks for certain services on behalf of the maintenance application

ƒ application registers for eventsshowing the arrival of certain types of printers

ƒ sensor observes the lookup service

ƒ notifies applicationas soon as matching printer arrives via distributed events

Lookup-Service

Maintenance application

Sensor service

Tell me about the arrival of new printers of type x!

Distributed Events – Example

(17)

F. Ma. 38

ƒ Example: printer arrives, registers with lookup service

ƒ printer performs discovery and join

ƒ sensor finds new printer in lookup service

ƒ checks if there

is an event registration for this type of printer

ƒ notifiesall interested objects

ƒ maintenance applicationretrieves printer proxy and updates software

Lookup-Service

Maintenance application

A new printer arrived.

I have to notify all interested objects!

Notification

Sensor service

Proxy, attributes Proxy, attributes

Distributed Events – Example

Jini Issues and Problem Areas

ƒ Security

ƒ important especially in dynamic environments

ƒ services use other services on behalf of the user

ƒ principals, delegation

ƒ simply rely on Java security?

ƒ Scalability

ƒ does Jini scale to a global level?

ƒ Java centric

ƒ Similar, non-Java-based systems

ƒ UPnP, Bluetooth SDP, SLP, HAVi, Salutation, e-speak, HP Chai,...

ƒ open, Internet-scale infrastructures (e.g., Web services)

Referenzen

ÄHNLICHE DOKUMENTE

We presented stability and performance estimates for nonlinear model predictive control with time varying con- trol horizon in a continuous time setting.. In particular, we

We first consider the case C = ∅ both for the stan- dard scheme and for our maximally-diverse contact selection scheme. The idea is to summarize over the number of possible nodes in

Despite the large difference in terms of scene content as well as exposure ration between the input LDR, our HDR model is able to effectively extend the dynamic range of the

Nonlinear Dynamics: Stability of Synchronisation on Complex Networks Above, different probabilistic stability measures are developed, mainly within the framework of synchronisation

A coarse classification of approaches can be made based on whether an approach analyzes dynamic control flow (also referred to as method execution tracing) or dynamic data (object

• If the head record is found the article record is written into a local Primo data

We showed that equilibrium strategies are monotone in degree (i.e. in the number of neighbors an agent has on the network) and that this monotonicity is reversed depending on

• Market failure is more severe in case of self-protection (EU security, airport security) than in case of total protection (vaccination, malware). ➡ Incentives of the agents