Skip to main content
GameDev.net gamedev.net
🔒 Locked

Next-Generation Computing: Operating System Concepts: RDVfs

Started by Oluseyi Dec 5, 2002 at 3:29 AM 61 replies 5.4k views
Original Post
Oluseyi
Oluseyi
Relational Database + Versioning Filesystem The hierarchical filesystem model that is so familiar to so many of us is tired and inadequate. It is a useful tool for grouping data by function or property, but being constrained to place all of our data into strict single-habitation hierarchies limits our ability to manipulate our data in powerful ways. Data Organization: Relational Database Say, for a moment, we completely discarded the hierarchy and stored all of our files - applications, scripts, images, audio, video, text - in a linear or flat repository. That''s not really useful because it becomes hard to find anything or work on groups of data. Say we then allowed the user to define relationships or associations between data/files and abstract concepts. Say we allowed the user to define multiple such associations between a datum and different concepts. Now the user can use the associations as pivots for viewing data:
Our user is doing a media research project on character realization in modern media - film, roleplaying games and books. The user creates an association labelled "Characters" for all the files describing various figures from diverse media. The user then creates another association, "Film" for characters from film media and similar associations for "RPG" and "Print". Our user can now choose to view all characters (the filesystem is being searched with "Characters" as association criteria), and receives a list of all characters as well as subcategorization of some entries as pertaining to roleplaying games, film or books. The user then selects both RPG and Film and views the results (the filesystem is being searched with "Characters", "RPG" and "Film" as association criteria).
The idea isn''t terribly revolutionary; I believe Windows Longhorn is to feature a filesystem something like this. Th total abolishment of the hierarchical filesystem (relegated only to being a viewing abstraction) has powerful implications for file location, though, as a file is now never more than two levels "away" from the current location. This dispenses of the need for filepickers, for one thing, and makes specialized search tools less necessary. File associations (analogous to file locations in hierarchical filesystems) become metadata along with file type, size and modification data. Provided is an example implementation (C++) of rudimentary functionality and a brief (and minimal) test application exhibiting the association and criteria pivoting functionality:
  
// repository.h

 
#include <list>

#include <string>

#include <vector>

 

typedef size_t GUID;

 

class Repository

{

private:

  struct entry

  {

    GUID inode;

    std::string identifier;

    std::list<GUID> relationships;

    //*** TODO: add storage capacity (reference)


  };

 

  typedef std::list<entry> repository;

  typedef std::list<GUID> relationship;

 

  repository contents;      // files


  repository relationships; // folders


 

  struct id_match

  {

    GUID comp_id;

    id_match( const GUID id ) : comp_id( id )

    {

    }

    bool operator () ( const entry & e )

    {

      return (e.inode == comp_id);

    }

    bool operator () ( const GUID g )

    {

      return (g == comp_id);

    }

  };

 

public:

  Repository() {};

  ~Repository() {};

 

  void addFileRelationship( const GUID file, const GUID folder = 0 );

  void addFolderRelationship( const GUID subcategory, const GUID category );

  void addFolderContentsRelationship( const GUID from_folder, const GUID to_folder );

  GUID newFile( const std::string & file );

  GUID newRelationship( const std::string & folder );

  void setFileIdentifier( const GUID file, const std::string & identifier );

  void setFolderIdentifier( const GUID folder, const std::string & identifier );

 

  std::list<GUID> getFiles( GUID in_folder );

  std::list<GUID> getFiles( std::vector<GUID> in_folders );

  std::list<GUID> getFolders( GUID in_folder );

  std::list<GUID> getFolders( std::vector<GUID> in_folders );

  const std::string & getFileIdentifier( GUID file ) const;

  const std::string & getFolderIdentifier( GUID folder ) const;

 

  static GUID getNextFileID( void );

  static GUID getNextFolderID( void );

};
  

  
// repository.cpp

 
#include "repository.h"

#include <algorithm>

 

void Repository::addFileRelationship( const GUID file, const GUID folder )

{

  repository::iterator file_it = std::find_if( contents.begin(), contents.end(), id_match(file) );

  repository::iterator folder_it = std::find_if( relationships.begin(), relationships.end(), id_match(folder) );

  if( file_it != contents.end() && folder_it != relationships.end() )

    file_it->relationships.push_back( folder );

}

 

void Repository::addFolderRelationship( const GUID subcategory, const GUID category )

{

  repository::iterator subcat = std::find_if( relationships.begin(), relationships.end(), id_match(subcategory) );

  repository::iterator cat = std::find_if( relationships.begin(), relationships.end(), id_match(category) );

  if( subcat != relationships.end() && cat != relationships.end() )

    subcat->relationships.push_back( category );

}

 

void Repository::addFolderContentsRelationship( const GUID from_folder, const GUID to_folder )

{

  repository::iterator file_it = contents.begin(), file_stop = contents.end();

  while( file_it != file_stop )

  {

    relationship::iterator from_it = std::find_if( file_it->relationships.begin(), file_it->relationships.end(), id_match(from_folder) );

    relationship::iterator to_it = std::find_if( file_it->relationships.begin(), file_it->relationships.end(), id_match(to_folder) );

    if( from_it != file_it->relationships.end() && to_it == file_it->relationships.end() )

      file_it->relationships.push_back( to_folder );

    ++file_it;

  }

}

 

GUID Repository::newFile( const std::string & file )

{

  entry e;

  e.identifier = file;

  e.inode = getNextFileID();

  contents.push_back( e );

  return e.inode;

}

 

GUID Repository::newRelationship( const std::string & folder )

{

  entry e;

  e.identifier = folder;

  e.inode = getNextFolderID();

  relationships.push_back( e );

  return e.inode;

}

 

void Repository::setFileIdentifier( const GUID file, const std::string & identifier )

{

  repository::iterator it = std::find_if( contents.begin(), contents.end(), id_match(file) );

  if( it != contents.end() )

    it->identifier = identifier;

}

 

void Repository::setFolderIdentifier( const GUID folder, const std::string & identifier )

{

  repository::iterator it = std::find_if( relationships.begin(), relationships.end(), id_match(folder) );

  if( it != relationships.end() )

    it->identifier = identifier;

}

 

std::list<GUID> Repository::getFiles( GUID in_folder )

{

  std::list<GUID> ret;

  repository::iterator file_it = contents.begin(), file_stop = contents.end();

  relationship::iterator it;

  while( file_it != file_stop )

  {

    it = std::find_if( file_it->relationships.begin(), file_it->relationships.end(), id_match(in_folder) );

    if( it != file_it->relationships.end() )

      ret.push_back( file_it->inode );

    ++file_it;

  }

 

  return ret;

}

 

std::list<GUID> Repository::getFiles( std::vector<GUID> in_folders )

{

  std::list<GUID> ret;

  int N = in_folders.size();

  for( int i = 0; i < N; ++i )

  {

    std::list<GUID> r = getFiles( in_folders[i] );

    ret.splice( ret.end(), r );

  }

 

  return ret;

}

 

std::list<GUID> Repository::getFolders( GUID in_folder )

{

  std::list<GUID> ret;

  repository::iterator folder_it = relationships.begin(), folder_stop = relationships.end();

  relationship::iterator it;

  while( folder_it != folder_stop )

  {

    it = std::find_if( folder_it->relationships.begin(), folder_it->relationships.end(), id_match(in_folder) );

    if( it != folder_it->relationships.end() )

      ret.push_back( folder_it->inode );

    ++folder_it;

  }

 

  return ret;

}

 

std::list<GUID> Repository::getFolders( std::vector<GUID> in_folders )

{

  std::list<GUID> ret;

  int N = in_folders.size();

  for( int i = 0; i < N; ++i )

  {

    std::list<GUID> r = getFolders( in_folders[i] );

    ret.splice( ret.end(), r );

  }

 

  return ret;

}

 

GUID Repository::getNextFileID( void )

{

  static GUID last_file_inode = 1;    //*** TODO: replace with GUIDs


 

  return last_file_inode++;

}

 

GUID Repository::getNextFolderID( void )

{

  static GUID last_folder_inode = 1;  //*** TODO: replace with GUIDs


 

  return last_folder_inode++;

}
  

  
// main.cpp

 
#include <iostream>

#include <iterator>

#include "repository.h"

 

int main()

{

  using namespace std;

 

  Repository r;

  GUID apple    = r.newFile( "apple" );

  GUID bicycle  = r.newFile( "bicycle" );

  GUID car      = r.newFile( "car" );

  GUID cat      = r.newFile( "cat" );

  GUID dog      = r.newFile( "dog" );

  GUID eggs     = r.newFile( "eggs" );

  GUID orange   = r.newFile( "orange" );

  GUID plane    = r.newFile( "plane" );

  GUID train    = r.newFile( "train" );

  GUID Animals  = r.newRelationship( "Animals" );

  GUID Food     = r.newRelationship( "Food" );

  GUID Fruits   = r.newRelationship( "Fruits" );

  GUID Vehicle  = r.newRelationship( "Vehicle" );

  GUID Wheeled  = r.newRelationship( "Wheeled Vehicle" );

  GUID Winged   = r.newRelationship( "Winged Vehicle" );

  r.addFileRelationship( apple, Fruits );

  r.addFileRelationship( bicycle, Wheeled );

  r.addFileRelationship( car, Wheeled );

  r.addFileRelationship( cat, Animals );

  r.addFileRelationship( dog, Animals );

  r.addFileRelationship( eggs, Food );

  r.addFileRelationship( orange, Fruits );

  r.addFileRelationship( plane, Wheeled );

  r.addFileRelationship( plane, Winged );

  r.addFileRelationship( train, Wheeled );

  r.addFolderContentsRelationship( Fruits, Food );

  r.addFolderContentsRelationship( Wheeled, Vehicle );

  r.addFolderContentsRelationship( Winged, Vehicle );



  std::list<GUID> l = r.getFiles( Vehicle );

  std::copy( l.begin(), l.end(), ostream_iterator<GUID>(cout, "\n") );

  l = r.getFiles( Food );

  std::copy( l.begin(), l.end(), ostream_iterator<GUID>(cout, "\n") );
 
  return 0;

}
  
But that''s not all. Version History Journalling filesystems are widely available today (XFS, reiserfs, JFS, NTFS). What we are proposing here is a filesystem that stores each file as a base image and a sequence of deltas, effectively providing rollback capability. Every so many deltas, a new base image is inserted and deltas are created from there. The user may specify that a previous image and its sequence of deltas be discarded if older than a certain data, or if filesize exceeds a certain amount, or after a certain number of new base images, or after a given period of inactivity, etc. Think a mutated CVS built into the filesystem (or ARMS; in-joke for Dean Harding). Version history is closely tied in with the expanded concept of permissions that RDVfs (working title) would implement. Rather than Unix-style 10-bit permissions, file accesses would be specified in terms of roles - author, co-author, consumer, maintainer/admin, etc. Multiple group and user permissions would be possible, allowing different users to have different levels of access independently of any groups, and all permissions are being designed with a view to maximizing the ability of users to publish and share their data. Time-variant permissions would also be possible, allowing a user to specify temporary permissions or permission changes for other users and groups. The intent of this post is to canvas for opinions, suggestions, criticisms and critiques. Hopefully it will be the first in a series of threads on ways to revolutionize modern computing (ambitiously pseudo-titled "Next-Generation Computing"). Thank you for your time.
kill
kill
The problem of organizing information is an old one and the best solution to date is a graph. While a plain tree is pretty good, it does not address the common problem of having a certain chunk of information (aka file) belonging to more then one category. This is where shortcuts come in, and extend the tree into a moral general, flexible structure (graph).

The system you describe allows you to do nothing more then to assign keywords to your files. While it can be very useful, it still doesn''t solve the problem at hand (organizing information), it''s just a bookmark system that lets you quickly grab all files that satisfy a certain criteria. Imagine such a system in practice. All you have is a search box, or a list of these keywords. You don''t have the ability to organize your files based on their relationships (for instance, all the files that belong to the operating system share something in common, so we need to stick them in one place). You can argue that you have the ability to assign a "system" keyword to all the OS files, and this groups them together. But now you''re back to the original graph idea because you''re essentially creating a directory. In my opinion, the graph is here to stay.

One of the major problems with organizing any kind of information is that you can slice it in many different ways. You can have all OS files go into one directory and all game files go into another. Or you can have all executable files go into one directory and all image files go into another. While this isn''t a particularily good example, I''m sure you can come up with many more. Another example (a more practical one) comes to mind when one thinks of configuration files. On one hand, you want all config files in one directory so you can customize everything in your system from a common place. On the other hand you want a config file for every particular program to be in that program''s directory so if you want to customize this particular program you don''t have to roam around the config directory, you can just go into the program''s directory. This is where shortcuts fail to provide a solution because we''re talking about an enormous amount of shortcuts that becomes unmanagable.

I''m not sure what the solution to the problem above could be. May be building the graph dynamically based on the user''s needs? Each config file would have a keyword "config". Each file will have a program''s name associated with it. The user can then dynamically build a "config" directory or a particular program directory. While this sounds like what you''ve mentioned, I''m thinking of something different, I still mean to keep the familiar graph structure, just build it dynamically depending on the user''s needs. In this case, however, assigning keywords becomes a very hard task. There has to be some standard set of keywords used by all programs, for example "config" for configuration files. Also, how can the user easily build the graph exactly how he needs it? It''s not easy to keep thousands of keywords in mind... Any ideas?
Oluseyi
Oluseyi
quote:
Original post by kill
The problem of organizing information is an old one and the best solution to date is a graph... This is where shortcuts come in, and extend the tree into a more general, flexible structure (graph).

Take the shortcut idea a step further and replace both the shortcut(s) and the existence of the original file "in" a particular location with associations like I described above. You now have one file "existing in" multiple locations.

quote:
The system you describe allows you to do nothing more then to assign keywords to your files. While it can be very useful, it still doesn''t solve the problem at hand (organizing information)... In my opinion, the graph is here to stay.

I hadn''t thought of the filesystem as a graph before. It is, in effect, exactly what I try to describe when I talk about "pivoting" on different criteria (think taking a tree and turning it on its side so that what was a left now becomes the root - inherent with graphs).

Note that I said that these associations are metadata, which can be used in conjunction with other metadata (file attributes, type, etc) to organize and batch operate on data. Windows file types are extension-based; MacOS, OTOH, has file IDs which make a file''s type an integral part of its structure. One of our proposals to go along with this graph-structured pseudo-filesystem (pseudo because the data is actually stored in a flat repository, allowing for multi-population of graph nodes) is the use of MIME types to define file formats. This is interesting because it generizes data handling (creation, opening, rendering) in an application-independent manner: "plug-ins" handle the 5 basic MIME types (text, image, audio, video, application) while codecs handle specific formats (text/plain, audio/mp3, image/jpeg, etc) and applications thus become about how you can manipulate data rather than presenting and serializing it.

I suppose I should have introduced these ancillary issues first; they provide a much better context for considering the filesystem.

quote:
One of the major problems with organizing any kind of information is that you can slice it in many different ways... This is where shortcuts fail to provide a solution because we''re talking about an enormous amount of shortcuts that becomes unmanagable.

Multi-population solves that too. Think of associations as shortcuts on steroids, transplanted from a hierarchical context to a graph-structured one.

quote:
...assigning keywords becomes a very hard task.

Keywords are analogous to folders or directories. If we eliminate all the other unnecessary user housekeeping (explicitly saving files, cumbersome navigation via filepickers, etc), creating them isn''t too much of a burden. It''s also important that we give the use high-level tools for creating these associations (eg "associate all the ''contents'' of folder X with folder Y" - associates all files related to X with Y as well).

quote:
There has to be some standard set of keywords used by all programs, for example "config" for configuration files.

Very reasonable. A number of standard keywords should exist out of the box - "system", "config", "application", "document", maybe "script"...

quote:
Also, how can the user easily build the graph exactly how he needs it? It''s not easy to keep thousands of keywords in mind... Any ideas?

You raise one very good question - how does the user keep track of the multitude of keywords that exist? Perhaps a usage-based list (MRU?) or a list based on association density (number of associations and associations of associations?) or even a user-scriptable method.

Your insights have proved enlightening and valuable. Please keep them coming!
Andrew Russell
Andrew Russell
Good idea. I see one problem. If it were completly flat, you would run out of file names very quickly...

Do not meddle in the affairs of moderators, for they are subtle and quick to anger.


ANDREW RUSSELL STUDIOS
Cool Links :: [ GD | TG | MS | NeHe | PA | SA | M&S | TA | LiT | H*R ]
Got Clue? :: [ Start Here! | Google | MSDN | GameDev.net Reference | OGL v D3D | File Formats | Go FAQ yourself ]

Oluseyi
Oluseyi
quote:
Original post by Andrew Russell
Good idea. I see one problem. If it were completly flat, you would run out of file names very quickly...


struct entry
{
GUID inode;
std::string identifier;
std::list relationships;
};

Files are stored, retrieved and otherwise manipulated by their INODEs (a concept borrowed from Unix and MacOS; it''s still questionable whether INODEs need to be GUIDs). Every filesystem entry associates the INODE (which is guaranteed to be unique on a given system) with a textual identifier (filename), among other things. Our architecture expects there to be multiple files in the repository with the same name - and even possibly the same associations, though that would be confusing.
Andrew Russell
Andrew Russell
Hrrm, I suppose it would work, but I am having trouble wrapping my mind around it. I am firmly affixed to the standard tree filesystem.

Do not meddle in the affairs of moderators, for they are subtle and quick to anger.


ANDREW RUSSELL STUDIOS
Cool Links :: [ GD | TG | MS | NeHe | PA | SA | M&S | TA | LiT | H*R ]
Got Clue? :: [ Start Here! | Google | MSDN | GameDev.net Reference | OGL v D3D | File Formats | Go FAQ yourself ]

kill
kill
I just thought about it a little more. I came up with a few things.

1. "Templates". Since the information can be sliced in many different ways let the user build templates. For example

  
Template1
Config
Template2
Program
Config

Template1 will let the user see a list of all config files under a Template1 directory. Template2 will let the user see a list of folders that are program names and in them a list of all config files that belong to those programs. Note, on the second level the search will be restricted to what was found on the first level. This could prove to be very powerful. The user can then predefine a set of templates that can be quickly accessed.

2. While slicing the information in many different ways is all good and nice, when I first boot up my computer I don't want to see one giant folder. I want some kind of a default template. How should this default template be built?

3. A standard graph/tree can be used to organize the actual concepts. For example:

  
Application
Image
Audio
Video
avi
asf
mov
Executable

This way the concepts become manageable. You no longer have a list of thousands of concepts, but a familiar organization. This also solves problem 2 described above, the system now has a default template. The user uses this tree to organize the concepts, and this organization is used as a default template. Custom templates can easily be built and can range from a simple query for all files that are config files (you probably wouldn't make such a simple template) to much more complex, specialized templates.

Do you actually intend to use the proposal somehow, or you just put it up for an interesting discussion?

EDIT: Added the source tags so the tabs would be preserved.

[edited by - kill on December 5, 2002 7:03:07 AM]
Oluseyi
Oluseyi
kill, I think the template idea is superb! I do have a question about the default template though: Do you think it would be more logical to replace what you have labelled as "Executable" with "Application" (since non-application executables - utilities and the like - probably exist in a set of system-oriented graph nodes) and "Application" with "My Computer" or something else that connotes totality of available data?

quote:
Do you actually intend to use the proposal somehow, or you just put it up for an interesting discussion?

I actually intend to implement a complete operating system built around this and other concepts that I will be introducing for discussion in the coming weeks. No, I will not be writing a kernel - I''m considering Linux and Darwin as initial "cores" (it may be possible to build the same "operating environment" around other kernels so long as they provide certain fundamental services). I also intend to implement a replacement shell for Windows that embodies these principles and those others than can migrate to Windows without too much overhead.

No, I do not intend to implement all this alone. I already have one person working with me, and I plan on recruiting many more. Some of you may have noticed the change of my "From" field to "Lagos, Nigeria"; I''m going home in just over two weeks and will be engaging in a significant amount of technology, agriculture and social development (D.V.), so I''m hoping I''ll have time and resources to commit to this then.
Oluseyi
Oluseyi
quote:
Original post by Andrew Russell
Hrrm, I suppose it would work, but I am having trouble wrapping my mind around it. I am firmly affixed to the standard tree filesystem.

We will require slightly different views than are traditionally applied, so it''s kinda hard to visualize for some people. How about you take the three files I posted and fool around with them (modify the entries in main.cpp and see how you can "pivot" or "slice" by different criteria)?
kill
kill
The template idea needs to be developed further. I just gave it as an example. The template is really a different (simpler) way to specify and store a very complex SQL query.

An "application" concept is probably a very good idea. I don''t really see a purpose in associating any particular file with an application concept, instead, for every application installed I would create a separate concept "derived" from the application concept. For example Application -> Warcraft3, Application -> notepad. Then I would associate all warcraft3 files (including executables, images, etc.) with Warcraft3 concept. This way you can easily track the files that belong to any particular application. Another good idea might be automatically associating a file with an application that creates it during its lifetime. This way you wouldn''t have a common problem where you uninstall an application and still have files on your system that you''ll never use again. There are mirriads of details that can be implemented. Actually, if this system is well thought out it can prove to be very useful.

While I have my doubts whether this type of system can be used successfully in a file system, it could definetly be a great idea for a personal information manager. In general, information management is not a type of problem that lends a clear solution. A clear logical solution simply doesn''t follow from the problem. This is the type of thing that requires years of research and development. A PIM system can be a perfect platform to test some ideas and see what works and what doesn''t.

I''m not sure how serious you are about the project, how far you want it to go and what your goals are, but it''s definetly a big undertaking. I''ve been thinking about this type of project for a long time now, which is why I have a lot of ideas Here''s a quick list of ideas. May be each one of those will become a separate thread.

1. File system and information management (what we''re talking about here).
2. System Configuration. It is really annoying how configuration is done in linux and windows. In linux you have a mirriad of config files and no clear way of knowing which one you need to go into to modify a certain feature of the system. In windows there is registry which is unreadable, and a bunch of tools that provide only a limited subset of customization features and are not centralized. A good idea would be to provide an IConfigurable interface. Every application that wants to expose its settings to the user must define and implement this interface. It must provide variables, detailed descriptions and value ranges. Then a single tool can be used to customize every single thing in the system and in every application.
3. Application security. In windows and linux there is so called user security. If an application runs under root, it can do anything it wants. If it runs under a regular user it can do a limited subset of things. A sandbox would be a good idea, where a user can limit the application (for example to a certain directory) so even when an application runs under root it can''t modify files in other directories.
4. A different language. As of right now I can''t think of a language I''d use to implement my dream OS. C is plain old, C#/Java use virtual machines and runtimes and are unsuitable for system programming. C++ _could_ be a good solution if it wasn''t plagued by certain problems (header/implementation files, complex pointer semantics, lack of reflection/scripting, etc.). My perfect language would be C# that compiles to native code without runtime systems and allows for memory management (new/delete operators) and inline assembly.
5. Statistical package. I think statistical code analysis at runtime can provide huge clues to how to schedule the code better. A statistical package that analyzes code at runtime and adjusts the scheduler accordingly could be a very good idea.

Let me know how your project is going. While I currently have very little time to contribute actual code, I can always help with design and architecture. I will soon be done with the current project I am working on, and should have more time to dive into other projects. Pulling something like this off could provide a very good research platform and the benefit of using Linux internals can actually lead to a usable system in a reasonable amount of time.
aidan_walsh
aidan_walsh
I must say this is one of the more interesting reads I have seen here in a while.

Directory trees need to go! I like the idea of a relational file system, but there is one aspect that needs to be addressed. Failure. While this is a nusance in the tree-based structure, leaving one branch unreachable, one simple primary key failure in a relational model could leave the entire OS crippled.

This could make a hackers job of destroying a target OS much more simple than it is now. By changing one file property or relation a hacker could destroy all links to every other file in the system.

How do you propose to combat this?


#Old Steve, he said to Xerox "Boys, turn your heads and cough"
And when no-one was looking he ripped their interfaces off#
Three Dead Trolls in a Baggie on the truth behind MacOS 1

SketchSoft | SketchNews




[edited by - doodle_sketch on December 5, 2002 8:52:29 AM]
www.aidanwalsh(.net)(.info)
AnonymousPosterChild
AnonymousPosterChild
I just can''t see anything wrong with the current method. Tried, tested and true.
With love, AnonymousPosterChild
Oluseyi
Oluseyi
quote:
Original post by kill
The template idea needs to be developed further. I just gave it as an example. The template is really a different (simpler) way to specify and store a very complex SQL query.

Sort of an alias or macro. I agree, it could use developing, but it''s an excellent jump off point.

quote:
Another good idea might be automatically associating a file with an application that creates it during its lifetime. This way you wouldn''t have a common problem where you uninstall an application and still have files on your system that you''ll never use again.

One model for application installation and uninstall suggested is that of the ROX Desktop/Filehandler: Ignoring everything said above (ie, working in a traditional tree-based filesystem), each application is completely contained in its own folder - config data, binary executable, etc. Double-clicking on the folder launches the application. Deleting the folder uninstalls the application. Bye-bye Windows registry, bye-bye distributed Linux config files.

Transposing that to our graph-based filesystem, an application is given a unique key (probably the application name) to which all of its files are associated. Its files may optionally also be associated with other keys (to tell you what kind of application it is, whether it''s a config file, etc) and are probably associated with the Application key as well. Installation is a copy, uninstall is a deletion. Since associations are atomic, we can remove an application and all files associated with its unique key and be sure we have no cruft floating around.

quote:
While I have my doubts whether this type of system can be used successfully in a file system, it could definetly be a great idea for a personal information manager.

Interestingly, PIM was the original inspiration for much of this (early discussion involved contacts and the like).

quote:
I''m not sure how serious you are about the project, how far you want it to go and what your goals are, but it''s definetly a big undertaking.

I''m pretty serious about it. I''m completely dissatisfied with the state of software today, so this is part of an effort to shift the desktop computing paradigm (there are ancillary ideas that relegate desktop computing to keyboard-intensive activities only, by distributing the processing and content consumption to appropriate form factor appliances, but all that isn''t relevant to this discussion )

quote:
Here''s a quick list of ideas. May be each one of those will become a separate thread.

Maybe. It''s good to at least know that other people are think about these things.

quote:
2. System Configuration.

I think that configuration data should be stored as plain, human-readable text. GUI tools should be available for configuring the data, but a user should be able to manually edit if s/he pleases. This allows user applications and user configuratins to migrate easily, since text isn''t subject to many (if any) format restrictions on the majority of platforms. Want to make Word Processor Z at the office look, feel and behave just like at home? Copy your config file over.

quote:
3. Application security.

A much more robust permissions model is needed. I alluded briefly to that earlier - consumer, author, multiple group and user specifications, etc. This is an aspect that we haven''t considered at length yet, but definitely have plans for. We live in a networked world today, so a modern operating system/environment must respond to the opportunities and threats that entails.

quote:
4. A different language.

Funny you should mention that. I''ve been thinking about cross-breeding a mutated C++ with a LISP-variant to create an object-oriented high-level assembly language with a simpler yet more robust syntax (off the top of my head, we''d eliminate header files and develop packages instead; replace operator -> with operator . across the board; make strings, dynamic arrays and so forth first-class objects...)

Related to that is that our philosophy is to reduce application development to a primarily "glue language" endeavor. Since OS "plug-ins" handle broad categories of media and "codecs" handle specific media types, applications need focus only on how the plug-ins work together and what additional functionality they provide the user - high-level tasks better done in high-level languages. With our improved permissions model, it becomes possible to effectively "lock down" a script such that a customer can only consume/execute the script and not have access to the code (but why would you want to do that?)

quote:
5. Statistical package. I think statistical code analysis at runtime can provide huge clues to how to schedule the code better. A statistical package that analyzes code at runtime and adjusts the scheduler accordingly could be a very good idea.

This is something I absolutely hadn''t thought about. Thanks for the input!

quote:
Let me know how your project is going. While I currently have very little time to contribute actual code, I can always help with design and architecture.

I''ll be giving regular updates and feedback. Since the primary kernels under consideration are Unixes, expect a fair amount of traffic on the Everything Unix forum.

quote:
Pulling something like this off could provide a very good research platform and the benefit of using Linux internals can actually lead to a usable system in a reasonable amount of time.

Exactly my thinking
Oluseyi
Oluseyi
quote:
Original post by doodle_sketch
I must say this is one of the more interesting reads I have seen here in a while.

Thank you, and thank you for contributing. I nearly posted this in Everything Unix, but posting it here instead is turning out to have been a good move.

quote:
Directory trees need to go! I like the idea of a relational file system, but there is one aspect that needs to be addressed. Failure. While this is a nusance in the tree-based structure, leaving one branch unreachable, one simple primary key failure in a relational model could leave the entire OS crippled.

Good point. Primary key failure is easy to detect, though, and since all files exist in a linear repository it''s still easy to locate and deploy recovery tools which will reconstruct the primary keys and recreate the fundamental associations. Other utilities could then verify the integrity of all associations and present the user/sysadmin with a status report.

quote:
This could make a hackers job of destroying a target OS much more simple than it is now. By changing one file property or relation a hacker could destroy all links to every other file in the system.

How do you propose to combat this?

I don''t know that it''s that easy. Could you give an example scenario?
Oluseyi
Oluseyi
quote:
Original post by AnonymousPosterChild
I just can''t see anything wrong with the current method. Tried, tested and true.

If we as a species ever become complacent or satisfied with where we are, development ceases. If someone has said what you said just ten years ago, you''d be writing either mode 13h or bank-switched VESA 1.2 graphics in low-level C to display a single pixel. You wouldn''t have even 8x CD-ROM. No USB. Forget Plug-and-Play. DVD? Nope.

Today''s software may seem extremely capable - until you get a taste of tomorrow (some people get to dream these things, others get to experience the concretization of such dreams). Our computers can and should be doing so much more than they currently are.
AnonymousPosterChild
AnonymousPosterChild
Then the real problem is this:

Your system seems overly complicated. The current system is simple, and people like simple.
With love, AnonymousPosterChild
Dwiel
Dwiel
I love the idea of templates!
I have always thought (ever since I learned what pointers were in C) that windows should incorperate soething similar. Instead of shortcuts, which only tell where a file is, pointers would be nice so you could consider each pointer like it was the actual file without the extra storage space. This might be helpfull when for example, you want to have the same file located in multipule directories but exist as the same physical data on the drive.

I know that this is not new to this thread, I think it would help a great deal in the system you are sugesting.

Tazzel3d ~ dwiel
kill
kill
quote:
Original post by AnonymousPosterChild
...Your system seems overly complicated. The current system is simple, and people like simple.


Actually, if you look into implementation of file systems it''s not quiet as simple as it may seem. Even the concept is not that simple: directory nodes, files, permissions, attributes, shortcuts. All this involves quiet a bit of graph theory and when you get into implementation details it becomes evermore complex. While the concept of what we''re discussing does seem complex, it''s only so until you get to see a working implementation. It''s all in the presentation, if it''s presented well and you see how it works in practice, it''s much easier to visualize it, hence it becomes a much simpler concept.

quote:
Original post by Oluseyi
I think that configuration data should be stored as plain, human-readable text. GUI tools should be available for configuring the data, but a user should be able to manually edit if s/he pleases.

Do you have any experience working with .NET? There is a standard property panel that lists all the properties a component supports and when you bring your mouse over it you see a tooltip with explanations what the property means. You can then easily modify it in a centralized, familiar environment. This is done by dynamically examining the code, grabbing all properties out of it and showing them in a centralized tool. The settings that you enter are then stored in a simple XML file. Nothing prevents you from going in and editing it yourself or copying it from one computer to another. You can also provide more specialized customization tools and wizards, but the overall system lets you customize every single detail in one place. IMO it''s a very good system.

Useless Hacker
Useless Hacker
quote:
Original post by kill
4. A different language. As of right now I can''t think of a language I''d use to implement my dream OS. C is plain old, C#/Java use virtual machines and runtimes and are unsuitable for system programming. C++ _could_ be a good solution if it wasn''t plagued by certain problems (header/implementation files, complex pointer semantics, lack of reflection/scripting, etc.). My perfect language would be C# that compiles to native code without runtime systems and allows for memory management (new/delete operators) and inline assembly.

Delphi is a nice language -- it has good object-orientation, unit-based code modules, etc., while allowing low-level memory management and inline assembly.


DGDev - The Delphi Games Development Community
Silvermyst
Silvermyst
quote:
Transposing that to our graph-based filesystem, an application is given a unique key (probably the application name) to which all of its files are associated. Its files may optionally also be associated with other keys (to tell you what kind of application it is, whether it''s a config file, etc) and are probably associated with the Application key as well. Installation is a copy, uninstall is a deletion. Since associations are atomic, we can remove an application and all files associated with its unique key and be sure we have no cruft floating around.

This will be the feature I will enjoy most. I hate nothing more than the idea of having fragments of an uninstalled program still floating around somewhere.

For this to work, the user would need to be given a way to keep track of all his ''keys''.

As the key can be used to enter and close applications, why not use an image of an actual key (you know, the ones we use to lock and unlock doors). There could be a master key and multiple minor keys, all on the same keychain.



You either believe that within your society more individuals are good than evil, and that by protecting the freedom of individuals within that society you will end up with a society that is as fair as possible, or you believe that within your society more individuals are evil than good, and that by limiting the freedom of individuals within that society you will end up with a society that is as fair as possible.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.