230 likes | 404 Views
JXTA versus Jini. Christopher Bladon Senior Java Architect Sun Java Centre, Sun Microsystems Z ürich, Sweden. My presentation, tall and proud:. Debian Linux Windows-Free No slide animations & transitions No marketing My brain. JXTA: no infrastructure & decentralised. Midlets. CICS.
E N D
JXTA versus Jini Christopher Bladon Senior Java Architect Sun Java Centre, Sun Microsystems Zürich, Sweden
My presentation, tall and proud: • Debian Linux • Windows-Free • No slide animations & transitions • No marketing • My brain
JXTA: no infrastructure & decentralised Midlets CICS .Nyet J2EE Required Infrastructure TPF Grid Jini/Rio Hello World Client/ Server JXTA Decentralisation
There is no “silver bullet” • Jini – simple services • Service facade for devices • Rio – quality of service • Delivering services on the network • JXTA – push services and data to client • Collaboration and document sharing • J2EE – load-balanced, components • Business processes
The more peers, the better • Moves data and services close to the user • Probabilistically better availability • More routing possibilities • Less configuration JXTA peers Performance J2EE clients Users
Peer-to-peer is cool! • No infrastructure • Interesting problems • Simpler and lighter nodes • Self-healing mentality • Dynamic structure • Promotes sharing • Reliability by redundancy • Collaborative development
JXTA Abstractions • Uniform Peer ID (addressing) • Peer-groups • Advertisements (peers, groups, content, services) • Resolver • Pipes
JXTA Aspects • Discover, Join, Query, Subscribe, Work • Colony of Bees (without a queen): • Replicate data – resilience • Replicate services – resilience & performance • Unmanaged fault-tolerance • Dynamic config and re-config • Groups - Virtual network (NAT & Firewalls)
Tons of cool stuff! • 100% p2p • No centralised servers or admin • Multilingual (prog. Language) • Security is built-in • Messages contain the route back • Through NAT and Firewalls • Peers authorise other peers • No polling, link-sensing, neighbour detection
JXTA Protocols • PDP – discover adverts on other peers • PVP – cache and forward discoveries • PRP – generic querying of peers • PIP – query peers for info & status • PEP – query peers for routing info • PMP – group membership • PBP – binding to pipes
Firewalls, NAT: no problem Intranet Network 1 Network 2 Peer A Peer Z Subnet Peer B Peer C NAT Firewall Peer D Internet
It's secure! • Every peer has its own root certificate • Public key certificate part of each Peer advertisement • TLS Endpoint Transport (point-to-point secure pipe) • Credential certificate embedded in every JXTA protocol messages. • Private Groups (membership policy)
Some not so cool stuff • Community's Anti-P2P mentality • Complex, low-level programming • No patterns • Mediocre documentation • Java ref-impl is not cooked fully • Security and Trust is not cooked fully • P2P model is probabilistic
Rio/Jini (rio.jini.org) • Dynamic service delivery • 90% opaque layer on Jini • RMI & Events • Jini Service Beans (JSBs) • Quality of Service Provisioning • Watches • Deployment – Operation Strings
Rio/Jini Components • Look-up Service • Transaction monitor (2-phase) • JavaSpaces • Webster • Cybernode • Provisioner • OpMon • Service Viewer
Cool stuff 'bout Rio/Jini • Simple component model + events • SpaceCommands • Flexible QoS – heterogeneous compute env • Great tools • Paradigm similar to J2EE – easier
Problems with Rio/Jini • Reliance on RMI • Somewhat complex infrastructure • Confusion: Jini versus J2EE • No security yet (next release)
Problems in the enterprise • Redundant Data – distributed & replicated • Bladon Theorem #1:the faster data changes, the less it can be redundant. • Centralised versus redundant services • Propagating and reloading changed classes • Transactions • Modelling Entities and Sessions
How would you implement: • Chat & Whiteboard • File (MP3) search and download • Auction • Car Chip upgrades • Pet Store
Conclusions • Rio's vision is independent of Jini – use any service platform incl. JXTA • Rio/Jini doesn't scramble your brain like JXTA • Rio/Jini and JXTA support collaborative development instead of isolated • Rio/Jini and JXTA are not just for devices – enterprise computing!!!!
Christopher Bladon Senior Java Architect Sun Java Centre, Sun Microsystems Züri, Schwyz