User Interfaces for Jini Services The Jini Pattern

  • Slides: 24
Download presentation
User Interfaces for Jini Services The Jini Pattern Language Workshop OOPSLA – 2000 Vrijendra

User Interfaces for Jini Services The Jini Pattern Language Workshop OOPSLA – 2000 Vrijendra Gokhale, Bernard Menezes K. R. School of Information Technology IIT Bombay

Pervasive Computing • Computing as a technology that hides, like paper • Devices around

Pervasive Computing • Computing as a technology that hides, like paper • Devices around us have increasing computational power • Future wireless networks are going to be increasingly dynamic 15 October 2000 User Interfaces for Jini Services 2

Context Aware Computing • Control: ability to control things around me • Data manipulation:

Context Aware Computing • Control: ability to control things around me • Data manipulation: ability to gather data from gadgets around me and process it • Customization: does the environment adapt to my needs? 15 October 2000 User Interfaces for Jini Services 3

The Jini Technology • A federating technology for services • Enables impromptu communities •

The Jini Technology • A federating technology for services • Enables impromptu communities • Supports service discovery based on attributes • Based on the Java Remote Method Invocation (RMI) 15 October 2000 User Interfaces for Jini Services 4

Key Jini Features • • • Discovery Lookup Leasing Remote Events Transactions 15 October

Key Jini Features • • • Discovery Lookup Leasing Remote Events Transactions 15 October 2000 Proxy publishing and lookup Soft State and automatic cleanup User Interfaces for Jini Services 5

A Jini Scenario Multicast request Lookup proxy • Service discovers a Jini Lookup 15

A Jini Scenario Multicast request Lookup proxy • Service discovers a Jini Lookup 15 October 2000 User Interfaces for Jini Services 6

A Jini Scenario Join Protocol • Service publishes a proxy at the lookup 15

A Jini Scenario Join Protocol • Service publishes a proxy at the lookup 15 October 2000 User Interfaces for Jini Services 7

A Jini Scenario Multicast request Lookup proxy • Client discovers a Jini Lookup 15

A Jini Scenario Multicast request Lookup proxy • Client discovers a Jini Lookup 15 October 2000 User Interfaces for Jini Services 8

A Jini Scenario Lookup Printer proxy • Client looks up the printer 15 October

A Jini Scenario Lookup Printer proxy • Client looks up the printer 15 October 2000 User Interfaces for Jini Services 9

A Jini Scenario print() • Client uses the print service of the printer 15

A Jini Scenario print() • Client uses the print service of the printer 15 October 2000 User Interfaces for Jini Services 10

The Lego Example! 15 October 2000 User Interfaces for Jini Services 11

The Lego Example! 15 October 2000 User Interfaces for Jini Services 11

A Hypothetical Situation “You enter a room which contains appliances like printers, cameras, music

A Hypothetical Situation “You enter a room which contains appliances like printers, cameras, music systems, microwave ovens… is it possible to control, compute or manipulate these gadgets without any prior knowledge of their existence? ” 15 October 2000 User Interfaces for Jini Services 12

Issues: A Hypothetical Situation • To programmatically talk to a Jini service the client

Issues: A Hypothetical Situation • To programmatically talk to a Jini service the client must have the service interface • Does the client carry ALL the interfaces it needs to talk to [impractical] • How to handle gizmos? Something the Martians left behind! (assuming it participates in a Jini federation) 15 October 2000 User Interfaces for Jini Services 13

Issues: A Hypothetical Situation • Can a common Jini interface allow service specific behaviour?

Issues: A Hypothetical Situation • Can a common Jini interface allow service specific behaviour? • Does the client have a JVM? 15 October 2000 User Interfaces for Jini Services 14

Solution: User Interfaces • All interactive services export UIs. • Programmatically such services are

Solution: User Interfaces • All interactive services export UIs. • Programmatically such services are known by a well known interface. public interface JUnknown{ public void get. Builder(String id); } 15 October 2000 User Interfaces for Jini Services 15

Using Patterns to Accommodate Varied Client Display Technologies • A Factory encapsulates client side

Using Patterns to Accommodate Varied Client Display Technologies • A Factory encapsulates client side UI capabilities public interface Factory{ public Object get. Object(Object which); } 15 October 2000 User Interfaces for Jini Services 16

Using Patterns to Accommodate Varied UI Construction Logic • A Builder encapsulates client UI

Using Patterns to Accommodate Varied UI Construction Logic • A Builder encapsulates client UI technology specific UI construction logic public interface Builder { public void build. UI (Factory factory); } 15 October 2000 User Interfaces for Jini Services 17

JUnknown ties it all customized UI construction for different client devices • the get.

JUnknown ties it all customized UI construction for different client devices • the get. Builder(String id)method of JUnknown dynamically loads the appropriate builder for the specified client factory type! • this uses underlying RMI class loading mechanisms 15 October 2000 User Interfaces for Jini Services 18

Interactions and code 15 October 2000 User Interfaces for Jini Services 19

Interactions and code 15 October 2000 User Interfaces for Jini Services 19

Interactions and code 15 October 2000 User Interfaces for Jini Services 20

Interactions and code 15 October 2000 User Interfaces for Jini Services 20

Advantages • Dynamically builders can be loaded for various factory types • Support for

Advantages • Dynamically builders can be loaded for various factory types • Support for different display technologies • Stub is lightweight and does not carry any extra UI classes 15 October 2000 User Interfaces for Jini Services 21

More Advantages • Adding support for new UI tech by simply adding new builders

More Advantages • Adding support for new UI tech by simply adding new builders at service end • Support for Non JVM clients viz web clients – Using an intermediate tier viz Servlets – Involves an HTMLFactory and HTMLBuilder 15 October 2000 User Interfaces for Jini Services 22

Future Work • Identifying and refining the UI patterns • Security in Jini –

Future Work • Identifying and refining the UI patterns • Security in Jini – Who can access services? Authentication – Who can invoke what service? Authorization 15 October 2000 User Interfaces for Jini Services 23

Thank You! 15 October 2000 User Interfaces for Jini Services 24

Thank You! 15 October 2000 User Interfaces for Jini Services 24