Overview LindaTuple Space JINI Java Spaces Sun Microsystems




























- Slides: 28
Overview • • • Linda/Tuple. Space JINI Java. Spaces (Sun Microsystems) TSpaces (IBM) TSpaces vs. Java. Spaces Future direction
Linda and Tuplespace • • Parallel coordination language Virtual shared memory system on heterogeneous networks Associative address through efficient hashing Simple language primitives allow minimal code rewriting – Tuple = basic element, list of literals and vars – In(), Out() moves “tuples” to/from Tuple. Space – Eval() spawns processes in Tuplespace – Rd() does non-destructive reads in Tuple. Space
Benefits of Linda • • Portability (supports heterogeneous network) Scalability Dynamic load balancing Anonymous and asynchronous communication Associative addressing / pattern matching Data persistence independent of creator Simple API --> less and easier coding Ease of code transformation
Linda Limitation (1) • High system overhead - no leasing • Designed as a parallel computing model, primarily for LAN – lack of security model – lack of transactional semantics • Language specific implementation • Blocking calls, but no notification mechanism
Linda Limitation (2) • Dynamic Locate the Service? • Simple type semantics • Operator is insufficient
JINI • Realization of a distributed computing environment • Allow services (hardware and software) being amended using a simple “plug and play” model • Provide distributed infrastructure like CORBA, DCOM • Services includes Transaction Manager, Java. Spaces, Security, Leasing, user implemented services, and etc.
JINI Architecture
JINI Components • Service - independent functionality made available to the other users remotely • Client - a device or software component that would like to use a service • Lookup Service - acts as a broker between the needs of the client and the services it knows about the network
JINI Principles • • Services proxies carry the code needed to uses services A “Lookup Service” lets your find access services Discovery is used to find proxies for the lookup service Event-driven Lookup. Discovery. Manager - discovered(), discarded() defined in interface Discovery. Listener • Service Template is used to locate the Service Proxies
JINI Flow Diagram
JINI Transaction • Transaction (two-phase commit protocol) • ACID is jointly implemented by various processes taking part in a transaction • Transaction manager will hand out a lease for newly created transaction • Nested transactions allowed
JINI: Caching & Replication, fault Tolerance, and security • Caching & replication are left to applications • Jini expects that components which use Jini as basis implement own fault-tolerance measures • Security Ø Relies on the security provided by Java RMI Ø JAAS: Java Authentication and Authorization Service
Java. Spaces (Sun Microsystems) • Lightweight infrastructure for network applications • Distributed functionality implemented through RMI • Entries written to/from Java. Space with “write, read. If. Exists, take. If. Exists, snapshot” • “notify” notifies client of incoming entries within timeout • Pattern Matching done to templates with class type comparisons, no comparison of literals. • Transaction mechanism with a two phase commit model • Entries are written with a “lease”, so limited persistence with time-outs
Key Features • All entry fields are strongly typed for matching • Matches can return subtypes of templates types • Entries are “leased”; persistence is subject on renewal in order to reduce garbage after failures • Support transient and persistent Java. Spaces • Multiple Java. Spaces cooperate, and transaction span multiple spaces. Partitions provide minimal protection • “Eval” functionality Is not supported, in order to reduce complexity and overhead • Transaction model preserves ACID properties
Java. Spaces Organization
Java. Spaces Communication
Java. Space Limitation • Simplicity of or lack of security model • Transactions required for reliable entry reads • Java RMI = performance bottleneck? • High overhead from repetitious object serialization
TSpaces (IBM) • A set of network communication buffers that work primarily as a global lightweight database system or data repository • Operators include blocking and non-blocking versions of read and take, write, set operations scan and count, and synchronization operator. • Interfaces with data management layer to provide persistent storage and data indexing and query. • Dynamically modifiable behavior
Key Features • • • Database indexing and arbitrary “match, index, and, or” queries Transaction layer for data consistency Matching available on simple types New operators can be downloaded to TSpace and used immediately User and group permissions can be set on a Tuplespace and operator basis • Event register informs client of events • HTTP server interface for debugging and maintenance purpose • Support for large objects through URL reference
TSpaces vs. Java. Spaces • Simple types and objects as tuple fields • No replication, 1 server per TSpace • Access Control Lists on users and groups • Event Register invoked on all events • Database indexing and range queries • Downloadable operators • Only serializable objects allowed • Severs can be replicated across nodes • Protective partitioning using multiple Java. Spaces • Notify() is only invoked for committed writes
Messaging and Queuing System • IBM MQSeries • Sonic MQ • Microsoft Message Queue Server (MSMQ)
What is JMS? • A common Java API for creating, sending, receiving and reading messages • Enables communication that is Loosely couples • Reliable • Asynchronous • Designed by Sun and partners
JMS functionality • Messaging Models – Point to Point – Publish / Subscribe • Message Delivery – Synchronous or Asynchronous – Reliability provided by acks • Message selector • Transactions
Point to Point Client One Sends QUEUE Consumes Client Two Ack
Publish / Subscriber SSL Smart. Sockets Cloud Multicast Publisher TCP Subscriber TCP Subscriber
Message Types • • • Text Message Object Message Byte Message Stream Message Map Message
Message Selector • Specify messages by message header and/or message properties • Can not reference message body values • Syntax is based on a subset of SQL 92
• Web Services • Follow my presentation in Java. One conference