Jini Technology Part 1: Jini Technology Introduction Part 2: JavaSpace & GigaSpace.

36
Jini Technology Part 1: Jini Technology Introduction Part 2: JavaSpace & GigaSpace

Transcript of Jini Technology Part 1: Jini Technology Introduction Part 2: JavaSpace & GigaSpace.

Jini Technology

Part 1: Jini Technology Introduction

Part 2: JavaSpace & GigaSpace

Outline

What is Jini

Why is Jini needed

What is Jini Made From

What is Jini ?

Jini Technology IntroductionWhat Jini provides

Jini and Java

Jini Introduction 4Dept. of Information and Computer ScienceUniversity of Kagoshima

Jini Technology Introduction

Invented by Sun Microsystems, 1999 Implemented using the Java platform Service-oriented framework for creating

reliable distributed applications Designed with the network in mind Provides a spontaneous, self-healing

environment

Jini Introduction 5Dept. of Information and Computer ScienceUniversity of Kagoshima

What Jini providesJini programmatically provides the

infrastructure for a self healing network, of services and clients, that can dynamically leave and join, without crashing a network.

On joining services can announce themselves, and clients can discover services, which enable devices to plug together to form an impromptu community - a community put together without any planning, installation, or human intervention.

Jini Introduction 6Dept. of Information and Computer ScienceUniversity of Kagoshima

Jini and Java Builds upon Java

Platform-neutral environment

Object-oriented programming model

The Jini programming model extends Java

The Jini infrastructure provides the basic operation mechanism: spontaneous configuration

Jini services, client applications use the programming model and the infrastructure

Why is Jini needed ?

Common AssumptionsThe near future

Connected homeExamples

Jini Introduction 8Dept. of Information and Computer ScienceUniversity of Kagoshima

Common Assumptions

Most current systems make one or more of these assumptions: Networks are reliable Remote systems are fault-free Network latency is zero Bandwidth is infinite One administration domain Systems are homogeneous

These assumptions do not hold in distributed systems.

Jini operates without these assumptions

Jini Introduction 9Dept. of Information and Computer ScienceUniversity of Kagoshima

The near futureIn the near future, with the continued drop in

processor price, and increase in power, the world will reach a point when networks will become pervasive. That is, networks and devices capable of connecting to it will be everywhere.

A pervasive network will be dynamic and have no central administration.

Part of the pervasive network will be the “connected home”

Jini Introduction 10Dept. of Information and Computer ScienceUniversity of Kagoshima

“connected home”

Jini Introduction 11Dept. of Information and Computer ScienceUniversity of Kagoshima

Ideas Sat down,its too hot, can't find air

conditioner's dedicated remote control, instead open phone, from registered devices select aircon and change temperature.

In the kitchen Fridge's control panel beeps, and flashes icon, to indicate that the washing machine, in the basement, has finished.

Home blood pressure measuring device, with no physical display, can be uploaded its GUI to TV to see historical graphs plotted.

Jini Introduction 12Dept. of Information and Computer ScienceUniversity of Kagoshima

More Ideas

Sat down, relaxing, watching video with surround sound fully up, then receive a phone call, phone automatically requests video to pause, or sound to be muted, whilst taking the call.

Sat at office desk, mobile muffled in briefcase or suit pocket (hung up in the corner of the room), but in range of your desk phone, automatically reroutes call.

What is Jini Made from?

Jini Architecture

Jini parts in detail

Key participants

Jini Introduction 14Dept. of Information and Computer ScienceUniversity of Kagoshima

Jini Architecture

SPARC

SolarisSolaris

Java

PowerPC

SolarisMac

Java

x86

Windows

Java

RMI

Discovery/Join

Lookup

Applications JavaSpaces Other services

Jini

Network services

Jini Introduction 15Dept. of Information and Computer ScienceUniversity of Kagoshima

Jini parts in detail

Jini Introduction 16Dept. of Information and Computer ScienceUniversity of Kagoshima

Key participants Service

A service is an entity that another program, service or user can use. It can be a piece of computation, a hardware device or software.

Client A Jini device or component that becomes the member of

the federation in order to use a Jini service. Lookup Service

The central element of a Jini federation. The lookup service (also known as the service locator or service registrar) keeps track of the services offered in the federation.

Repository of available services. Stores each service as Java objects. Clients download services on demand.

How is spontaneity provided?

Uncoupling Client/Server

Registering, finding, interacting

Jini Introduction 18Dept. of Information and Computer ScienceUniversity of Kagoshima

Uncoupling Client-server Traditional client-server systems are tightly

coupled Client connects to server

using a name Presents a problem if

server fails; does not scale

Jini uncouples: lookup services are discovered at runtime Client does not need to know the

service location any longer Sufficient to locate a lookup service;

service can be found in the lookup service

Client Service3. use

Lookup service

1.1 discover2.1 discover

1.2 register2.2 lookup

ServerClient

Jini Technology

Jini Introduction 19Dept. of Information and Computer ScienceUniversity of Kagoshima

Registering, finding & interacting1. Registering a service

2. Finding a service

3. Interacting with a service

How our failures handled ?

Distributed Leasing

Removal of service, via lease

Jini Introduction 21Dept. of Information and Computer ScienceUniversity of Kagoshima

Distributed Leasing in Jini

Leasing is a protocol for managing resources based on a renewable, duration-based model.

A Lease is a contract between objects. Resources can be shared or private Provides a method of managing resources in

an environment where network failures can, and do, occur.

Jini Introduction 22Dept. of Information and Computer ScienceUniversity of Kagoshima

Removal of old service, via leases

1.Printer Registers

2. Printer is unplugged

3. Printer service is removed

The printer's registration is given a lease, by the Lookup Service, which has to be periodically renewed.As the printer was unplugged, it did not get a chance to remove it's service.

The lease for the printer expires, and the printer service is removed by the Lookup Service

How is UI made mobile ?

Mobile Objects

Distributed Leasing

Removal of service, via lease

Jini Introduction 24Dept. of Information and Computer ScienceUniversity of Kagoshima

Mobile Objects

What other technologies do: XML delivers mobile data, describe once, use

anywhere.

Java delivers mobile code, compile once, run anywhere

JINI brings to life mobile objects (data+code):Mobile objects for calculations: used by distributed computing

ServiceUI for GUI interfaces: can be used in consumer electronics (CE), washing machines, fridges, cookers, water heaters, as well as printers, disc drives etc.

Jini Introduction 25Dept. of Information and Computer ScienceUniversity of Kagoshima

The ServiceUI framework The ServiceUI Jini community (http://serviceui.jini.org)

project defined how to attach user interfaces to Jini services

The user interface is provided by the service and travels to the client in an additional attribute of the ServiceItem object

Advantages No prior installation necessary Same interface everywhere Adaptive interfaces based on user and device characteristics

Jini Introduction 26Dept. of Information and Computer ScienceUniversity of Kagoshima

Summary

Examined the inception of the pervasive network and connected home.

Over-viewed the architecture, and operation of Jini Technology.

Looked at some of Jini's features that make it very well suited for creating reliable distributed systems.

JavaSpace & GigaSpace

Introducing GigaSpace

Collocated Space

Cluster architecture

Load balancing

High availability

Jini Introduction 28Dept. of Information and Computer ScienceUniversity of Kagoshima

Introducing GigaSpace GigaSpace is a commercial implementation of

JavaSpace, which seamlessly augments functionality, without altering any of Jini/JavaSpace specifications.

GigaSpace features: Embedded Spaces Clustering:

Load Balancing High availability:

Fail over Replication

Jini Introduction 29Dept. of Information and Computer ScienceUniversity of Kagoshima

A multitude of workers

Many workers puts the JavaSpace under performance pressure.

Jini Introduction 30Dept. of Information and Computer ScienceUniversity of Kagoshima

JavaSpace & Master together

Master and JavaSpace on one server.

Eliminated network communication for Master.

But communication is still slow because network protocols are still used.

Jini Introduction 31Dept. of Information and Computer ScienceUniversity of Kagoshima

Embedded Space

Master embedded with GigaSpace, using a collocated proxy to access space.

Same Java VM used. Fast local calls, instead

of slow remote calls. But what if one server

is still not enough?

Jini Introduction 32Dept. of Information and Computer ScienceUniversity of Kagoshima

Cluster architecture GigaSpace augments JavaSpace with a cluster

architecture. A GigaSpaces cluster is a collection of two or more

GigaSpaces space instances that are logically grouped, and collaborate in order to present unified service.

Each member in a cluster may reside in a different container on a different host. Each member has a separate identity, but still collaborate "behind the scenes."

Each cluster has an XML config file.

Jini Introduction 33Dept. of Information and Computer ScienceUniversity of Kagoshima

Load Balancing A Cluster is defined with multiple spaces

Operations are distributed between spaces by load balancing policy:

Round-Robin: Splits operations

Fixed by hash: Splits entries

Hash based: Splits operations and entries

Jini Introduction 34Dept. of Information and Computer ScienceUniversity of Kagoshima

High Availability – Fail Over Fail over policies:

To available: Fail to another space within fail over group

Fail to Backup: Reroute to designated backup spaces.

Fail to alternate: Fail to space in a list of external group

Jini Introduction 35Dept. of Information and Computer ScienceUniversity of Kagoshima

High Availability - Replication Two replication policies:

Full replication Partial replication; for entries that entries that

implement the com.j_spaces.core.client.IReplicatable interface.

Replication can take place synchronously or asynchronously.

Jini Introduction 36Dept. of Information and Computer ScienceUniversity of Kagoshima

Summary 2 Part 1, covered the Jini networking technology Part 2, covered the JavaSpace, a Jini Service, and

a commercial implementation of it, GigaSpace. The GigaSpaces cluster provides three basic

mechanisms: replication, fail-over and load balancing.

Clustering spaces achieves high availability and scalability.

In conclusion; GigaSpace augments JavaSpace to solve enterprise scale needs.