330 likes | 449 Views
This outline presents an overview of the development process for collaborative tools utilizing distributed systems technology. It covers semester applications, technologies employed (such as Sockets, RMI, Jini, and JavaSpaces), and concludes with comparisons of implementations. Specific projects, including a text editor and a whiteboard application, are discussed. Key design decisions are addressed, particularly concerning synchronization and object management in real-time collaborative environments. Challenges faced during implementation, including handling multiple clients and maintaining efficient communication, are analyzed, providing insight into the future of collaborative tool development.
E N D
Development of Collaborative Tools Using Distributed Systems Technology
Talk Outline • Welcome • Overview of semester • Applications built • Technologies used • Comparisons • Conclusion
Background Information/Research of possible technologies • Sockets • RMI • Jini • JavaSpaces
Project Overview • Text Editor • Basic application working • Implemented shared/distributed version • Added additional features • Whiteboard • Shared application from beginning • Added additional features
Initial Prototype • Text Editor • First Step of Jini Design model Stand-Alone Jini JavaSpaces
Our Implementation • Abstract Windowing Tool Kit • Part of the core classes of the Java 2 platform • The Java TextArea • Def: A multi-line region that displays text • Supports creating, opening and saving • But... • High level structure • No access to direct strings
Implementation Problems • What happens when more than one user wishes to write in the same location? • Should we put a locking mechanism on individual lines, on paragraphs, on pages, etc... • Cursor control • Where does the cursor come from? • Should we use the systems cursor? • Should we provide an application cursor?
What is a Whiteboard? • An infinite space on which users can post other objects • An application of Distributed Collaborative Productivity • Uses “Objects” • greater flexibility / scalability • New application of a previous concept
Remote Method Invocation (RMI) • Server binds to RMI name registry • Clients look up the server on the registry • Method calls on server like other objects • Constraints - exception handling, parameter passing • Java implementation of RPC concept
Why RMI? • Mature - relatively bug-free • Well-documented • Flexible - inherently supports multiple clients • Easy to use - more abstract than sockets • Parameter passing constraints can be overcome using “wrapper” objects
The RMI Whiteboard • “Whiteboard” - Java class maintains collection of displayable “WbObjects” • Clients hold local subsets of the collection • Clients Add(), Remove() objects • Client handles interface and display of objects • Objects have unique IDs to avoid duplicates
WbClient Local Collection Add/Remove Global Object collection Display WbClient Local Collection Whiteboard Add/Remove Display
Synchronization • “Database triggers” approach • Whiteboard has information about whether each client needs updating • Info changes when objects added/removed • Client loops constantly, checking for update • If so, gets the new objects from Whiteboard for display purposes
Why this Design Approach? • Local collections • Bandwidth is not wasted sending duplicate objects • Allows independent views of global objects • Efficient Synchronization - Doughnut Shop Theory • High-level abstraction - easy to understand • Straightforward to implement
The Second Prototype • Whiteboard: Needed a new design • The first step to the Jini approach (again) • Another Stand-Alone model • designed with some knowledge of Jini Stand-Alone Jini JavaSpaces
Design Decisions • Working from past experiences • AWT • MouseListeners and KeyListeners • Functionality: • Lines, Rectangles, Ovals, Text and Printing • Keep everything on the Whiteboard
The Object Class • One class to hold all objects • Contains information regarding the type, the string, x-coordinates and y-coordinates • One array contains all of the whiteboard data
The “Jini Vision” • Network-centric Vs Disk-centric model • Embedded systems, plug n play networking • Dynamic Network required for future vision (connection-based technology) • Federation of Services concept • Raise level of abstraction for distributed systems programming
How Jini Works • Devices talk to each other via Java Interfaces (not traditional net protocols) • Jini clients request services via Java Interfaces and Jini Services return code • Services: make themselves available when they join the network • Clients: locate and contact Jini services
Jini Concepts • Normal Programming • Device Drivers and Files • Function and Method Calls • Jini Programming • User Interface (Frame) • Registering A Service (Server) • Finding and Using A Service (Client) • Programming Difficulties
The Jini Server • Security Manager • Attributes Array • JoinManager • Reggie • How many services are available?
The Jini Client • Security Manager • Lookup Locator • Searching for the Service • Call the program method • Note: Each client gets a separate instance of the service
Difficulties • How does Jini work? • Coding the server and client • Setting Up the Environment • Distributed System? • Javaspaces or RMI • Running the Server and Clients • Steep programming curve = “Users and little things”
The Jini Vision of the Future • Bill Joy on Cell Phones and Microphones • “Once you have lots of different kinds of devices combining in different ways, you can’t do monolithic software anymore. Each of these devices has a certain set of functions, and if we have to assume when we build them what they’re going to be used for, it’s not very [flexible].”
JavaSpaces Introduction • New Jini service based on Linda • Very simple implementation: API consists of only a handful of methods • Handles details of concurrent access • Goal: Reduce time/effort to design and implement sophisticated network apps
JavaSpaces Model • No message passing between processes; JavaSpaces use shared memory (space)!
Operations on JavaSpaces • Write, take, read (copy) objects to space • Template object used for associative matching during take, read operations • TakeIfExists and ReadIfExists • Notify - notifies when new entries are added (using Jini’s distributed event model) • Persistence and lease times
Using JavaSpaces • A space holds entries (objects must implement Java’s Entry interface) • Write entry and JavaSpaces app classes • Start a JavaSpaces server (Jini environment) • Compile and Run the code as a client
Implementations • Difficulties: technology still maturing, few examples and little documentation • Problems “listening” for new entries and synchronizing multiple clients • Examples: Chat system and Whiteboard systems developed
Chat and Whiteboard Examples • Exchanges user messages or whiteboard objects as entries in the space • distributed counter for synchronization Clients Reading 1. Read current msg number from status entry 2. Constantly monitor space waiting for next msg to appear 3. When it does, read a copy and update chat display JavaSpace a status/counter b messages Writing 1. Take status entry and increment msg counter 2. Create a new msg with msg number and write it to the space 3. Replace the updated status entry c
Jini/JavaSpaces approach • Future vision should provide easier use • Possible plug n play networking in the future • Young, evolving technology • Not much documentation • Few examples
RMI approach • Mature technology • Well documented • Easy to use • Re-inventing the wheel
Conclusions • Research and use of new technologies • Successful implementations • Basis for future work