Devlog

These are my daily notes and internal conversations during development. They may be helpful to understand the larger context of decisions that were made, and how I learned and explored while building.

Devlog < 2023 < July < 9

| by date | | thread: cohost |

So my plan for the device management is to listen on asocket for incoming connections. One issue with this is that if you had multiple instances of the VM running, you couldn't use the same socket, and would need a dynamic way to manage the socket; both instances couldn't be listening on /var/cohost/devices.sock. This probably for the best because it breaks the abstraction of plugging a deviceinto a machine. I could be really silly and have a sort of "device bridge daemon" that lets you see which instances are running and connect devices to a specific instance... but that seems like a waste of time for now.

So for now, I can probably just assume that there is a single instace allowed to be running at a time. It will be reachable on /var/cohost/devices.sock and if a device can't connect it terminates. There will be a cohost specific protocol for requesting a connection over that socket, and then cohost will translate that to "hardware" messages. So what does the protocol need to send?

---

Spent a few hours getting Cohost to be able to launch a separate device instance, and communicate with a VM over a unix socket. It seems to mostly be working, and I like the fact that a devcice can be launched from the same Cohost CLI. There's still a lot to do on actually getting the devices to do the device things, but the baseline feels good, and simple.

| thread: cohost | | by date |