370 likes | 620 Views
RESTful Portal Content: Delivering Content for uPortal without writing Portlets or IChannels. Susan Bramhall Yale University JA-SIG Winter 2006. How this presentation came to be. Why are other uPortal sites writing so many Portlets? What is wrong with the approach we take at Yale?.
E N D
RESTful Portal Content:Delivering Content for uPortal without writing Portlets or IChannels Susan Bramhall Yale University JA-SIG Winter 2006
How this presentation came to be • Why are other uPortal sites writing so many Portlets? • What is wrong with the approach we take at Yale? http://www.ja-sig.org/wiki/display/JCON/06winter+ Compelling+uses+of+CWebProxy+and+CGenericXSLT JA-SIG Winter 2006
Our Goal: Channels and Portlets should be… • Easy to provide • Managed by application or data owner not portal team • Technology independent • Easily ported to new environments • Re-usable for many uses JA-SIG Winter 2006
Essentially More RESTful • Simple HTTPS and XML where possible • simplifies component implementation • reduces the complexity of connector semantics • Layered • improves the effectiveness of performance tuning • Cacheable • Improved performance • Improved scalability of portal • Less complexity in the portal JA-SIG Winter 2006
CGenericXSLT RSS Sakai Site Summary Upcoming Events Recent E-mail Computing Clusters Library Books Out Uses parameters to focus the channel CAbstractXslt Could return, for example, user layout or channel registry CWebProxy Directory Search Network Registration 90% of Content via XML or XHTML JA-SIG Winter 2006
Example:Dynamic Information From Sakai JA-SIG Winter 2006
How did that happen? • XML retrieved from http request via Proxy CAS returns… JA-SIG Winter 2006
How did that happen? • Simple XSL formats for channel to display JA-SIG Winter 2006
Who did that? Jen did. • Java programmer on Yale’s Sakai Project • Familiar with Sakai internals • She reused existing Sakai logic and APIs • She did it in less than a day • No new Portlet JA-SIG Winter 2006
“That was easy!” • All the work is on the Sakai side • All the understanding is on the Sakai side • The channel is part of our Sakai Project JA-SIG Winter 2006
XML result https request with PST Validate Ticket Proxy Service Ticket OK, Authentication can be a challenge • More Info on the CAS wiki For portlets see… • http://www.ja-sig.org/wiki/display/PLT/Portlets+using+Proxy+CAS Classes*V2 YaleInfo Sakai summary channel CAS JA-SIG Winter 2006
YaleInfo Classes*V2 Sakai summary channel RESTful Benefits • Layering • Separation of responsibilities • Easier to tune performance • Allows more scalable portal JA-SIG Winter 2006
Recent E-Mails • Uses Proxy CAS * 2 • Links to message in IMP • Not a full e-mail client in uPortal portal IMAP Server Recent E-mail Channel servlet HTTPS Request XML response IMAP Protocol JA-SIG Winter 2006
Computing Cluster Status JA-SIG Winter 2006
ITS Systems Messages • Simple RSS feed from existing system • “more…” links to full information JA-SIG Winter 2006
Upcoming Events Homegrown Calendar API Sun Calendar Server Yale Public Event Calendar Native http Xml Request - response Upcoming Events channel YaleInfo Portal JA-SIG Winter 2006
Speaking of caching • We did modify the CGenericXSLT to cache XML documents • The cache layer refreshes the cache on configurable intervals in the background • User request never waits on xml retrieval after the first time JA-SIG Winter 2006
YaleInfo looks like this… Events 1/hr Cache of XML Documents Channels are rendered from cached documents Clusters 6/hr Document Cacher thread Top Links 1/day Recent email Not cached JA-SIG Winter 2006
Caching Package • edu.yale.its.portal.utils.cache • Retrieves XML using commons httpclient • Saves DOM in memory • One (yes, one) thread runs in background refreshing documents on scheduled intervals • CGenericXSLT modified to get XML from caching package JA-SIG Winter 2006
Channel Publishing Document modified to get cache parameters
Channel Publishing Document? • Defines the steps for publishing a channel based on a channel type. See… webpages/ media/ org/ jasig/ portal channels/ CGenericXSLT/ CGenericXSLT.cpd JA-SIG Winter 2006
Channel Type includes CPD • CPD is the XML configuration file • See more about creating a new channel type on the JA-SIG wiki under the name “Register Channel Type” http://www.ja-sig.org/wiki/x/lzQ JA-SIG Winter 2006
More Tips and Tricks • Focus • A channel can focus itself using parameter uP_root=me • Or "unfocus“ by using uP_root=root • Modification to pass IP address JA-SIG Winter 2006
Summary of library books out [baseActionUrl]?uP_root=me
Detail of library books out [baseActionUrl]?uP_root=root
Return from focus to normal JA-SIG Winter 2006
CSqlQuery Nifty new IChannel Executes a SQL query Returns results in XML uPortal dependent sql2xml Servlet runs in a separate JVM Configured with data source and SQL query Accepts parameters on request Executes SQL query and returns XML Portal and application agnostic CSqlQuery vs. sql2xml service JA-SIG Winter 2006
Incorporated Applications • CWebProxy – 2 more Yale examples • Network Registration • Directory Lookup • Web Proxy Portlet http://www.ja-sig.org/wiki/display/PLT/WebProxy JA-SIG Winter 2006
Network Registration • User perspective = a captive application • Technical view = Completely independent
Network Registration • STRUTS application • Written for Portal but also runs stand alone • Entirely separate web server environment • We modified uPortal to allow IP address to be passed • Person attribute passing is built in Portal Network Registration Web Proxy JA-SIG Winter 2006
Yale Directory Lookup JA-SIG Winter 2006
Yale Directory Look Up • Separate JSP application • Uses LDAP interface and produces xhtml • Separately hosted • Captive to Portal from user perspective JA-SIG Winter 2006
CWebProxy has neat features • Passing person attributes • Changing source XHTML and or XSL on the fly • See tutorial on CWebProxy home page http://www.mun.ca/portal/software/cw/ JA-SIG Winter 2006
I am still wondering Is this the best way to provide content? What do you think? JA-SIG Winter 2006