Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Triple Store Data StructureProsConsComments
doubly linked list+ all updates effect at most 3 items (i.e., prev, current, and next)- requires traversal of links during fetch (i.e. fetch each item individually - one query for each item) 
doubly linked list + order index+ much faster fetch retrieving all items in the range with a single querya range (i.e., single query gets all items)- adding/removing items from list can be very slow when item is early in the list (worst case touches all list items) 

...

In-memory Data StructureProsConsComments
doubly linked list+ least amount of processing during fetch (probably not significant relative to overall processing required)- iteration requires traversing next links 
convert to array on fetch

+ allows for fast access by position to loaded items
+ faster iteration than traversing next links (may not be significant)

  
convert to hash on fetch+ allows for fast fast access by proxy URI to loaded items- iteration requires traversing next links

I anticipate the need to have direct access by proxy URI more than positional.

 

 

...

List Header Info

Lists with headers will hold the following informationThe list header info will be a hash.  It holds information about the list as a whole and the currently loaded range of items as a sub-structure.  The values for the list information stored depends on the type of the loaded items sub-structure.  The loaded items sub-structure holds items as a group are in-memory using one of four possible grouping methods: doubly linked lists, doubly linked lists + order index, array, or hash with proxy URI as the key.  NOTE: Order index is global to the entire list.  The array and hash implementations may also have this global order index information stored with the item info.

 

  example value typesComments
keydescription of valuedoubly
linked
doubly
linked
+ order
arrayhash 
firstpointer to first item in listURI of first proxyURI of first proxyURI of first proxyURI of first proxy 
lastpointer to last item in listURI of last proxyURI of last proxyURI of last proxyURI of last proxy 
countcount of all items in listXXXXlast.indexlast.indexlast.indexCount for full list is available for array and hash when order index is stored in triplestore. 
first_loadedpointer to first item in loaded range of itemsitemitemarray[0]URI of
first loaded proxy
 
currentpointer to current itemitemitemint cposURI of
current proxy
  • points to first item on fetch
  • updated to next/prev item during traversal
  • points to last modified item when changes are made
 
last_loadedpointer to last item in loaded range of itemsitemitemarray[size of array]URI of
last loaded proxy
 
count_loadedcount of items in currently loaded rangeX=position of last
- position of first
size of arraysize of hash 
resume_tokenpointer to item after last_loadedURI of proxyURI of proxyURI of proxyURI of proxy 
loaded_itemspointer to loaded itemsuse first_loadeduse first_loadedarrayhash 

 

List Item Info

Each item's info is stored in a hash.  It holds information about the individual item.  The loaded items as a group are in-memory using one of four possible grouping methods: doubly linked lists, doubly linked lists + order index, array, or hash with proxy URI as the key.

  example value types 
keydescription of valuedoubly
linked
doubly
linked
+ order
arrayhashComments
uriURI of proxy for this itemURI of this proxyURI of this proxyURI of this proxyURI of this proxyThis is the hash key for loaded_items when the list is implemented as a hash.
prevpointer to previous item in listURI of prev proxyURI of prev proxy= p - 1URI of prev proxy 
nextpointer to next item in listURI of next proxyURI of next proxy= p + 1URI of next proxy 
prev_loadedpointer to previous item in loaded range of itemsprev itemprev item= pl - 1URI of prev proxy 
next_loadedpointer to next item in loaded range of itemsnext itemnext item= pl + 1URI of next proxy 
proxyForURI of list item being aggregatedURIURIURIURI 
proxyInURI of list aggregationURI of
aggregation
URI of
aggregation
URI of
aggregation
URI of
aggregation
 
proxyIn_loadedpointer to List Headerheaderheaderheaderheader 
position (p)position in full listXppXpPosition in full list is available for array and hash when order index is stored in triplestore. 
position_loaded (pl)position in loaded range of itemsXplplX 

...