Video only available with local Cacophony
Copy-On-Write
Posted by Jeff Disher
Copy-On-Write
I talk about copy-on-write data structures, most specifically within the context of file systems. The idea does extend to databases, more generally, and some of the themes can even be observed in content-addressed systems, such as IPFS.

The basic idea is that everything in a system which anyone can observe or read is always read-only. If you want to write something, you make your writes to a new copy of the data you are changing and, only when you are finished that write, you expose that new copy as the new, now read-only version.

While this fundamentally fixes problems such as file system or database corruption (a partial write breaking an existing file or corrupting an existing structure), it also has implications for things like online backups (since you can just snapshot a version of data and know that nobody will write to it), or de-duplication (common data may mean different things to different referrers but they are free to re-change their own copies after de-duplication).

This also has some interesting consequences when you consider how content-addressed data structures (such as IPFS) handle may not explicitly be "copy-on-write", but do always "change address on write" and implicitly de-duplicate data.

Somewhat unrelated, for anyone else having the constant white balance adjustment problem I was having, I found that "v4l2-ctl --set-ctrl=white_balance_temperature_auto=0" stopped that.