3 ms·
I feel like you could do this without a database using the Linux kernel inotify API. Every time a file is accessed trigger an increment. It’s too beautiful of a
by johnbellone 4y ago
I feel like you could do this without a database using the Linux kernel inotify API. Every time a file is accessed trigger an increment. It’s too beautiful of a day outside to try this right now but an interesting brain teaser!
- LorenDB 4y ago> It’s too beautiful of a day outside to try this right now That's what laptops are for!
- stronglikedan 4y agoIf you're just sitting outside, you may as well be inside.
- hammyhavoc 4y agoMy mood says otherwise.
- prmoustache 4y agoOnly if your laptop has some e-ink/e-paper tech screen really.
- hammyhavoc 4y agoSitting in the shade works for me, but yes, e-ink or STN works well (decades-old tech).
- SoftTalker 4y agoPretty sure Linux didn't have inotify then. Probably a CGI script updates a counter in a file.
- smashed 4y agoCan confirm, that's how it was done. A simple text file.
- yjftsjthsd-h 4y ago> Pretty sure Linux didn't have inotify then. Did FUSE exist yet? You could hack it up in userspace... (Have the HTML on a FUSE filesystem, and every time it gets a read it updates the HTML)
- dmd 4y agoFUSE's announcement: https://lwn.net/2001/1115/a/fuse.php3 https://lwn.net/2001/1115/a/fuse.php3
- Zach_the_Lizard 4y agoWhat about dnotify? I think that predated inotify. If so, I think it has the ability to notify a process when a file was accessed, so could fill a similar role.
- treeman79 4y agoWould be flying with all the bots trying to hack Wordpress bugs