My application has several nested data structures.
struct Contact : LWW {
RGA<Char> name;
}
struct Note : LWW {
RGA<Char> text;
}
Types Contact and Note form their own collections.
I. e. objects of Note may belong to the Note collection only,
and not any other collection.
We don't have such thing as RGA-per-field,
so we have to store RGA fields as separate objects inside parent frames
(chunks?) like this:
*lww #1 @1 :0 'Contact' 'name' >2 !
*rga #2 @3 :0 !
@4 'c' ,
*lww #5 @5 :0 'Note' 'text' >6 !
*rga #6 @7 :0 !
@8 'd' ,
Consider an op adding a character to the field Note.text of the note #5.
How to route this op to the collection Note and object #5?
Bad solution: keep index from sub-object ids to their parent objects and collections. This is wrong because requires actions to calculate information that is already calculated.
We need a way to supply raw ops (and reduced chunks, maybe, too) with routing information.
My application has several nested data structures.
Types
ContactandNoteform their own collections.I. e. objects of
Notemay belong to theNotecollection only,and not any other collection.
We don't have such thing as RGA-per-field,
so we have to store RGA fields as separate objects inside parent frames
(chunks?) like this:
Consider an op adding a character to the field
Note.textof the note#5.How to route this op to the collection
Noteand object#5?Bad solution: keep index from sub-object ids to their parent objects and collections. This is wrong because requires actions to calculate information that is already calculated.
We need a way to supply raw ops (and reduced chunks, maybe, too) with routing information.