[architecture ] Everything is a channel
Created by: vitiral
I came across your project recently and have begun to think of the advancements that could be made to a modern kernel. I think much of the work of a modern kernel should be consolidating good ideas from other areas of computing.
On such idea is revising the "everything is a file" idea to "everything is a channel", specifically a typed ring buffer channel.
What are the benefits of channels at the kernel level?
- can be used to handle concurrency and locking, allowing for true asyncio - similar to how golang works with their goroutines + channels
- allow transmission of more complex datatypes than a simple bytestream
- can be more easily consumed by multiple threads
Combining the "everything is a url" with "everything is a channel" gives you even more power, as the url can specify the type. Perhaps the ONLY way to get a non-file-like channel should be through the url format (explicit is better than implicit)
Channels allow a more unified and extensible interface for both kernel -> kernel and kernel -> userspace communication, and it does so with better asyncio support (programs could elect to block until at least one of their channels are available, etc)
Anyway, I'm currently learning rust, so can't contribute much ATM, but wanted to leave this idea.