Versions Compared

Key

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

...

Data Structure Approaches

 

 

singly NONOSLOWSLOWSLOWSLOWNOSLOWNOSLOW  header info + convert to array on fetch                                                          
  In-memory Processing   
Triple Store Data StructureIn-memory Data StructureDirect
access
at
loaded
position
Direct
access
URI as ID
(pre-loaded)
Iteration
foward

Iteration
backward

Append
after
last
loaded

Append
after
global
last
Insert
after
loaded
item
Insert
before
loaded
item
Insert
after
loaded
position
Insert
before
loaded
position
Delete
loaded
item
Delete
from
loaded
position
Fetch
one by
global
position

Fetch
one by URI

Fetch
range
Fetch
next
range
Persist
one at
global
position
Persist
one by
URI
Persist
range
List
size
IssuesORE ComplianceComments
singly doubly linked list                        
 doubly linked listNOSLOWFASTFASTFASTFASTFASTFASTNONOFASTNONOFASTSLOWSLOWNOFASTSLOWNO   
 convert to array on fetchFASTSLOWFASTFASTFASTFASTFASTFASTFASTFASTFASTFASTNOFASTSLOWSLOWNOFASTSLOWNO   
 convert to hash (key=proxy URI) on fetchNOFASTFASTFASTFASTFASTFASTFASTNONOFASTNONOFASTSLOWSLOWNOFASTSLOWNO   header info + singly linked list                      
 header info + convert to array on fetch                      
 header info + convert to hash (URI key) on fetch                      
singly linked list + order index                       
 singly linked listNO                     
 convert to array on fetch                      
 convert to hash (URI key) on fetch                      
 header info + singly linked list       doubly linked list + order index                        
             
 header info + convert to hash (URI key) on fetch                      
doubly linked listSLOWSLOWFASTFASTSLOWSLOWSLOWSLOWSLOWSLOWSLOWSLOWSLOWFASTSLOWSLOWSLOWFAST      doubly linked list                  SLOWFAST   
 convert to array on fetchFASTSLOWFASTFASTSLOWSLOWSLOWSLOWSLOWSLOWSLOWSLOWSLOWFASTSLOWSLOWSLOWFASTSLOWFAST   
 convert to hash (key=proxy URI key) on fetchSLOWFASTFASTFASTSLOWSLOWSLOWSLOWSLOWSLOWSLOWSLOWSLOWFASTSLOWSLOWSLOWFASTSLOWFAST   header info + singly linked list                      
 header info + convert to array on fetch                      
 header info + convert to hash (URI key) on fetch                      
doubly linked list + order index                       
 doubly linked list                      
 convert to array on fetch                      
 convert to hash (URI key) on fetch                      
 header info + singly linked list                      
 header info + convert to array on fetch                      
 header info + convert to hash (URI key) on fetch                      

 

NOTE: All operations are available by adding order index to each proxy for the list as a triple in the triplestore, but most operations that change the list become very slow as it requires updates to all items after the effected item.  Delete could be made fast be allowing for missing index values, but then list size becomes a slow operation.

List Header Info

Lists with headers will hold the following information.

 

singly
linkedXXXURI of proxy
  example value typesComments
keydescription of valuesingly
linked
+ orderdoubly
linked
doubly
linked
+ order
arrayhash 
firstpointer to first item in listURI of first proxyURI of first proxyURI of first proxyURI of first proxyURI of first proxyURI of first proxy 
lastpointer to last item in list XURI of last proxyURI of last proxyURI of last proxyURI of last proxy 
countcount of all items in listXXXXX 
first_loadedpointer to first item in loaded range of itemsitemitemarray[0]URI of
first loaded proxy
 
currentpointer to current itemitemitemarray[0]int cposURI of
current proxy
 
last_loadedpointer to last item in loaded range of itemsXitemitemarray[size of array]URI of
last loaded proxy
 
count_loadedcount of items in currently loaded rangeXXX=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 proxyURI of proxy 
loaded_itemspointer to loaded itemsuse first_loadeduse first_loadeduse first_loadeduse first_loadedarrayhash 

 

List Item Info

singly
linked
+ orderXnext itemheaderXpl
  example value types 
keydescription of valuesingly
linked
doubly
linked
doubly
linked
+ order
arrayhashComments
uriURI of proxy for this itemURI of this proxyURI of this proxyURI 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 listXXURI of prev proxyURI of prev proxy= p - 1URI of prev proxy 
nextpointer to next item in listURI of next proxyURI of next proxyURI of next proxyURI of next proxy= p + 1URI of next proxy 
prev_loadedpointer to previous item in loaded range of itemsXprev itemprev item= pl - 1URI of prev proxy 
next_loadedpointer to next item in loaded range of itemsnext itemnext itemnext item= pl + 1URI of next proxy 
proxyForURI of list item being aggregatedURIURIURIURIURIURI 
proxyInURI of list aggregationURI of
aggregation
URI of
aggregation
URI of
aggregation
URI of
aggregation
URI of
aggregation
URI of
aggregation
 
proxyIn_loadedpointer to List Headerheaderheaderheaderheaderheader 
position (p)position in full listXpppX 
position_loaded (pl)position in loaded range of itemsXXplplX 

 

 

...