Kitsune: Efficient, General-Purpose Dynamic Software Updating for C [pdf]
cs.umd.edu
cs.umd.edu
Some research (a while ago) showed me that exec() on Linux call may be parameterized in order to prevent it to cover data segment (while I am not 100% sure), but then I think it exist only for Linux and is not portable.
The approach seems interesting, though, and it's cool to see them demonstrate that the performance impact is negligible (updates seem to apply very quickly based on their tests, too). Maybe there's a use case for this where the risk of mistakes causing failed updates/corruption is low?
Saved in my "in case I ever go back to hacking on Nethack" folder.
For most games I know of that do live updates, they just do it by booting up a new version of the server and 'switching' people over when they cross boundaries (most MMOs still have loading screens and server transitions, so it's not that hard). Client updates are certainly more difficult, but I'm not sure you'd ever do it - there's no way you're going to get NVIDIA or AMD to apply this technique to their video drivers, etc.
First, they tested their update methodology by applying it to a long history of released versions for each piece of software.
Second, although any code involving concurrency is tricky, I thought the line counts were actually quite low:
C LoC C delta xfgen LoC
vsftpd 12,202 113 101
redis 13,387 57 37
Tor 76,090 159 189
memcached 4,181 112 27
icecast 15,759 134 200
where C LoC is the original program length, C delta is the changes to the program, and xfgen LoC is extra specification stuff they had to write.Third, how is a broken online update any worse than a broken offline update? Is there a greater argument for data loss?