Download Administrivia - Programming Language Technology Paradigms - Notes | CMSC 433 and more Study notes Programming Languages in PDF only on Docsity! CMSC 433, Alan Sussman, U. Maryland (via Bill Pugh) 1 CMSC433, Spring 2001 Programming Language Technology and Paradigms Jini Alan Sussman November 6, 2001 CMCS 433, Fall 2001 - Alan Sussman 2 Administrivia • Read Chapter 15, pages 1003-1009, on Jini • Project 4 - due tomorrow at 6PM • 2nd midterm next Thursday, Nov. 15 – practice exam posted by tomorrow • Project 5 description by Thursday • Office hours tomorrow moved to 10-11 CMCS 433, Fall 2001 - Alan Sussman 3 Last time • Distributed computing issues – uniform view of local vs. remote objects doesn’t work – need to modify interfaces, not just implementations • partial failures • true concurrency • latency • Basic CORBA – language-independent RPC – standard set of software services • ORB, IDL, naming service CMCS 433, Fall 2001 - Alan Sussman 4 Jini overview • Framework and services on top of Java RMI • Finding services – finding registries (discovery) – putting entries into registries (join) – searching registries (lookup) – keeping registries up to date • Transactions • JavaSpaces – Shared persistent store CMCS 433, Fall 2001 - Alan Sussman 5 Providing Services Lookup Service Printer Service Proxy (service item) Printer Interface registration CMCS 433, Fall 2001 - Alan Sussman 6 Finding providers Lookup Service Printer Service Printer Proxy Printer Client Printer Interface (service template) Printer Proxy CMSC 433, Alan Sussman, U. Maryland (via Bill Pugh) 2 CMCS 433, Fall 2001 - Alan Sussman 7 Using Services Lookup Service Printer Service Printer Proxy Printer Client Printer Proxy CMCS 433, Fall 2001 - Alan Sussman 8 Proxies • Java classes that implement standard interfaces • Classes get downloaded as needed – From http server? • Proxies can use any mechanism to communicate with actual service – RMI stubs, local computation and any communication medium (e.g., sockets) CMCS 433, Fall 2001 - Alan Sussman 9 Lego Mindstorm Proxies • An example: Proxies for Lego Mindstorm robots • Processor on Mindstorm not powerful enough to host a JVM • Proxy can keep state about robot, communicate through infrared link CMCS 433, Fall 2001 - Alan Sussman 10 Lookup services • Broadcast looking for lookup services messages • Each lookup service on network responds with a proxy • Queries to lookup service are done through proxy – actual communication with lookup service is up to proxy CMCS 433, Fall 2001 - Alan Sussman 11 Using 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 attributes CMCS 433, Fall 2001 - Alan Sussman 12 Service ID’s • When services first register, they are assigned a service ID – 128 GUID • a particular service gets the same service ID on all lookup services – if you get the same service back from multiple lookup services, can detect duplicates