ObjectMedia |
Edit this page |
Wheat objects can be stored in different types of storage systems called object media. This enables objects stored in different areas of the ObjectNameSpace to have different tradeoffs between time and space, and to support subsets of features of the ObjectModel.
For example, objects stored in the thread stack use a memory based object media that doesn't support persistence or transactions. It is designed to be very fast at the expense of memory and features.
On the other hand, objects stored in an external SQL database based object media support persistence and transactions, lack features the ability to add attributes to individual objects, allow those objects to be inherited from.
Here are several ideas for object media:
This also allows a nice set of protection: In a given Wheat system, the only host OS files that can be manipulated are those that are mounted into the object name space. You can create a protected area, and only mount that - then there is no way for a Wheat program to interfere. Of course, mounting / into the object name space is very tempting!
See: FileSystemAnalogy
For example, objects stored in the thread stack use a memory based object media that doesn't support persistence or transactions. It is designed to be very fast at the expense of memory and features.
On the other hand, objects stored in an external SQL database based object media support persistence and transactions, lack features the ability to add attributes to individual objects, allow those objects to be inherited from.
Here are several ideas for object media:
Memory Media
Fast, no persistence, no transactions. Full object model features. Used for thread stack, and 'temp' areas.XML Media
Simple persistent objects: stored as XML, one per file in the host OS's file system. Slow, but easy to back up, easy to version, easy to export (basically always exported!) See XMLMedia.Database Media
Objects stored in a relational, SQL database. Lacks many of the object model features. Supports robust transactions, optionally versions.Object Database Media
A custom built object database for storing Wheat objects. (Like Zope's ZODB∞.) This supports persistence, transactions, versions and views, as well as all object model features. However, it isn't necessarily the fastest, and certainly not portable.Remote Media
Objects that are fetched from names that are on other machines, look like they are stored on remote media from the local machine's perspective. Remote media has only the minimal set of features, but works with all objects everywhere.Minimal feature set-- so distributed transactions aren't really supported? --SummerMisherghi 2003-03-10
I think of Remote Media being objects over HTTP - which clearly doesn't support transactions. On the other hand, why can't there be Remote Transactional Media? While we should make remote objects in general be light and robust - if you are cooperating with a set of servers, then sure, why not support distributed transactions with your peers? --MarkLentczner 2003-03-11
I think of Remote Media being objects over HTTP - which clearly doesn't support transactions. On the other hand, why can't there be Remote Transactional Media? While we should make remote objects in general be light and robust - if you are cooperating with a set of servers, then sure, why not support distributed transactions with your peers? --MarkLentczner 2003-03-11
File Reflection Media
A sub-tree (or all) of the host file system is mounted into the Wheat name space. The host files and directories are represented as Wheat objects (of some appropriate classes). Manipulating files and directories is then naturally operations on Wheat objects. This is cleaner than most file system as object libraries.This also allows a nice set of protection: In a given Wheat system, the only host OS files that can be manipulated are those that are mounted into the object name space. You can create a protected area, and only mount that - then there is no way for a Wheat program to interfere. Of course, mounting / into the object name space is very tempting!
See: FileSystemAnalogy
There is no comment on this page.
[Display comments/form]
