MacDevCenter    
 Published on MacDevCenter (http://www.macdevcenter.com/)
 See this if you're having trouble printing code examples


Collaborative Editing with Rendezvous

by Wei-Meng Lee, contributor to Mac OS X Unwired and author of Windows XP Unwired
12/02/2003

Rendezvous is an intriguing technology that simplifies certain networking tasks in Mac OS X. It allows you to connect to the network and use services offered by other devices on the network, all without any of the usual messy configurations (see the sidebar for an explanation of how Rendezvous works).

How Rendezvous Works

The first step toward understanding how Rendezvous works is to realize that every device, including your Mac or a printer, participating in a wired or wireless network must have an IP address. This IP address can be allocated from a DHCP server, or it can be self-assigned. When a device participates in a network without an IP address (due to the absence of DHCP or an explicit self-assignment), Rendezvous will automatically assign an IP address using local-link addressing. Basically, it randomly assigns an IP address from a predetermined range of addresses (set aside for local-link addressing by the Internet Assigned Numbers Authority, IANA) and assigns it to the device. The IP address range used by Rendezvous is 169.254/16.

The device then broadcasts a message to all other devices on the network to see if its IP address has already been used by another device. If it has already been used, Rendezvous reassigns another IP address and the same procedure repeats. If it has not already been used, the IP address is assigned and the device is ready to communicate with other devices on the network.

One of the innovative uses of Rendezvous is in the area of collaborative editing, which allows multiple users to edit a document simultaneously, collaborating through the network. In this article I will introduce two collaborative editing tools, SubEthaEdit and iStorm, and talk about their various features.

Collaborative Editing with SubEthaEdit

One of the challenges in working in a group is maintaining version control on the documents that are created. SubEthaEdit from The Coding Monkeys (formed by a group of three computer science students) redefines the meaning of collaborative work. Using SubEthaEdit multiple users can edit a single document at the same time. SubEthaEdit uses Rendezvous to discover other users who need to edit the same document.

You can download SubEthaEdit from http://www.codingmonkeys.de/. Once you have successfully installed SubEthaEdit, an icon will be placed on the Desktop.

Launch SubEthaEdit.

You can start editing your document at the text editing area. To share this document with someone using Rendezvous, click on the Share button (see Figure 1)


Figure 1. Sharing a document

SubEthaEdit will reveal the access control list showing the people who are currently editing this document (see Figure 2).


Figure 2. Viewing the access control list.

For other users who want to share the task of editing the document, they need to run SubEthaEdit as well. To see which document is being shared, click on the Rendezvous button (see Figure 3). Here it can be seen that Wei Meng Lee is editing a document called "Untitled.txt".


Figure 3. Viewing the list of users via Rendezvous

Double click on the document that you want to edit (see Figure 3), and your name would appear in the access control list of the document master (see Figure 4). The document master simple selects the user name and clicks on the check (to allow access) or cross icon (to deny access) buttons.


Figure 4. Granting (or denying) permissions to user using the access control list

By default text that every user types is highlighted with a pink background. To differentiate your text, go to SubEthaEdit - Preferences... and set your own color. You can now differentiate who typed what using the different background colors (see Figure 5).


Figure 5. Multiple users editing a document

Multiple people can now edit the same document simultaneously.

Editor's note: SubEthaEdit, formerly known as Hydra, was a first place winner in the second Mac OS X Innovators Contest. You can learn more about the application and its creators by reading this interview with one of the Coding Monkeys, Martin Pittenauer.

Brainstorming with iStorm

iStorm is a collaborative editing tool from Math Game House Software. It is similar to SubEthaEdit and is available for download at http://www.mathgamehouse.com/istorm/. The trial version allows users to collaborate for 20 minutes; pricing starts at $10 per user for the uncrippled version.

Once iStorm is downloaded and installed, you should see a familiar editing window with a few buttons at the top (see Figure 6). I have highlighted the significant ones:


Figure 6. The various buttons in the iStorm window

To share the document with other users, simply click the Host a document button (see Figure 7):


Figure 7. Editing and hosting a document

You will then be asked for some information such as the document name, your name, as well as your server information (you can just accept the defaults). To share the document, click Serve (see Figure 8). Your Mac will now be the hosting computer for this document.


Figure 8. Sharing the document

At the bottom of the screen you should see a green button (see Figure 9). The green button signifies that the document is available for editing. Since, at the moment, you are the only one editing the document, you have full control over the document.


Figure 9. Editing the document

Let's assume that another user is using iStorm on another Mac. To edit the shared document, the user would just need to click on the Connect to a shared document button. The documents available for edit would be shown (see Figure 10). By default, iStorm uses Rendezvous to locate other users on the local network. You can disable Rendezvous and manually enter the IP address and port number of the hosting computer. Select the document you want to use and click Connect.


Figure 10. Connecting to a shared document

Notice that once you start editing your document the button turns blue (see Figure 11), signaling that you have gained control of the editing rights of the document. Meantime, other users will see a red button, which means the document is currently modified by someone (see Figure 12). To release the editing right of the document so that others can edit it, click on the blue button and it changes to green (see Figure 13), which means the document is free to be edited by others.


Figure 11. Blue--document currently edited by yourself


Figure 12. Red--document edited by someone


Figure 13. Green - available for edits

One cool feature of iStorm is the shared chalkboard. To activate the shared chalkboard, click the Chalkboard button (see Figure 14). (I noticed that window has some problems with the layout of the various controls, so you may need to do some adjustments before you can see the screenshot shown in Figure 14.)


Figure 14. Using the shared chalkboard

Another cool feature is the video grabber, which allows you to use a video camera (see my previous article on how to use a webcam in Panther) to take snapshots of yourself. To take a snapshot of yourself, just drag and drop the Grab Video window (its content) onto your shared document. You can even use the snapshot as the background of your chalkboard (see Figure 15).


Figure 15. Taking a snap shot using the Video Grabber

Finally, you can also do the usual chatting stuff on iStorm (see Figure 16).


Figure 16. Chatting in iStorm

Final Thoughts

The nice thing about using a Mac is that you always have an abundance of innovative software to make your life easier and more pleasant too. SubEthaEdit and iStorm are two applications that I am going to use to collaborate with coworkers. So give them a try and let me know what you think.

Wei-Meng Lee (Microsoft MVP) http://weimenglee.blogspot.com is a technologist and founder of Developer Learning Solutions http://www.developerlearningsolutions.com, a technology company specializing in hands-on training on the latest Microsoft technologies.

Mac OS X Unwired

Related Reading

Mac OS X Unwired
A Guide for Home, Office, and the Road
By Tom Negrino, Dori Smith


Return to the Mac DevCenter

Copyright © 2009 O'Reilly Media, Inc.