Immortal Object Server: Difference between revisions
Adamcolton (talk | contribs) |
Adamcolton (talk | contribs) |
||
| Line 41: | Line 41: | ||
=== Permissions and Hierarchy === | === Permissions and Hierarchy === | ||
The hierarchy will also have a permissions layer. But, object and hierarchy permissions do not need to align. Hierarchies act like an index, so you could have access to a catalog where you may not be able to access all the material indexed. This allows | The hierarchy will also have a permissions layer. But, object and hierarchy permissions do not need to align. Hierarchies act like an index, so you could have access to a catalog where you may not be able to access all the material indexed. This allows | ||
*Groups to maintain hierarchical indexes for shared objects | * Groups to maintain hierarchical indexes for shared objects | ||
*Individuals to index a shared object in their personal hierarchy | * Individuals to index a shared object in their personal hierarchy | ||
*Individuals to place a personal object in a group hierarchy | * Individuals to place a personal object in a group hierarchy | ||
*Hierarchically organized groups to place objects available to only a subset of the members in a broadly shared hierarchy | * Hierarchically organized groups to place objects available to only a subset of the members in a broadly shared hierarchy | ||
Permissions are inherited. So given A → B → C → D. If A is given RW permissions and no explicit permissions are set for B, C and D, then they will inherit RW permissions for the same context (user or group). | |||
== Blobs == | == Blobs == | ||
Revision as of 00:25, 26 January 2014
This project arose out of OrgSuite 2. The Immortal Object Server (Imobse) stores objects as ordered dictionaries (each entry has two keys, a string and an integer where the integer set is continuous). Each object has a user, title, and data (the object).
Hierarchy
Meta-data consists of hierarchical tagging. If something is tagged as 'vegan' and vegan is a descendant of 'recipe' that that thing is automatically a recipe. Hierarchical tagging is used exclusively because all other systems of meta-data can be simulated through hietags. Hietags and objects are in a many-to-many relationship.
Ideally, I would like the query to do the recursive search of hierarchies, but I don't know if that's possible if not, when the hierarchy changes we could update a column to include all parents.
Came across [this] article and it got me thinking about the hierarchies. By defining the parent as a range and having all children fall within that range, querying is made much easier. If you run out of room, there is some un-graceful re-balancing required, but that's not too bad. If I just allocate a large range for each, it shouldn't be a problem. I may also run into issues if someone attempts to add one whole tree into another, but I can just pull both of them out, rebuild them php and put them in the database with adequate spacing. Basically each tag has an id and a highest-child-id.
Immortals
Immortals are the Imobse root objects. They are are ordered (indexed as well as having non-unique) dictionary keys. One of the important features that an object supports is referencing another object. An empty string can be used as a dictionary key and since they don't have to be unique, an object with all empty strings would act like a list.
Scripts
Originally I was going to add a scripts layer, but I don't think that's necessary now. JS, CSS and HTML can be stored as objects and PHP can be stored as blobs. We will need to add an aditional layer to restrict what sorts of blobs users can upload.
Apps
An Imobse app is an ordered list of Scripts that manipulate Immortals. The original concept was born out of OrgSuite so I will use that as an example.
An personal organization app could be created by having scripts that support appointments through an interface contract that requires an appointment to have a "Date" attribute. The app can then display all objects with a "Date" attribute on a calendar. A user could choose to have all the objects for that app under a folder in their hierarchy so only 'OrgSuite' objects are manipulated by OrgSuite, or all objects with a Date attribute could be shown on a calendar, making Date semi-standard by convention.
Files
This is a future-feature I would like to add, the ability to store certain file types (images, audio, txt, csv, .doc[x], pdf) and associate them with an object or hierarchy.
Queries
- Object ID
- Tag
- Id-Exact
- Title-Exact
- Id-Descendant
- Title-Descendant
Queries of course can be and/or'd together.
Permissions
Permissions are fairly standard, [read, read/write, read/write/admin]. Users can be grouped so that permission can be quickly given to a set of users. Permissions will be in a many to many relationship with objects. Groups have owners, also a permission (group).
When I mapped this out, I think permissions should only be assigned to groups, but each user is given their own group. It's a little sloppy, but the alternative gets ugly using either unions or a lot of redundancy for individual/group.
It would be nice to create a hierarchical grouping for permissions as well.
Permissions and Hierarchy
The hierarchy will also have a permissions layer. But, object and hierarchy permissions do not need to align. Hierarchies act like an index, so you could have access to a catalog where you may not be able to access all the material indexed. This allows
- Groups to maintain hierarchical indexes for shared objects
- Individuals to index a shared object in their personal hierarchy
- Individuals to place a personal object in a group hierarchy
- Hierarchically organized groups to place objects available to only a subset of the members in a broadly shared hierarchy
Permissions are inherited. So given A → B → C → D. If A is given RW permissions and no explicit permissions are set for B, C and D, then they will inherit RW permissions for the same context (user or group).
Blobs
Blobs can be uploaded and will act much like objects, they have a title and id. They can be linked to permissions and hierarchies.
Notes
I could make everything blobs and the users could store their data however they want.
Database Structure
- U: Users
- P: Permissions
- O: Objects
- B: Blobs
- H: Hierarchy
- S: Scripts
- A: Apps
Clusters
Kind of a "round 2" thing, but I want servers to be able to be clustered. If you have a server, you can take a basic server and point it at the first and it will clone it. In order for this to work, we can't have any sequential indexes. Re-balancing trees may also require some special locks.
