It might be hard to integrate, but it would be a killer feature that no other wiki offers.
Perhaps you could use ShareDB: https://github.com/share/sharedb