Jezze wrote:
The first part sounds very much like what a normal device driver interface would look like and the rest sounds very similar to Plan9 and it's 9P protocol except it uses objects instead of files. It sounds pretty solid in theory but there might be a bunch of problems that show up because it requires a lot of implementation work before you can really show it works and therefor it is very hard at this stage to argue the benefits.
Yeah, I wish that the merits of the idea would speak for themselves, but instead, we got COM and CORBA, which are barely used today except on legacy codebases.
Quote:
You could say that files are pretty good at representing resources and they can in fact represent every type of resource in a system but they are certainly not the most efficiant way to do it in most cases. What all resources have in common is that you want to able to read and write data from them which files can handle perfectly well. Then its up to the implementer of a resource to decide what granularity they want. Should a file represent a structure of data or a single value or something inbetween. This is where files have no clear set of rules while with objects you don't really need to think about it.
Indeed, that's one of the reasons I'm using objects rather than files. The main problem with files is that there's no formally defined "contract" required to access them.
Quote:
The reason why files are used and not objects is that because if you add new objects to the system, every program that doesn't know about this new type needs to be updated to be able to use them, you dont have that problem to the same extent with files. Have you thought about that?
As Brendan said above, files have a similar problem. Despite files being touted as something that's understood by all applications, that only applies to the standard file syscalls. ioctl() has the exact same problems as using an interface. Now in practice, this won't be a problem in my system. First of all, all objects can expose multiple interfaces, so a device can expose a file interface and be treated like a file. Second, most applications will be accessing a specific class of devices (and therefore will be accessing a constant interface). If a new object type is created, then someone writes a new program for it.
Quote:
Have you thought about how you will navigate resources? Will you query them like SQL or present them hierarchaly like a normal filesystem? Why I am worried here is that if you unify all resources into one huge database it could become very slow.
In my original post, I mentioned a kernel component called the object manager. The object manager maintains an internal object namespace, similar to the filesystem, that organizes named objects in a hierarchy. Namespaces like the filesystem namespace actually become part of the object namespace. Since then, I've extended my idea somewhat. My current idea is that certain servers can act as name servers, which work together to build a unified object namespace. Each name server implements a part of this namespace, with the object manager being the first one to build it. Other servers could help build this namespace as well; for example, the window manager could create an object directory called \Windows to hold the window objects associated with each process.