new stuff for vamsas hack.
[vamsas.git] / docs / objectUsageModel.txt
diff --git a/docs/objectUsageModel.txt b/docs/objectUsageModel.txt
new file mode 100644 (file)
index 0000000..97d8176
--- /dev/null
@@ -0,0 +1,44 @@
+Vamsas objectusageModel\r
+-----------------------\r
+\r
+Quick list of features we need on shared object model:\r
+\r
+fine-grained update events\r
+--------------------------\r
+Anything less than an indication that the whole document \r
+has been updated is fine-grained. \r
+Since every app would have to work out which objects had \r
+changed for themselves, its better to provide a \r
+generic interface in the library.\r
+ - class update\r
+  - app gets notified when a type of object is updated\r
+ - hierarchical update\r
+  - app is notified when some is updated that is directly or indirectly referenced by a property of this object (ie  \r
+ - instance update\r
+  - application gets notified when a particular object is updated ?\r
+\r
+Object Locking Mechanism\r
+---------\r
+Pre-Nov2006 meeting, an object lock was a simple binary attribute flag. This gives no indication to another app about when the lock is going to be freed.\r
+Generally, object databases seem to have a more sophisticated model, so a particular application(and user) can lock a particular object.\r
+Within the document, this can be implemented as a Lock attribute string field, which contains a description of the Lock status on that object.\r
+The description must then be specified. The minimum requirements are :\r
+ - one application can lock an object (such as an alignment) against updates by any other application.\r
+  * there are caveats. For the example of an alignment, this depends on data above the alignemnt object in the hierarchy.\r
+    In this case, any update to objects 'above' the locked object must be data-preserving.\r
+      ie \r
+      the dataset sequence->alignment sequence relationship must be updated to ensure that when a dataset sequence is extended by an additional segment of residues:\r
+       Dataset sequence 5-10 is updated to contain residues 1-15, because another alignment contains a longer segment of the same sequence.\r
+       Alignment sequence references dataset sequence from 5 to 10 (we use the dataset sequences numbering system for referring to it).  \r
+       The update does not affect the alignment sequence's reference to the dataset sequence, since the from,to coordinate segment has not undergone any shift.\r
+  * update verification step\r
+    any document update must be verified to not violate any existing locks on the document. Dataset sequences and alignment sequences cannot be deleted arbitrarily unless they are lock free.\r
+    * lock free for the case of deletion means that no other objects that depends on an object is locked.\r
+    \r
+\r
+New/Modified/Delete object notification mechanism\r
+Andrew mentioned that there's no way for an object to be 'deleted' from the model,\r
+particularly if the library prevents the application from clearing references to \r
+objects within other objects.\r
+\r
+There are two cases
\ No newline at end of file