This preview shows page 1 out of 4 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1JiniCMSC 4332Jini overview• Framework and services on top of Java RMI– finding services• finding registries• searching registries• keeping registries up to date– Distributed events– Transactions– JavaSpaces• Shared store3Providing ServicesLookupServicePrinterServiceProxyPrinterInterfaceregistration4Finding providersLookupServicePrinterServicePrinterProxyPrinterClientPrinterInterfacePrinterProxy5Using ServicesLookupServicePrinterServicePrinterProxyPrinterClientPrinterProxy6Proxies• Java classes that implement standardinterfaces• Classes get downloaded as needed– From http server?• Proxies can use any mechanism tocommunicate with service– RMI stubs, local computation and anycommunication medium27Lego Mindstorm Proxies• An example: Proxies for Lego Mindstormrobots• Processor on Mindstorm not powerfulenough to host a JVM• Proxy can keep state about robot,communicate through infrared link8Lookup services• Broadcast looking for lookup servicesmessages• Each lookup service on network respondswith a proxy• Queries to lookup service are done throughproxy– actual communication with lookup service is upto proxy9Using a lookup service• Can specify a list of classes/interfaces– only interested in results that are subtypes of all• Can specify attributes– Location {String building;String floor; String wing; }– must match all attributes10Service ID’s• When services first register, they areassigned a service ID– 128 GUID• a particular service using the same serviceID on all lookup services– if you get the same service back from multiplelookup services, can detect duplicates11Leasing• When a service registers with a lookupservice, it gets a limited duration lease– if lease expires without being renewed, serviceis de-listed• Service must renew lease– makes sure service is still up and still reachablefrom lookup service12Finding lookup services, revisited• When a service is activated, broadcastsrequest to find lookup services– using multicast over local net• When lookup service is activated, and atperiodic intervals, broadcasts “I’m a lookupservice”– services that learn about new lookup servicesregister with them313Example• Jini network among computers at home• Jini wireless network among my cell phone,and PDA• Don’t have to push an “I’m home” button• Next time lookup services announce “I’mhere”, networks will join14Attribute lookup• Attributes have public references for fields– no primitive types• To match– Lookup attribute must be subtype of storedattribute– Each non-null field must be equal15TO COME• Distributed events• Transactions• JavaSpaces16Transactions• Create a transaction from a transactionmanager– requires maintaining a lease• All actions performed as part of atransaction should only be visible to thattransaction– until the transaction commits17Committing a transaction• All participants are asked to prepare thetransaction– log it to persistent storage– so that it will survive crashes• Then commit– or abort18JavaSpaces• Derived from Linda TupleSpace• Store that supports transactions• Contains entry objects– i.e., records• Stored objects are leased– if lease expires, entry removed419JavaSpace operations• write - add an entry• read - find a matching entry– Can wait for matching entry (with timeout)• notify - add listening for matching entries• take - read and delete atomically20JavaSpace matching• Entry’s match just like Jini lookup attributes• Can provide don’t cares• Can use


View Full Document

UMD CMSC 433 - Jini

Documents in this Course
Trace 1

Trace 1

62 pages

Reflection

Reflection

137 pages

Testing

Testing

25 pages

Paradigms

Paradigms

10 pages

Testing

Testing

17 pages

Java RMI

Java RMI

17 pages

Java RMI

Java RMI

17 pages

Java RMI

Java RMI

17 pages

Trace 1

Trace 1

46 pages

Final

Final

15 pages

Java RMI

Java RMI

13 pages

Testing

Testing

16 pages

Load more
Download Jini
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Jini and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Jini 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?