My clients have many programs that read and write files of a certain format. They do it by sending regular old system calls, so libraries like gio aren't (in the general case) involved. I would like store the data in a database instead of the files, although I can't change the programs that read and write the files. Instead, I need to store the data in a database while tricking the programs into thinking they are reading and writing files.
One potential solution would be to have some kind of pseudo-file, where all of the read, write and seek requests get re-directed to a program I could write, which could then synthesize the correct response via communication with the database. This task sounds vaguely like NFS, so maybe it's possible. What should I read about to get this working?