Just yesterday Jeroen and I finished up on a two part article that takes a look at locking optimizations in Java 6. As with any extensive undertaking there were a number of people involved in the creation of this piece of work. Cliff Click provided a number of hints and suggestions
Though locking optimizations did make a difference in our microbenchmark, it is difficult to say if they would make any difference in a real application. I applied several of the optimizations studied in the article on an real application that was suffering from serious lock contention and I have to say none of them made a measurable difference. But then given the nature of that particular application, I wasn't expecting (only hoping) for any improvements. Getting a microbenchmark to translate into something useful in the real world is just plain hard.
A bigger issue came up when we decided to use Google docs as a way of keeping different versions of the document in sync. Word, Open Office, what ever, they just weren't cutting it. WIth all the versions flying back and forth in part I I just put my hands up and said enough, Google docs. For part I it worked brilliantly. Part II was a different story.
Google docs work great when you are connected. That said, they are a pain when you are not. I had once annoyance and a scare. I'd grabbed the "master lock" by talking everyone and saying I'd be editing on a train/plane. However there was no way I could tell google docs that. It kept complaining (via a popup) that I wasn't connected and I risked losing everything. It was a risk I was willing to take given that I can't remember the last time my machine or my browser for that matter simply crashed. The popup seems to be a combinatino of time and number of characters you type in. It is worse than a Windows nag! But I managed to make pretty good progress until I tried to insert a graphic into the document.
If you are offline forget about inteserting graphics. Given my situation I didn't try hard to get it to work but it appears as though the only way it does work is to upload the picture to the google server, insert, reformat and then push it back down onto your machine. Somewhat reasonable if you are working online. Chances are you'd barely notice what had happened. Offline things hang until you hit the cancel button.
Now for the scare. Some where close to the end of my train ride the entire machine just locked up. It was like the Mach kernel (based on messaging) missed a key message and the machine just froze. There wasn't even the pin wheel of death.... nothing. It was depressing but I had been warned so there was no one to blame. After rebooting I decided not to restart Firefox until I was back online.
The nice thing about Firefox 3.0 is that it automatically saves your sessions so that when you restart after a unexpected exit, you can recover all of your sessions. I'm not sure if it is this feature that saved me or Google docs or a combination of both. All I can say I was quite pleasently surprised to find that my document came back to me in the same state it was in just prior to locking up.
With the day saved, I kept pounding away on the document offline safe with the knowlege that either FF or Google would save me should my machine ever hangup again. Or at least I hope they will.
I like and use Google Docs too. In my view Google Docs would work even
better if they would support "proper" simultaneous editing - that is: it is
easy to get your document out-of-sync due to simultaneous changes to the
shared doc.
Last month I gave a tech talk at Google on this very topic, with an Eclipse
instead of Google Docs focus though. The algorithm is abstract enough to
work on any type of text editing though
http://www.youtube.com/watch?v=GfeUCT-tRJQ