{"id":16561527,"url":"https://github.com/jcnelson/eventfs","last_synced_at":"2025-10-28T23:30:37.708Z","repository":{"id":32713992,"uuid":"36303627","full_name":"jcnelson/eventfs","owner":"jcnelson","description":"Filesystem where directories organize files into deques and share fate with their creator processes.","archived":false,"fork":false,"pushed_at":"2016-04-15T03:28:22.000Z","size":73,"stargazers_count":15,"open_issues_count":2,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-01T19:03:06.017Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcnelson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.GPLv3+","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-26T15:02:55.000Z","updated_at":"2024-06-15T13:51:14.000Z","dependencies_parsed_at":"2022-09-11T10:00:57.897Z","dependency_job_id":null,"html_url":"https://github.com/jcnelson/eventfs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcnelson%2Feventfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcnelson%2Feventfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcnelson%2Feventfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcnelson%2Feventfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcnelson","download_url":"https://codeload.github.com/jcnelson/eventfs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238737855,"owners_count":19522263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T20:33:27.676Z","updated_at":"2025-10-28T23:30:37.307Z","avatar_url":"https://github.com/jcnelson.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"eventfs\n=======\n\nEventfs is a specialized userspace filesystem where each directory serves as process-owned message queue.  Its semantics differ from POSIX in the following ways:\n\n* Every non-empty directory has a `head` and `tail` symlink.\n  * The `head` symlink always points to the *oldest* file in the directory.\n  * The `tail` symlink always points to the *newest* file in the directory.\n* Unlinking `head` does not remove the `head` symlink, but instead unlinks the file pointed to by `head`.  Similarly, unlinking `tail` unlinks the file that `tail` points to.\n  * `head` is atomically retargeted to the next-oldest file.\n  * `tail` is atomically retargeted to the next-newest file.\n* By default, each directory shares fate with the process that created it.  If the creator process dies, the directory and its contents cease to exist.\n  * If the directory has the `user.eventfs_sticky` extended attribute set, the directory persists until explicitly removed.\n* There are no nested directories.\n* There is (currently) no `rename(2)`.\n\nSample Use-Cases\n----------------\nThe motivation behind eventfs is to provide an efficient but accessible userspace IPC system that is portable across multiple *nix.  It implements reliable message multicasting while avoiding excessive copying, and offers access controls, quotas, channel-sharing, and readiness notification through familiar filesystem semantics.\n\nIt is currently used to:\n* Give [libudev-compat](https://github.com/jcnelson/vdev) clients a way to receive device events while guaranteeing that they do not leave behind any residual state once they exit.\n* Provide namespaceable event channels for sending messages between containers.\n\nExample\n-------\n\nHere is a sample execution trace, where a Python script creates a directory called `demo` and goes to sleep.  Other processes create files in `demo`, and eventfs ensures that the directory's `head` and `tail` symlinks always point to the oldest and newest files.  Once the `demo` directory is empty, the `head` and `tail` symlinks vanish.  Once the Python script exits, the `demo` directory vanishes.\n\n```\n$ cat ./demo.py\n#!/usr/bin/env python\n\nimport os\nimport time \nimport sys\n\nos.mkdir( sys.argv[1] )\ntime.sleep(10000)\n\n$ mkdir events \n$ ./eventfs events\n$ ls -l events\ntotal 0\n$ ./demo.py events/demo \u0026\n[1] 4014\n$ ls -l events/demo\ntotal 0\n$ echo \"message text\" \u003e events/demo/msg\n$ ls -l events/demo \ntotal 0\nlrwxrwxrwx 1 root root  3 Sep  4 12:11 head -\u003e msg\n-rw-r--r-- 1 jude jude 26 Sep  4 12:11 msg\nlrwxrwxrwx 1 root root  3 Sep  4 12:11 tail -\u003e msg\n$ echo \"message text 2\" \u003e events/demo/msg2\n$ ls -l events/demo\ntotal 0\nlrwxrwxrwx 1 root root  3 Sep  4 12:11 head -\u003e msg\n-rw-r--r-- 1 jude jude 30 Sep  4 12:12 msg\n-rw-r--r-- 1 jude jude 30 Sep  4 12:12 msg2\nlrwxrwxrwx 1 root root  4 Sep  4 12:11 tail -\u003e msg2\n$ rm events/demo/head\n$ ls -l events/demo \ntotal 0\nlrwxrwxrwx 1 root root  4 Sep  4 12:14 head -\u003e msg2\n-rw-r--r-- 1 jude jude 30 Sep  4 12:12 msg2\nlrwxrwxrwx 1 root root  4 Sep  4 12:11 tail -\u003e msg2\n$ rm events/demo/tail\n$ ls -l events/demo\ntotal 0\n$ fg\n./demo.py tmp/events\n^CTraceback (most recent call last):\n  File \"./demo.py\", line 8, in \u003cmodule\u003e\n    time.sleep(10000)\nKeyboardInterrupt\n$ ls -l events\ntotal 0\n$ fusermount -u events\n```\n\nDependencies\n------------\n* [fskit](https://github.com/jcnelson/fskit)\n* [libpstat](https://github.com/jcnelson/libpstat)\n\nBuilding\n---------\n\nTo build:\n\n        $ make\n\nInstalling\n----------\n\nTo install:\n\n        $ sudo make install\n\nBy default, eventfs will be installed to `/usr/local/bin`.  You may set `PREFIX` to control the installation directory, and `DESTDIR` to set an alternate installation root.\n\nRunning\n-------\n\nTo run:\n\n        $ ./eventfs [-c /path/to/config/file] /path/to/mountpoint\n\nIt takes FUSE arguments like -f for \"foreground\", etc.  See `fuse(8).`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcnelson%2Feventfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcnelson%2Feventfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcnelson%2Feventfs/lists"}