SlideShare a Scribd company logo
1 of 12
Hierarchy Requirements
Charles Severance
Sakai Project
Overall Concepts
• Sakai must handle a number of elements in a
hierarchical fashion:
– Site Hierarchy
• Sites are organized in a logical fashion
– /2004/fall/eng/ee123
• There can be sub-sites within sites
– /2004/fall/eng/ee123
– Qualifier Hierarchy
• When looking at permissions on objects, permissions can be
inherited from something higher up the hierarchy
– Departmental admin has full privileges at /2004/fall/eng - this
implies that they have full privileges at /2004/fall/eng/ee123
– Group Hierarchy
• Groups can be members of other groups
General Navigation
• One must be able to start at the top of the
hierarchy and navigate up and down. At any
level, the user can see the children and navigate to
a child, or navigate upward to parents.
• The hierarchy will not be part of the navigation,
but it will be shown in the URL as the user
navigates through sites.
• Users will be able to type in the url
– http://stellar2.mit.edu/site/2004/fall/eng/eng123/
– Will navigate the portal to that site - acts as a bookmark
to the site.
Sub Groups
• There are a number of places where tools need to know about sub-
sites. For example a course site has a bunch of small groups
associated with it. The instructor wants to make an announcement and
“push” it to some or all of the sub-sites - the instructor needs a set of
checkboxes to indicate which of the subgroups will get the pushed
content. Code is necessary to give the tool the list of sub-sites so that
the tool can display it.
• Note that this implies the list of subsites that the user can perform the
desired operation on so the complete question which must be asked is:
– Give me the list of sites below this site for which the logged in person has
the “announce.create” function.
• A generalization of this is to say - show me all of the sites that the
current logged in person has “read” permission.
Needed Methods
• getImmediateParents, getImmediateChildren
– This is used for upwards and downwards navigation. This is
simple because it only needs the adjacency matrix. These methods
exist in the Hieratcy OSID.
• getAllImportantParents
– This is what makes inheritance work - this is a performance
critical operation. (See the sub-select discussion) - the Hierarchy
OSID does not explicitly define this - because there is no sense of
the “special” parents. If this is a requirement, then API methods
will be necessary to check, set, and update the “important parent”.
• resolvePath
– Quickly lookup a path within the hierarchy - the Hierarchy OSID
does not specify this but it is a very common operation and must
perform well.
… Methods
• getAllChildrenRecursively
– This is likely needed - but it is not clear what the requirement
really is here. Perhaps this is better viewed as the following.
• getAllChildrenRecursivelyResolvingLinks
– This would follow any soft links (assuming that we do soft links) -
This concept is present in the Hierarchy OSID if we choose to
interpret it in a particular way
• addSoftParent, addHardParent
– If we choose to support it, we need to differentiate the adding of
soft and hard parents and define the sematics therein. This will
also cause getSoftParents, getHardChildren, and then recursive
and non-recursive variants.
Multiple Parents
• There is a lot of discussion of the need for multiple parents
- the common use case is for cross-listed courses. There
are important issues here though:
– Does a cross-listed course, inherit permissions equally from all
parents? So if a course is both Engineering and Science, can both
administrators have access - if not this implies that some parents
are more parental than others.
• Multi-parent can have some performance implications and
limits the SQL optimization which can be done because
code must operate in loops which can be infinite. This
causes many SQL transactions for one lookup or an
inheritance question.
Multi-Parent Link Type
– One possible approach is to take the UNIX file system approach
and treat the second and following parent links as soft links. This
raises its own set of issues.
• Soft links are only a navigation mechanism - permissions inherit
across the hard-link only - UNIX like
• What if the hard-link is severed and the node is deleted? Do the soft
links hang out pointing to nothing or are they cleaned up? (probably
cleaned up)
• Are softlinks to “iNode” or to a path? UNIX chose path.
• How do we handle loops in soft links? UNIX decided to limit the
number of soft links traversed to some number - 64 or less usually.
– Hard links can work - (iNode only)
• Is there (one or several) primary parents? Is there a priority order?
• If there is one primary link which controls inheritance and it is
removed, which of the secondary links is “promoted” and takes over
control of the inheritance? It would be nice for a human to make this
decision and not code..
Performance
• Performance is a critical requirement - often these
hierarchy lookups are a large part of the DB load
of an application.
– It is not practical to cache the structure - There will be
Sakai installations with 200K sites and each site may
have several thousand files in a hierarchy.
– It may not even be practical to have a single hierarchy -
there may need to be a federated hierarchy of
hierarchies.
– Many of these algorithms are “n-squared” on insert
because insert triggers some reorganization.
Need for SubSelect
• To truly gain ultimate performance it is important that the lookup
operations produce a simple list of hierarchy ids so that this list can be
used in a sub-select for another table (such as a join between a
resource hierarchy and a group hierarchy and a role hierarchy)
• This can be either done by retrieving large collections from all three of
these separate places and doing an n-cubed iteration through the large
collections (especially in the case with users with lots of permission
power) or do it in a single join reducing the data to that which is to be
displayed within the database.
• So if work select work is done in stored procedures - they must accept
parameters and return ID lists like a standard select.
Common Implementation
Approaches
• Straight parent - child structure
– Insert is quite fast, lookup is loop-based with an SQL transaction to
descend each level
• Transitive closure of parent child
– On insert, traverse upwards and add direct parent - child links for all
parents “above” the child.
– This ends up with NlogN data, but insert is log N and lookup is log N.
– Often done with stored procedures or looping SQL
• Specific Database Extensions
– Oracle has such extensions - does this handle multi-rooted?
• Overlapping sets
– Based on maintaining pre-order numbering of nodes
– N-Squared on insert, log N on lookup. Data is order-N
– Insert performance suffers on large hierarchies.
Implementation Questions
• How do we get lookup to operate in less than
LogN SQL transactions?
– Generally the answer is to have an auxiliary table with
the fully-realized path to each node, so that a WHERE
lookup can be done.
– This is fun when there are multiple roots because it
means that there are multiple paths to an iNode.
Understand that this is an NLogN data issue much like
the de-normalized parent relationship.

More Related Content

What's hot

Skillwise - Advanced web application development
Skillwise - Advanced web application developmentSkillwise - Advanced web application development
Skillwise - Advanced web application developmentSkillwise Group
 
Where the &$%! did this come from e resources in alma%2-f_primo a teachi...
Where the &$%! did this come from  e resources in alma%2-f_primo a teachi...Where the &$%! did this come from  e resources in alma%2-f_primo a teachi...
Where the &$%! did this come from e resources in alma%2-f_primo a teachi...Martin Patrick
 
C# Framework class library
C# Framework class libraryC# Framework class library
C# Framework class libraryPrem Kumar Badri
 
Onion Architecture / Clean Architecture
Onion Architecture / Clean ArchitectureOnion Architecture / Clean Architecture
Onion Architecture / Clean ArchitectureAttila Bertók
 

What's hot (8)

Skillwise - Advanced web application development
Skillwise - Advanced web application developmentSkillwise - Advanced web application development
Skillwise - Advanced web application development
 
Springs_Training
Springs_TrainingSprings_Training
Springs_Training
 
Where the &$%! did this come from e resources in alma%2-f_primo a teachi...
Where the &$%! did this come from  e resources in alma%2-f_primo a teachi...Where the &$%! did this come from  e resources in alma%2-f_primo a teachi...
Where the &$%! did this come from e resources in alma%2-f_primo a teachi...
 
Laravel
LaravelLaravel
Laravel
 
Dev381.Pp
Dev381.PpDev381.Pp
Dev381.Pp
 
C# Framework class library
C# Framework class libraryC# Framework class library
C# Framework class library
 
Onion Architecture / Clean Architecture
Onion Architecture / Clean ArchitectureOnion Architecture / Clean Architecture
Onion Architecture / Clean Architecture
 
SharePoint 2013 - What's New
SharePoint 2013 - What's NewSharePoint 2013 - What's New
SharePoint 2013 - What's New
 

Similar to Hierarchy requirements

Lucene Bootcamp - 2
Lucene Bootcamp - 2Lucene Bootcamp - 2
Lucene Bootcamp - 2GokulD
 
Database 12c is ready for you... Are you ready for 12c?
Database 12c is ready for you... Are you ready for 12c?Database 12c is ready for you... Are you ready for 12c?
Database 12c is ready for you... Are you ready for 12c?Performance Tuning Corporation
 
Scalability andefficiencypres
Scalability andefficiencypresScalability andefficiencypres
Scalability andefficiencypresNekoGato
 
How Lucene Powers the LinkedIn Segmentation and Targeting Platform
How Lucene Powers the LinkedIn Segmentation and Targeting PlatformHow Lucene Powers the LinkedIn Segmentation and Targeting Platform
How Lucene Powers the LinkedIn Segmentation and Targeting PlatformHien Luu
 
Recent Additions to Lucene Arsenal
Recent Additions to Lucene ArsenalRecent Additions to Lucene Arsenal
Recent Additions to Lucene Arsenallucenerevolution
 
Storage Systems For Scalable systems
Storage Systems For Scalable systemsStorage Systems For Scalable systems
Storage Systems For Scalable systemselliando dias
 
Csld phan tan va song song
Csld phan tan va song songCsld phan tan va song song
Csld phan tan va song songLê Anh Trung
 
Jose portillo dev con presentation 1138
Jose portillo   dev con presentation 1138Jose portillo   dev con presentation 1138
Jose portillo dev con presentation 1138Jose Portillo
 
Lessons from a Dying CMS
Lessons from a Dying CMSLessons from a Dying CMS
Lessons from a Dying CMSSandy Smith
 
2009 training - tim m - object oriented programming
2009   training - tim m - object oriented programming2009   training - tim m - object oriented programming
2009 training - tim m - object oriented programmingTim Mahy
 
Augmenting Big Data Analytics with Nirvana
Augmenting Big Data Analytics with NirvanaAugmenting Big Data Analytics with Nirvana
Augmenting Big Data Analytics with NirvanaIgor Sfiligoi
 
How to Build Deep Learning Models
How to Build Deep Learning ModelsHow to Build Deep Learning Models
How to Build Deep Learning ModelsJosh Patterson
 
Scalability Considerations
Scalability ConsiderationsScalability Considerations
Scalability ConsiderationsNavid Malek
 
Addressing scalability challenges in peer-to-peer search
Addressing scalability challenges in peer-to-peer searchAddressing scalability challenges in peer-to-peer search
Addressing scalability challenges in peer-to-peer searchHarisankar H
 

Similar to Hierarchy requirements (20)

Dal deck
Dal deckDal deck
Dal deck
 
Lucene Bootcamp - 2
Lucene Bootcamp - 2Lucene Bootcamp - 2
Lucene Bootcamp - 2
 
LDV.pptx
LDV.pptxLDV.pptx
LDV.pptx
 
Database 12c is ready for you... Are you ready for 12c?
Database 12c is ready for you... Are you ready for 12c?Database 12c is ready for you... Are you ready for 12c?
Database 12c is ready for you... Are you ready for 12c?
 
Scalability andefficiencypres
Scalability andefficiencypresScalability andefficiencypres
Scalability andefficiencypres
 
How Lucene Powers the LinkedIn Segmentation and Targeting Platform
How Lucene Powers the LinkedIn Segmentation and Targeting PlatformHow Lucene Powers the LinkedIn Segmentation and Targeting Platform
How Lucene Powers the LinkedIn Segmentation and Targeting Platform
 
Recent Additions to Lucene Arsenal
Recent Additions to Lucene ArsenalRecent Additions to Lucene Arsenal
Recent Additions to Lucene Arsenal
 
Storage Systems For Scalable systems
Storage Systems For Scalable systemsStorage Systems For Scalable systems
Storage Systems For Scalable systems
 
Csld phan tan va song song
Csld phan tan va song songCsld phan tan va song song
Csld phan tan va song song
 
Jose portillo dev con presentation 1138
Jose portillo   dev con presentation 1138Jose portillo   dev con presentation 1138
Jose portillo dev con presentation 1138
 
Exception & Database
Exception & DatabaseException & Database
Exception & Database
 
Lessons from a Dying CMS
Lessons from a Dying CMSLessons from a Dying CMS
Lessons from a Dying CMS
 
2009 training - tim m - object oriented programming
2009   training - tim m - object oriented programming2009   training - tim m - object oriented programming
2009 training - tim m - object oriented programming
 
L17 Data Source Layer
L17 Data Source LayerL17 Data Source Layer
L17 Data Source Layer
 
Augmenting Big Data Analytics with Nirvana
Augmenting Big Data Analytics with NirvanaAugmenting Big Data Analytics with Nirvana
Augmenting Big Data Analytics with Nirvana
 
LDV-v2.pptx
LDV-v2.pptxLDV-v2.pptx
LDV-v2.pptx
 
How to Build Deep Learning Models
How to Build Deep Learning ModelsHow to Build Deep Learning Models
How to Build Deep Learning Models
 
Scalability Considerations
Scalability ConsiderationsScalability Considerations
Scalability Considerations
 
NoSql
NoSqlNoSql
NoSql
 
Addressing scalability challenges in peer-to-peer search
Addressing scalability challenges in peer-to-peer searchAddressing scalability challenges in peer-to-peer search
Addressing scalability challenges in peer-to-peer search
 

More from Charles Severance

LTI Advantage: The Next Big Thing in LMS Integration
LTI Advantage: The Next Big Thing in LMS IntegrationLTI Advantage: The Next Big Thing in LMS Integration
LTI Advantage: The Next Big Thing in LMS IntegrationCharles Severance
 
Building the NGDLE with Tsugi (次) and Koseu(코스)
Building the NGDLE with Tsugi (次) and Koseu(코스)Building the NGDLE with Tsugi (次) and Koseu(코스)
Building the NGDLE with Tsugi (次) and Koseu(코스)Charles Severance
 
Exploring the Next Generation Digital Learning Ecosystem
Exploring the Next Generation Digital Learning EcosystemExploring the Next Generation Digital Learning Ecosystem
Exploring the Next Generation Digital Learning EcosystemCharles Severance
 
Exploring the Next Generation Digital Learning Environment with Tsugi
Exploring the Next Generation Digital Learning Environment with TsugiExploring the Next Generation Digital Learning Environment with Tsugi
Exploring the Next Generation Digital Learning Environment with TsugiCharles Severance
 
Building the Next Generation Teaching and Learning Environment with Tsugi (次)
Building the Next Generation Teaching and Learning Environment with Tsugi (次)Building the Next Generation Teaching and Learning Environment with Tsugi (次)
Building the Next Generation Teaching and Learning Environment with Tsugi (次)Charles Severance
 
Beyond MOOCs: Open Education at Scale
Beyond MOOCs: Open Education at ScaleBeyond MOOCs: Open Education at Scale
Beyond MOOCs: Open Education at ScaleCharles Severance
 
Building the Next Generation Teaching and Learning Environment
Building the Next Generation Teaching and Learning EnvironmentBuilding the Next Generation Teaching and Learning Environment
Building the Next Generation Teaching and Learning EnvironmentCharles Severance
 
CloudSocial: A New Approach to Enabling Open Content for Broad Reuse
CloudSocial: A New Approach to Enabling Open Content for Broad ReuseCloudSocial: A New Approach to Enabling Open Content for Broad Reuse
CloudSocial: A New Approach to Enabling Open Content for Broad ReuseCharles Severance
 
Next Generation Teaching and Learning
Next Generation Teaching and LearningNext Generation Teaching and Learning
Next Generation Teaching and LearningCharles Severance
 
Next Generation Teaching and Learning
Next Generation Teaching and LearningNext Generation Teaching and Learning
Next Generation Teaching and LearningCharles Severance
 
A View on the Future of Sakai
A View on the Future of SakaiA View on the Future of Sakai
A View on the Future of SakaiCharles Severance
 
The Next Generation of Teaching and Learning Tools
The Next Generation of Teaching and Learning ToolsThe Next Generation of Teaching and Learning Tools
The Next Generation of Teaching and Learning ToolsCharles Severance
 
Standards to Enable an Open Learning Ecosystem
Standards to Enable an Open Learning EcosystemStandards to Enable an Open Learning Ecosystem
Standards to Enable an Open Learning EcosystemCharles Severance
 
Updated Version: Tsugi Overview
Updated Version: Tsugi OverviewUpdated Version: Tsugi Overview
Updated Version: Tsugi OverviewCharles Severance
 
Standards Update: Apereo 2015
Standards Update: Apereo 2015Standards Update: Apereo 2015
Standards Update: Apereo 2015Charles Severance
 
Apereo 2015: The State of Sakai
Apereo 2015: The State of SakaiApereo 2015: The State of Sakai
Apereo 2015: The State of SakaiCharles Severance
 
The Trials and Tribulations of Predicting the Future of Educational Technology
The Trials and Tribulations of Predicting the Future of Educational TechnologyThe Trials and Tribulations of Predicting the Future of Educational Technology
The Trials and Tribulations of Predicting the Future of Educational TechnologyCharles Severance
 
MOOCs – The Future Is Getting Clearer
MOOCs – The Future Is Getting ClearerMOOCs – The Future Is Getting Clearer
MOOCs – The Future Is Getting ClearerCharles Severance
 
Programming for Everybody in Python
Programming for Everybody in PythonProgramming for Everybody in Python
Programming for Everybody in PythonCharles Severance
 

More from Charles Severance (20)

LTI Advantage: The Next Big Thing in LMS Integration
LTI Advantage: The Next Big Thing in LMS IntegrationLTI Advantage: The Next Big Thing in LMS Integration
LTI Advantage: The Next Big Thing in LMS Integration
 
Building the NGDLE with Tsugi (次) and Koseu(코스)
Building the NGDLE with Tsugi (次) and Koseu(코스)Building the NGDLE with Tsugi (次) and Koseu(코스)
Building the NGDLE with Tsugi (次) and Koseu(코스)
 
Exploring the Next Generation Digital Learning Ecosystem
Exploring the Next Generation Digital Learning EcosystemExploring the Next Generation Digital Learning Ecosystem
Exploring the Next Generation Digital Learning Ecosystem
 
Exploring the Next Generation Digital Learning Environment with Tsugi
Exploring the Next Generation Digital Learning Environment with TsugiExploring the Next Generation Digital Learning Environment with Tsugi
Exploring the Next Generation Digital Learning Environment with Tsugi
 
Building the Next Generation Teaching and Learning Environment with Tsugi (次)
Building the Next Generation Teaching and Learning Environment with Tsugi (次)Building the Next Generation Teaching and Learning Environment with Tsugi (次)
Building the Next Generation Teaching and Learning Environment with Tsugi (次)
 
Beyond MOOCs: Open Education at Scale
Beyond MOOCs: Open Education at ScaleBeyond MOOCs: Open Education at Scale
Beyond MOOCs: Open Education at Scale
 
Building the Next Generation Teaching and Learning Environment
Building the Next Generation Teaching and Learning EnvironmentBuilding the Next Generation Teaching and Learning Environment
Building the Next Generation Teaching and Learning Environment
 
CloudSocial: A New Approach to Enabling Open Content for Broad Reuse
CloudSocial: A New Approach to Enabling Open Content for Broad ReuseCloudSocial: A New Approach to Enabling Open Content for Broad Reuse
CloudSocial: A New Approach to Enabling Open Content for Broad Reuse
 
Next Generation Teaching and Learning
Next Generation Teaching and LearningNext Generation Teaching and Learning
Next Generation Teaching and Learning
 
Next Generation Teaching and Learning
Next Generation Teaching and LearningNext Generation Teaching and Learning
Next Generation Teaching and Learning
 
The Game of MOOCs
The Game of MOOCsThe Game of MOOCs
The Game of MOOCs
 
A View on the Future of Sakai
A View on the Future of SakaiA View on the Future of Sakai
A View on the Future of Sakai
 
The Next Generation of Teaching and Learning Tools
The Next Generation of Teaching and Learning ToolsThe Next Generation of Teaching and Learning Tools
The Next Generation of Teaching and Learning Tools
 
Standards to Enable an Open Learning Ecosystem
Standards to Enable an Open Learning EcosystemStandards to Enable an Open Learning Ecosystem
Standards to Enable an Open Learning Ecosystem
 
Updated Version: Tsugi Overview
Updated Version: Tsugi OverviewUpdated Version: Tsugi Overview
Updated Version: Tsugi Overview
 
Standards Update: Apereo 2015
Standards Update: Apereo 2015Standards Update: Apereo 2015
Standards Update: Apereo 2015
 
Apereo 2015: The State of Sakai
Apereo 2015: The State of SakaiApereo 2015: The State of Sakai
Apereo 2015: The State of Sakai
 
The Trials and Tribulations of Predicting the Future of Educational Technology
The Trials and Tribulations of Predicting the Future of Educational TechnologyThe Trials and Tribulations of Predicting the Future of Educational Technology
The Trials and Tribulations of Predicting the Future of Educational Technology
 
MOOCs – The Future Is Getting Clearer
MOOCs – The Future Is Getting ClearerMOOCs – The Future Is Getting Clearer
MOOCs – The Future Is Getting Clearer
 
Programming for Everybody in Python
Programming for Everybody in PythonProgramming for Everybody in Python
Programming for Everybody in Python
 

Recently uploaded

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 

Recently uploaded (20)

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 

Hierarchy requirements

  • 2. Overall Concepts • Sakai must handle a number of elements in a hierarchical fashion: – Site Hierarchy • Sites are organized in a logical fashion – /2004/fall/eng/ee123 • There can be sub-sites within sites – /2004/fall/eng/ee123 – Qualifier Hierarchy • When looking at permissions on objects, permissions can be inherited from something higher up the hierarchy – Departmental admin has full privileges at /2004/fall/eng - this implies that they have full privileges at /2004/fall/eng/ee123 – Group Hierarchy • Groups can be members of other groups
  • 3. General Navigation • One must be able to start at the top of the hierarchy and navigate up and down. At any level, the user can see the children and navigate to a child, or navigate upward to parents. • The hierarchy will not be part of the navigation, but it will be shown in the URL as the user navigates through sites. • Users will be able to type in the url – http://stellar2.mit.edu/site/2004/fall/eng/eng123/ – Will navigate the portal to that site - acts as a bookmark to the site.
  • 4. Sub Groups • There are a number of places where tools need to know about sub- sites. For example a course site has a bunch of small groups associated with it. The instructor wants to make an announcement and “push” it to some or all of the sub-sites - the instructor needs a set of checkboxes to indicate which of the subgroups will get the pushed content. Code is necessary to give the tool the list of sub-sites so that the tool can display it. • Note that this implies the list of subsites that the user can perform the desired operation on so the complete question which must be asked is: – Give me the list of sites below this site for which the logged in person has the “announce.create” function. • A generalization of this is to say - show me all of the sites that the current logged in person has “read” permission.
  • 5. Needed Methods • getImmediateParents, getImmediateChildren – This is used for upwards and downwards navigation. This is simple because it only needs the adjacency matrix. These methods exist in the Hieratcy OSID. • getAllImportantParents – This is what makes inheritance work - this is a performance critical operation. (See the sub-select discussion) - the Hierarchy OSID does not explicitly define this - because there is no sense of the “special” parents. If this is a requirement, then API methods will be necessary to check, set, and update the “important parent”. • resolvePath – Quickly lookup a path within the hierarchy - the Hierarchy OSID does not specify this but it is a very common operation and must perform well.
  • 6. … Methods • getAllChildrenRecursively – This is likely needed - but it is not clear what the requirement really is here. Perhaps this is better viewed as the following. • getAllChildrenRecursivelyResolvingLinks – This would follow any soft links (assuming that we do soft links) - This concept is present in the Hierarchy OSID if we choose to interpret it in a particular way • addSoftParent, addHardParent – If we choose to support it, we need to differentiate the adding of soft and hard parents and define the sematics therein. This will also cause getSoftParents, getHardChildren, and then recursive and non-recursive variants.
  • 7. Multiple Parents • There is a lot of discussion of the need for multiple parents - the common use case is for cross-listed courses. There are important issues here though: – Does a cross-listed course, inherit permissions equally from all parents? So if a course is both Engineering and Science, can both administrators have access - if not this implies that some parents are more parental than others. • Multi-parent can have some performance implications and limits the SQL optimization which can be done because code must operate in loops which can be infinite. This causes many SQL transactions for one lookup or an inheritance question.
  • 8. Multi-Parent Link Type – One possible approach is to take the UNIX file system approach and treat the second and following parent links as soft links. This raises its own set of issues. • Soft links are only a navigation mechanism - permissions inherit across the hard-link only - UNIX like • What if the hard-link is severed and the node is deleted? Do the soft links hang out pointing to nothing or are they cleaned up? (probably cleaned up) • Are softlinks to “iNode” or to a path? UNIX chose path. • How do we handle loops in soft links? UNIX decided to limit the number of soft links traversed to some number - 64 or less usually. – Hard links can work - (iNode only) • Is there (one or several) primary parents? Is there a priority order? • If there is one primary link which controls inheritance and it is removed, which of the secondary links is “promoted” and takes over control of the inheritance? It would be nice for a human to make this decision and not code..
  • 9. Performance • Performance is a critical requirement - often these hierarchy lookups are a large part of the DB load of an application. – It is not practical to cache the structure - There will be Sakai installations with 200K sites and each site may have several thousand files in a hierarchy. – It may not even be practical to have a single hierarchy - there may need to be a federated hierarchy of hierarchies. – Many of these algorithms are “n-squared” on insert because insert triggers some reorganization.
  • 10. Need for SubSelect • To truly gain ultimate performance it is important that the lookup operations produce a simple list of hierarchy ids so that this list can be used in a sub-select for another table (such as a join between a resource hierarchy and a group hierarchy and a role hierarchy) • This can be either done by retrieving large collections from all three of these separate places and doing an n-cubed iteration through the large collections (especially in the case with users with lots of permission power) or do it in a single join reducing the data to that which is to be displayed within the database. • So if work select work is done in stored procedures - they must accept parameters and return ID lists like a standard select.
  • 11. Common Implementation Approaches • Straight parent - child structure – Insert is quite fast, lookup is loop-based with an SQL transaction to descend each level • Transitive closure of parent child – On insert, traverse upwards and add direct parent - child links for all parents “above” the child. – This ends up with NlogN data, but insert is log N and lookup is log N. – Often done with stored procedures or looping SQL • Specific Database Extensions – Oracle has such extensions - does this handle multi-rooted? • Overlapping sets – Based on maintaining pre-order numbering of nodes – N-Squared on insert, log N on lookup. Data is order-N – Insert performance suffers on large hierarchies.
  • 12. Implementation Questions • How do we get lookup to operate in less than LogN SQL transactions? – Generally the answer is to have an auxiliary table with the fully-realized path to each node, so that a WHERE lookup can be done. – This is fun when there are multiple roots because it means that there are multiple paths to an iNode. Understand that this is an NLogN data issue much like the de-normalized parent relationship.