qod has already written a paper on that (or is still completing it) see forums.