jini design and principles ranjita bhagwan cse225: high-performance distributed computing
TRANSCRIPT
![Page 1: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/1.jpg)
JINI Design and Principles
Ranjita Bhagwan
CSE225: High-Performance Distributed Computing
![Page 2: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/2.jpg)
What is Jini?
• A distributed computing environment for Network Plug and Play.
• A system to provide services easily and transparently over the network.
• A system that can be “dynamic” - users and resources can come and go as they please with minimal administrative overhead.
![Page 3: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/3.jpg)
Jini’s goals
• Provide shared service and resources.• Provide easy access to resources in spite of
changing network location of users.• Simplifying system and network
management.• Not yet a platform for a parallel programming
environment – more of a “plug and play” mechanism than a metacomputing infrastructure.
![Page 4: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/4.jpg)
Jini Architecture
Infrastructure Programming Model
Services
Base Java
Java VM JAVA APIs JNDI
RMI JavaBeans Enterprise Beans
Java Security … …
Java + Jini Discovery/Join Leasing Printing
LookupTransactions Transaction
Manager
Distributed Security
Events …
![Page 5: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/5.jpg)
Jini Components
• Service – an entity used by a person, program or another service.
• Service Locator/Lookup Service – keeps track of services and their properties and provides the Lookup Service.
• Client – uses the services.
ClientServiceLocator
Service
![Page 6: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/6.jpg)
Service
• An object (or set of objects) located in a server which can be used by a user, program or another service.
• An application can be viewed as a collection of services – different from regular object-oriented view.
• More localized notion than Globus service, which can be distributed over a number of hosts.
![Page 7: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/7.jpg)
Small Example
SmartViewergetMIMEType()
FileClassifier
display()
DisplayService
display()
ImageDisplay TextDisplay
display()
![Page 8: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/8.jpg)
Example
FileClassifierProxy
ImageDisplayProxy
TextDisplayProxy
Service locator
SmartViewer
FileClassifierProxy
ImageDisplayProxy
FileClassifierService
TextDisplayService
ImageDisplayService
Service
Service
Service
User
![Page 9: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/9.jpg)
Lookup Service
• Service is added to the Lookup Service by a pair of protocols– Discovery: Service locates the lookup service.– Join: Service joins the lookup service.
• Server “discovers” the service locator– Unicast TCP if location of service locator is known.– Multicast UDP if location of service locator is not
known.
• May include other Lookup Services for hierarchical lookup.
Discovery/Join & Lookup
![Page 10: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/10.jpg)
Service Registration
Service Locator Service Server
service
registrarservice
Object Serialization is used to move the service object to the Service Locator.
Discovery/Join & Lookup
![Page 11: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/11.jpg)
Client Lookup
Client Service Locator
serviceregistrarregistrar
service
Object Deserialization is used at the client torecreate the object.
Discovery/Join & Lookup
![Page 12: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/12.jpg)
Entries and Groups
• Entries: A service may specify certain properties.– For a plain text editor, entries = {(“plain/text”)}– A client may specify the properties it requires of the
service.– A matching of all specified entry fields is performed
with the services on the service locator. – Relational operators (>,<, etc) not supported!– Serialized entries are compared.
• Groups: A service can specify which groups it belongs to. – Groups = {“CSE, UCSD”, “ECE, UCSD”)
Discovery/Join & Lookup
![Page 13: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/13.jpg)
Service Proxies• Toaster, Printer, etc. cannot
perform their services remotely.• So, service sends out a “proxy”.• The proxy communicates with
the service.• The proxy is told its server’s
location when it is created.
ClientServiceLocator Service
Service Proxy
Registrar
Service Proxy
Registrar
Service
Discovery/Join & Lookup
![Page 14: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/14.jpg)
Jini Architecture
Infrastructure Programming Model
Services
Base Java
Java VM JAVA APIs JNDI
RMI JavaBeans Enterprise Beans
Java Security … …
Java + Jini Discovery/Join Leasing Printing
LookupTransactions Transaction
Manager
Distributed Security
Events …
![Page 15: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/15.jpg)
Leasing: request and grant
• The service requests that its copy be kept on the service locator for a given amount of time.– ANY: service locator determines lease time.– FOREVER: request for a lease that never expires.
• The service locator grants the lease and specifies how long it stays valid.– Default for SUN = 5 seconds.
Leasing
![Page 16: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/16.jpg)
Leasing: Expiry
• “Quiet” expiration: no notification from the service locator to the service.
• The service has to renew the lease before it expires.– Problem: high network latency may cause
lease to expire before it is renewed.
• The Lease Renewal Manager quietly renews leases at regular intervals.
Leasing
![Page 17: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/17.jpg)
Jini Architecture
Infrastructure Programming Model
Services
Base Java
Java VM JAVA APIs JNDI
RMI JavaBeans Enterprise Beans
Java Security … …
Java + Jini Discovery/Join Leasing Printing
LookupTransactions Transaction
Manager
Distributed Security
Events …
![Page 18: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/18.jpg)
Security
• Based on JDK 1.2 security model.
• Uses a text based policy file to set security policy.
• If an all permissive policy is used, a malicious service, masquerading as a requested service may run on the client.
Security
![Page 19: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/19.jpg)
JDK 1.2 Security
• Grant permission only for certain activities, such as access to certain files for reading, writing and execution.
• Grant access only to particular hosts, subdomains or domains.
• Require digital signatures attached to code.
Security
![Page 20: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/20.jpg)
Security problems for a client
service locator
http server
service proxyinstance data
proxy class files
Security
client
![Page 21: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/21.jpg)
A Policy that restricts attacks
Grant permissions to Application code based on the codesource. If you suspect these might be tampered with, get them signed.
Security
![Page 22: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/22.jpg)
A Policy that restricts attacks
Grant permission to Jini core classes based on the codesource. These may be signed if need be.
Security
![Page 23: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/23.jpg)
A Policy that restricts attacks
Grant permission to downloaded code only if it is signed by an authority you trust. Even then, grant only the minimum permission that is needed to perform the service’s task.
Security
![Page 24: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/24.jpg)
Security challenges
• security should be strong but easily managed so that the ease of use of Jini does not disappear.
• In ad-hoc networks, when services may not have a fixed identity, how do you decide who is “trusted” and who is not?
Security
![Page 25: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/25.jpg)
Jini Architecture
Infrastructure Programming Model
Services
Base Java
Java VM JAVA APIs JNDI
RMI JavaBeans Enterprise Beans
Java Security … …
Java + Jini Discovery/Join Leasing Printing
LookupTransactions Transaction
Manager
Distributed Security
Events …
![Page 26: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/26.jpg)
Transactions
• A series of operations within a single service or involving multiple services.
• ACID properties– Atomicity– Consistency– Isolation– Durability
• Jini uses the two-phase commit method.
Transactions
![Page 27: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/27.jpg)
Two-phase commit
• Mechanism– All participants in a transaction “vote” on it. – If all agree to go ahead, transaction
commits.– If any of them abort during the voting
stage, the transaction aborts on all participants.
• Jini supplies the mechanism, but policies are left to the participants.
Transactions
![Page 28: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/28.jpg)
An example
client service accounts txnmanager
get cost
Transactions
![Page 29: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/29.jpg)
An example
client service accounts txnmanager
cost
Transactions
![Page 30: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/30.jpg)
An example
client service accounts txnmanager
create
Transactions
![Page 31: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/31.jpg)
An example
client service accounts txnmanager
txn
Transactions
![Page 32: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/32.jpg)
An example
client service accounts txnmanager
credit
txn
Transactions
![Page 33: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/33.jpg)
An example
client service accounts txnmanager
credit debit
txn
Transactions
![Page 34: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/34.jpg)
An example
client service accounts txnmanager
join
txn
Transactions
![Page 35: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/35.jpg)
An example
client service accounts txnmanager
join
txn
Transactions
![Page 36: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/36.jpg)
An example
client service accounts txnmanager
txn
request service
Transactions
![Page 37: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/37.jpg)
An example
client service accounts txnmanager
txn
result
Transactions
![Page 38: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/38.jpg)
An example
client service accounts txnmanager
txn
commit
Transactions
![Page 39: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/39.jpg)
An example
client service accounts txnmanager
txn
prepare
Transactions
![Page 40: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/40.jpg)
An example
client service accounts txnmanager
txn
commit
Transactions
![Page 41: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/41.jpg)
An example
client service accounts txnmanager
txn
commit
Transactions
![Page 42: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/42.jpg)
Related Technologies
• HAVi
• JetSend by Hewlett-Packard
• Bluetooth
• Inferno by Lucent
• Universal Plug and Play
![Page 43: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/43.jpg)
“Sun officials this morning said Universal Plug and Play is behind Jini in development terms, and criticized it for being "PC-centric" and thus tied to the Microsoft operating system. Microsoft has countered that for Jini to work, thousands of applications will have to be rewritten in Java and Jini code.”
JINI v/s UPnP
![Page 44: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/44.jpg)
Non-technical Issues
• July 1998: Jini was introduced.– “Jini products will be out by mid 1999.”
• Jan 1999: Around 30 partners to the Jini technology were announced.– “Jini products will be out by late1999.”
• Are they out yet?
![Page 45: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/45.jpg)
Jini Products
• It is claimed that e-commerce and web-based applications are overshadowing Jini product development.
• Jini product prototypes are being developed by a number of companies – HP, 3Com, Cisco, Sony, Nokia, etc.
![Page 46: JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing](https://reader035.vdocuments.us/reader035/viewer/2022070403/56649f2e5503460f94c48597/html5/thumbnails/46.jpg)
Concerns• Security!!!• Common interface development
– All printers should ideally use the same interface.
• Does not as yet support XML, which UPnP does(will do).• Needs JAVA VM to run on every device to avoid large
delays: this means large memory requirements.– Possible solution: Dallas semiconductors’ JAVA VM on a chip.
• Needs all applications to be coded in Java.– All manufacturers have to accept Java as their programming
language.• Scalability issues