You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by Marko Rodriguez <ok...@gmail.com> on 2019/06/04 18:08:57 UTC

The Many Roles of the mm-ADT Reference

Hi,

I’m starting to realize that mm-ADT references serve various purposes. There are so many of these that a classification is emerging.

pointer reference     : used to create complex objects within the primary structure (vertex->edge->vertex).
proxy reference       : used to manipulate a referent by manipulating the proxy (detached vertices).
sequence reference    : used to denote an entire cursor iteration (aggregate reasoning).
subset reference      : used to reference a subset of the parent reference’s referents (indices)
function reference    : used to evaluate an instruction outside the processor (SUM,COUNT,GROUP BY access).
broadcast reference   : used to duplicate data manipulation instructions (denormalization/view management).
stall reference       : used to consume a run of no-op instructions (schema inferencing).
terminal reference    : used to completely stall out the processor (purely conceptual — like identity instruction).






####################################################################################################
####################################################################################################


Below are some examples demonstrating how sequence references and proxy references are used in practice.





[db][values,people] -> person{10000}
  // pass by value and 10000 person records are fetched from the db as a big ‘ol sequence. (materialized)
[db][&values,people] -> &person{10000}*
  // pass by reference and 10000 person records are referred to in the db. (non-materialized)
[db][&values,people][count] -> 10000 
  // no dereference required as the sequence reference’s referent quantifier has the count.
[db][&values,people][value,name] -> … 
  // requires a double dereference as the proxy references don’t have [name:x] data in their referent patterns.
[db][&values,people][update,name,human] -> … 
  // manipulates the base referent as a proxy is a pass by reference.





	
[db][&values,people,[name:@string]] -> &person[name:@string]{10000}
  // all proxy references are semi-populated with their name data.
[db][&values,people,[name:@string]][value,name] -> … 
  // no dereferencing is required at [value,name].
[db][&values,people,[name:@string]][value,age] -> … 
  // dereferencing is required at [value,age] as the proxies don’t have age data.

	
Pretty neat, eh?

Marko.

http://rredux.com <http://rredux.com/>