My other response to William...
Endpoints were an attempt to solve two problems, and I'm still not all that happy with them.
The first is that things like the space bank implement a lot of objects. The earlier generations relied on red segments to pass what amounted to a user-level object ID. Red segments had way too many things going on, but when they went away we needed something to take up that functionality.
The second is that the start key path and the resume key path had some essential differences that were required by the way "at most once" was specified. This led to a bunch of complications in the IPC path that made the assembly version kind of unpleasant. With the addition of the payload match mechanism, endpoints and their entry capabilities offered a way to regularize and simplify a bunch of that.
What ended up happening is that the case where you don't have a red segment more or less went away, but endpoint objects provided a smaller replacement for red segments that wasn't trying to serve way too many masters and had a simpler execution path.
The current version suffers from the fact that the allocation count is only 20 bits, which means that it will overflow if used for at-most-once resume key behavior. With the conclusion that we can reduce the OID size a bit, I think that's mostly resolved. But for extreme cases there is going to need to be a protocol for replacing endpoints every 2^30 calls or so
Very early on, I had the idea that endpoints would end up being a mutual rendezvous object. The idea was to support multiple listeners and the caller didn't know which listener would actually receive the message. There are two problems with this idea:
- As with something like NGINX, it's helpful to talk to the same receiver once you establish a connection. There's enough context going on that you want something like a session, which KeyKOS doesn't have.
- The capabilities end up pointing in the wrong direction, with the effect that the list of running processes becomes too large to manage. In effect, nobody ever enters a receiving state.
Unfortunately, I don't see endpoints going away. If they did, we'd have to re-invent resume capabilities and red segments. Endpoints are actually simpler.
Jonathan