1 / 80

Distributed Layout Management

Distributed Layout Management. Mark R. Boyd Principal Engineer Information and Communication Systems The Church of Jesus Christ of Latter-Day Saints Formerly Software Architect Sungard Higher Education. Agenda. History Configuring Fragments Restrictions and Merging Processor Pipeline

altessa
Download Presentation

Distributed Layout Management

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Distributed Layout Management Mark R. Boyd Principal Engineer Information and Communication Systems The Church of Jesus Christ of Latter-Day Saints Formerly Software Architect Sungard Higher Education

  2. Agenda • History • Configuring Fragments • Restrictions and Merging • Processor Pipeline • Fragment Manager • Subscribed Fragments • Future work • Questions

  3. What is DLM? ? Distributed Layout Management ?

  4. User Owned Fragment Fragment What is DLM?

  5. User OwnedChannel What is DLM? FragmentOwned Tab Fragment OwnedChannel

  6. What is DLM? • Fall 2001 Campus Pipeline Platform inflexible UI • uPortal selected for end user customization • But… • Schools must be able to lock some portion of UI • No consensus on what should be locked in place • Only three months to implement • Only one resource available

  7. What is DLM? Schools Choose CompletelyLocked UI CompletelyFlexible UI

  8. What is DLM? • Leverage uPortal ability to create/edit layouts. (ie: use accounts (fragment owners) as source of fragment. • Enhance editing with layout element restrictions for fragment owners. (ie: selectively restrict tabs, columns, or channels individually.) • Facilitate persistence of end user edits to fragment elements. • Define concept of fragment precedence in view of fragment restrictions. • Gracefully merge fragment layouts and user edits into a coherent view. • Result: Distributed Layout Management • Ownership of the portal layout viewed by a user is distributed among fragment owner accounts and the user’s own edits.

  9. DLM History 2007 DLM 2.0 in Luminis 2006 DLM 2.0 Processing Pipeline 2005 DLM 1.0 debuts in uPortal 2.5 2004 SCT asked to contribute DLM 2003 ALM work begins in earnest 2002 DLM 1.0 pushed fragments debut in Luminis 2001 uPortal adopted by Campus Pipeline, DLM work starts

  10. DLM History • DLM 1.0 (uPortal 2.5) • Pushed fragments • Variable Restrictions • User Modifications to fragment • XML file based configuration • DLM 2.0 • Graceful Fragment Degratation • Processor pipeline (uPortal 2.6) • Subscribed fragments • Fragment Manager channel/DB based configuration

  11. Configuring Fragments • <development base dir>/properties/dlm.xml • <web-app base>/WEB-INF/classes/properties/dlm.xml • Properties. • Fragment account declarations. • Audiences that receive those fragments automatically.

  12. DLM.XML Properties • <dlm:property name='defaultLayoutOwner' value='fragmentTemplate'/> • Identifies account whose layout should be copied for any newly created fragment accounts.

  13. DLM.XML Properties • <dlm:property name='layoutDecorator' value='someClass'/> • Deprecated. • Identifies implementation of interface org.jasig.portal.layout.dlm.LayoutDecorator. • publicvoid decorate (Document layout, IPerson person, UserProfile profile) • Allowed customizations to post-merging layout.

  14. DLM.XML Properties • <dlm:property name='org.jasig.portal.layout.dlm.RDBMDistributedLayoutStore.fragment_cache_refresh' value="5"/> • Determines refresh period of cached fragment layouts for layout change propagation to other servers. • Value in minutes.

  15. DLM.XML Fragments • <dlm:fragment name='Entertainment' ownerID='ent-lo' precedence='100'> • name = name of fragment, shows when owner is logged in. • ownerID = username for account whose layout is the fragment’s layout. • precedence = determine’s ordering and bumping rights. If same as another fragment then index of declaration in dlm.xml is used. • Content is zero to many <dlm:audience> tags.

  16. DLM.XML Audiences • <dlm:audience evaluatorFactory=‘<someClass'> • Audience identifies who should get the fragment layout. • Factory must implement org.jasig.portal.layout.dlm.EvaluatorFactory. • public Evaluator getEvaluator( Node audience ); • Audience parameter is DOM representation of audience tag’s XML content. • Content must be well-formed XML understood by declared factory.

  17. Determines DLM.XML Audiences • <dlm:fragment name='Entertainment' ownerID='ent-lo' precedence='100'> <dlm:audience evaluatorFactory= 'org.jasig.portal.layout.dlm.providers. PersonEvaluatorFactory'> <paren mode="NOT"> <attribute name="username" mode='equals' value='guest'/> </paren> </dlm:audience> </dlm:fragment>

  18. Demo • All users but guest should see Entertainment fragment. • Entertainment fragment owned by ent-lo account. • Changes to layout should appear for other users.

  19. DLM.XML Audience Factories • Factory implements org.jasig.portal.layout.dlm.EvaluatorFactory. • public Evaluator getEvaluator( Node audience ); • Evaluator interface • publicboolean isApplicable( IPerson person ); • If any audience evaluator answers true then the fragment is granted. • Four factories included in org.jasig.portal.layout.dlm.provider package.

  20. DLM.XML Audience Factories • AllUsersEvaluatorFactory • No content. • Always returns true. • GuestUserEvaluatorFactory • No content. • Returns true if IPerson.isGuest() returns true.

  21. DLM.XML Audience Factories • PersonEvaluatorFactory • Evaluates IPerson.getAttribute(name) values. • Audience can have one to many paren or attribute elements and “ORs” their responses together. • Paren element has single attribute “mode” with allowed values of “AND”, “OR”, and “NOT” and nested element outcomes combine accordingly with NOT acting as if it contained a nested, envelopting “OR” paren. • Attribute element has three attributes: • name: used as the key for IPerson.getAttribute(key). • mode: can be “contains”, “startsWith”, “exists”, “equals”, and “endsWith”. • value: is the value used for comparison

  22. DLM.XML Audience Factories • PersonEvaluatorFactory quiz • <dlm:audience evaluatorFactory=…> <attribute name=“eyes” mode=“equals” value=“green”/> <attribute name=“eyes” mode=“equals” value=“hazel”/> <attribute name=“eyes” mode=“equals” value=“brown”/></dlm:audience> • Will grant the fragment to anyone with green or hazel or brown eyes.

  23. DLM.XML Audience Factories • PersonEvaluatorFactory quiz • <dlm:audience evaluatorFactory=…> <paren mode=“NOT”> <attribute name=“eyes” mode=“equals” value=“green”/> <attribute name=“hair” mode=“equals” value=“blonde”/> </paren></dlm:audience> • Will grant the fragment to anyone without both green eyes AND blonde hair. If they have one or the other or both they don’t get it. • Expression: NOT( eyes=green OR hair=blonde) • Expression: (eyes NOT green) AND (hair NOT blonde)

  24. DLM.XML Audience Factories • PersonEvaluatorFactory quiz • <dlm:audience evaluatorFactory=…> <paren mode=“NOT”> <attribute name=“eyes” mode=“equals” value=“brown”/> </paren> <attribute name=“eyes” mode=“equals” value=“brown”/></dlm:audience> • Will grant the fragment to anyone with eyes NOT(brown) OR brown so everyone gets it.

  25. DLM.XML Audience Factories • GroupMembershipEvaluatorFactory • Inherits same logical expressions as in PersonEvaluatorFactory • “attribute” element only supports attributes: • mode: “memberOf” and “deepMemberOf” • name: name of the group being checked for membership

  26. DLM.XML Audience Factories • GroupMembershipEvaluatorFactory quiz • <attribute mode=“memberOf” name=“Everyone”/> • true for Sam, false for Jill. • <attribute mode=“deepMemberOf” name=“Everyone”/> • true for both Sam and Jill. Everyone Sam contains Students Jill

  27. DLM.XML Audience Factories • Extra Credit quiz • <dlm:fragment …> <dlm:audience evaluatorFactory=“PersonEvaluatorFactory”> <attribute name=“eyes” mode=“equals” value=“brown”/> </dlm:audience> <dlm:audience evalutorFactory=“GroupMembershipEvaluatorFactory”> <attribute mode=“memberOf” name=“Students”/> </dlm:audience></dlm:fragment> • Multiple audience tags OR’ed together. • Eyes equal brown OR member of Students.

  28. Custom Evaluator Factories • If you need it, build it. • Factory implements org.jasig.portal.layout.dlm.EvaluatorFactory. • public Evaluator getEvaluator( Node audience ); • Evaluator interface • publicboolean isApplicable( IPerson person );

  29. DLM.XML Fragment Precedence • Location, Location, Location – screen real-estate is not created equal. • DLM’s merging algorithm pushes tabs from granted fragments into user’s layout view. • Tabs to left bump tabs to the right off of the screen. • Channels at top bump channels at the bottom off of the screen. • Identical precedence reverts to index in dlm.xml.

  30. A C B D E DLM.XML Fragment Precedence • <dlm:fragment name=‘A‘… precedence='100'> • <dlm:fragment name=‘B‘… precedence=‘50'> • <dlm:fragment name=‘C‘… precedence=‘75'> • <dlm:fragment name=‘D‘… precedence=‘50'> • User tab “E” • and no restrictions (to be discussed shortly) Quiz: In what order would merged tabs appear?

  31. uPortal Layouts • Raw uPortal layouts represented by hierarchical folders. • Structure XSLT transform converts to XML structure indicative of visual presentation. • Theme XSLT transform converts to target markup like HTML, WML, etc.

  32. uPortal Layouts: pre-DLM LayoutManager manages LayoutStore Loads StructureXSLT ThemeXSLT UP_LAYOUT_STRUCTUP_LAYOUT_PARAM

  33. uPortal Layouts: DLM Style DLMLayoutManager manages FragmentCache DLMThemeXSLT DLMStructureXSLT Merge ILF DLM LayoutStore Loads ILF = Incorporated Layout Fragment (user’s viewed layout) PLF = PersonalLayoutFragment (user’s persisted layout) PLF UP_LAYOUT_STRUCTUP_LAYOUT_PARAM

  34. uPortal Layouts: Fragment Owners DLMLayoutManager manages FragmentCache DLMThemeXSLT DLMStructureXSLT ILF same DLM LayoutStore Loads ILF = Incorporated Layout Fragment (user’s viewed layout) PLF = PersonalLayoutFragment (user’s persisted layout) PLF UP_LAYOUT_STRUCTUP_LAYOUT_PARAM

  35. uPortal Layouts: DLM Style • Each element originating from a fragment has two added DLM attributes: • dlm:fragment: the fragment identifier (currently is index in dlm.xml) • dlm:precedence: the declared precedence of the fragment

  36. uPortal Layouts: DLM Style • Fragment elements can have restrictions that limit what end users can do. (Asserted false. Not included for true.) • dlm:moveAllowed = restricts lower precedence elements from moving to a better real-estate location. • dlm:editAllowed = restricts editing structure specific attributes. (Ex: name for tabs, width for columns) • dlm:deleteAllowed = prevents user from deleting. • dlm:addChildAllowed = restricts adding child elements. (Ex: columns to tabs and channels to columns.) • Restrictions set by Fragment owners in uPortal UI. • Demo:renaming and moving

  37. uPortal Layouts: ILF and PLF • End-user-changes to fragments persisted in user’s layout as “ghost” elements and DLM directives. • Therefore, each user has two layouts: • Merging algorithm reapplies changes at log in time as much as is still allowed. • Garbage collects changes that are not allowed or have no effect. (Self minimizing)

  38. DLM Directives • dlm:delete = indicates fragment elements that were removed. • dlm:edit/dlm:pref = an edit made to a fragment element’s attribute. • dlm:position = indicates user placement of fragment and user owned elements. • dlm:parm = indicates user added/overridden channel parameter.

  39. Channel Ad-hoc Parameter Persistence • ChannelStaticData publish time parameters • getParameter(key) • setParameter(key, value) • store() • Store() depends on support of backing layout management approach. DLM persists ad-hoc parameter changes in PLF via dlm:param directives. • Fragment Owner values flow to fragment users. • Demo: Post-it channel.

  40. Merging Characteristics Quiz • What happens if user deleted and element and fragment owner later marked it as not removeable? • The element will reappear and not be removeable thereafter. • What happens if user adds a channel to a fragment column and fragment owner later restricts adding channels to that column? • The added channel will be removed. • What happens if user has rearranged channels in fragment column and fragment owner then adds another channel at the top? • Added channel drops to bottom of column.

  41. Fragment Audience Channel Audience DLM and Permissions • Fragments granted to users via dlm.xml declared evaluators. • Channels granted to users via group membership. • Graceful degradation: merging algorithm silently drops channels from fragments if user has insufficient permissions.

  42. DLM and Permissions (Demo) <dlm:fragment name='Post-its' ownerID='post-lo' precedence='80'> <dlm:audience evaluatorFactory=‘…GroupMembership…'> <paren mode="OR"> <attribute mode='memberOf' name='Students'/> <attribute mode='memberOf' name='Faculty'/> </paren> </dlm:audience> </dlm:fragment>

  43. DLM and Permissions (Demo) • post-lo user member of Student and Faculty groups. • “Student Post-its” channel granted to Students. • “Faculty Post-its” channel granted to Faculty. • Post-lo logs in and subscribed to both channels on “Post-its” tab. • Faculty users see? • Post-its tab with only Faculty Post-its channel. • Student users see? • Post-its tab with only Student Post-its channel.

  44. DLM 2.0 • DLM 1.0 opportunities for improvement • File based declaration, • Administrator access required for host • Propagation tactics in server farm • Web server bounce required. • No delegation of management responsibilities • No UI processing extensions without recompile • No subscribe-able fragments • No simple enable/disable of fragments

  45. SubscriptionTargetsProcessor DLM 2.0 Delegation Create FragmentManage PrecedenceManage AudienceManage PermissionsDelete Fragment SubscriberChannel FragmentManagerChannel IPermissibleImplementation RDB Based Configuration StructureTransformation ThemeTransformation Pluggable URL Handling Processor Pipeline UP_DLM_FRAGMENTSUP_DLM_SUBSCRIPTIONS

  46. Processing Pipeline • UI Enhancements • Scenario: Fragment Subscription

  47. Processing Pipeline • Scenario: Fragment Subscription

  48. Processing Pipeline • Scenario: Fragment Subscription

  49. Pluggable URL Handling Processor Pipeline Processing Pipeline • Scenario: Fragment Subscription • Momentarily Injected Structure Specific Target Points • Modified Structure/Theme Transforms toPresent UI Targets • Provided handling for selected target. • How do you do that?

  50. IParameterProcessorIOptionalParameterProcessor ISaxProcessor Processing Pipeline UserInstance DistributedLayoutManager processLayoutParameters() Processing Pipeline org.jasig.portal.layout.dlm.processing getUserLayout() SAX Event Stream

More Related