[vos-d] s5 properties proposal

2008-05-03 Thread Peter Amstutz
Why the current s5 design for "embedde children" doesn't work...

Background.

A key aspect of the design of VOS s3 and s4 is the parent/child list.  
This is an associative array of name/value pairs, where the value is a 
link to another vobject.  This list of outgoing links plays a key role 
in VOS as the primary mechanism of linking vobjects to "properties" 
(other vobjects storing values that describe the first vobject) as well 
as the overall organization of vobjects into a (mostly) hierarchical 
namespace.

Advantages of this scheme (that have gotten us pretty far):
 - A naive implementation is very easy, only need the Vobject class.
 - Serialization/persistance is pretty easy.
 - Introspection of the vobject structure is straightforward.
 - Accomodates lists (order-sensitive) and maps (key/value pairs).
 - Vobjects can share properties and link to remote properties.

Disadvantages of this scheme (that we learned the hard way):
 - An efficient implementation is very difficult.  Since properties are 
standalone vobjects, there is a great deal of overhead associated with 
it: the property vobject has its own child list, access control list, 
listener list, etc.
 - Because of the overhead, scaling up to large numbers of vobjects 
(over 10,000) turned out to be a problem.
 - The child list is always order sensitive, even when not required or 
desiriable.
 - Poorly suited to object/relational mapping.
 - Associative array semantics permits duplicate, redundant or 
conflicting entries; whether that causes problems depends on how the 
child list is interpreted.
 - Difficult to deal with the case where one property is dependent or 
constrained by another property without exposing a race condition or 
requiring additional concurrency semantics.


Original proposed solution.

Originally, the solution was to keep the basic associative array child 
list, but introduce "embedded children": child properties which are 
actually stored and managed by the vobject that owns them.  These would 
appear in the child list as normal vobjects, could be individually 
linked to and/or replaced by links to remote vobjects.  When doing 
serialization or persistance, embedded children would be treated 
specially and stored efficiently.

Advantages:
 - Retains the advantages of the s3/s4 child list.
 - Much less (storage) overhead than s3/s4 approach.

Disadvantages:
 - Implementation is hairy.  Parent vobject must juggle a bunch of 
pseudo-vobjects.
 - Embedded children still have some per-vobject overhead in the form of 
special entries in the child list.
 - Leaky abstraction.  Embedded children appear to be vobjects, but most 
vobject operations (such as having a child list itself) won't be 
available.
 - In order to save efficiently, serialization/persistance code must be 
able to distinguish between embedded and non-embedded children, which 
defeats the purpose of presenting a unified interface.


See the thread "s5 properties again" for discussion for a new design 
that avoids these disadvantages.

-- 
[ Peter Amstutz ][ [EMAIL PROTECTED] [EMAIL PROTECTED]
[Lead Programmer][Interreality Project][Virtual Reality for the Internet]
[ VOS: Next Generation Internet Communication][ http://interreality.org ]
[ http://interreality.org/~tetron ][ pgpkey:  pgpkeys.mit.edu  18C21DF7 ]



signature.asc
Description: Digital signature
___
vos-d mailing list
vos-d@interreality.org
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


Re: [vos-d] s5 properties again

2008-05-03 Thread Peter Amstutz
On Sat, May 03, 2008 at 09:00:30AM +, Lalo Martins wrote:
> 
> For me this kills it.  How much do you estimate it would set you back?  
> And is what's wrong with the current design serious enough to justify 
> this time?  A good yardstick for that is: is the new design sufficiently 
> better that, if you stop now to implement it, you'll still have gone as 
> far by end of this year as you would if you don't?

I know, that's why I wanted to get input from everyone first.

The original reason I even got on this track was that in the process of 
designing serialization and marshaling for getters and setters, I 
realized the old tentative design created a number of problems I 
couldn't resolve, which caused development to hit a brick wall.  I 
actually have a long email I wrote last week outlining the problems in 
great detail, I didn't send it then but I will do so now.

> *IF* you really think it's worth it, then I'm willing to discuss the 
> details; but I think before we even get to that, it would be good to 
> discuss whether a project of this magnitude is worth considering at all.

Well, at the moment I'm in a bind one way or the other, since I can't 
proceed without resolving this impass.

-- 
[ Peter Amstutz ][ [EMAIL PROTECTED] [EMAIL PROTECTED]
[Lead Programmer][Interreality Project][Virtual Reality for the Internet]
[ VOS: Next Generation Internet Communication][ http://interreality.org ]
[ http://interreality.org/~tetron ][ pgpkey:  pgpkeys.mit.edu  18C21DF7 ]



signature.asc
Description: Digital signature
___
vos-d mailing list
vos-d@interreality.org
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


Re: [vos-d] s5 properties again

2008-05-03 Thread Lalo Martins
Also spracht Peter Amstutz (Thu, 01 May 2008 22:31:03 -0400):
>  - It's going back to the drawing board (again) (not completely, but it
> does mean some work redesigning the VOS APIs, the XOD format, changing
> the code generator, etc)

For me this kills it.  How much do you estimate it would set you back?  
And is what's wrong with the current design serious enough to justify 
this time?  A good yardstick for that is: is the new design sufficiently 
better that, if you stop now to implement it, you'll still have gone as 
far by end of this year as you would if you don't?

*IF* you really think it's worth it, then I'm willing to discuss the 
details; but I think before we even get to that, it would be good to 
discuss whether a project of this magnitude is worth considering at all.

best,
   Lalo Martins
-- 
  So many of our dreams at first seem impossible,
   then they seem improbable, and then, when we
   summon the will, they soon become inevitable.
   -
  http://lalomartins.info/
GNU: never give up freedom  http://www.gnu.org/


___
vos-d mailing list
vos-d@interreality.org
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d