1. Building Science Gateways with Apache Rave Marlon Pierce Science Gateway Group Indiana University
2. Apache Rave Overview• Rave is an Apache incubator for building a Web portal on the Open Social and W3C Widget specifications. – Joint effort of Mitre, Hippo Software, SURFnet, and the OGCE project – Replaces the OGCE Gadget Container• Goal 1: Provide a useable, packaged, downloadable OpenSocial portal. – Get started with minimal hassle.• Goal 2: Provide a platform for non-invasive developer extensions, customizations – Science gateways, for example
3. Gadget Dashboard ViewGadget Store View
4. Mobile View
6. Rave ComponentsComponent DescriptionModels User, Page, Region, RegionWidget. These are interfaces with default implementationsControllers Associates a specific URL with backing code to render JSP views or provide access to REST and RPC services.Services Internal services that implement a specific action, such as adding a new user to the repository.Repositories Control Object-Relational Mappings between model objects and backend storage.Views User interfaces implemented as JSPs. These include welcome pages, layout managers for both standard and mobile views, administration pages, and widget store pages.
7. Rave Configuration FilesConfiguration File Description Developer ModificationsapplicationContext.xml Instantiatesall beans, Addnew Java Beans here controllers, and to support extensions. services.applicationContext- Specifies allowedURL Change the defaultsecurity.xml patterns,enables authentication module OpenID support, and to or expose additional specifies the REST services. authentication provider.dataContext.xml Used to set up the Override default data default H2 database and store, initial population to populate it with methods. demo accounts.
8. Extending Rave• Rave is designed to be extended. – Good design (interfaces, easily pluggable implementations) and code organization are required. – It helps to have a diverse, distributed developer community • How can you work on it if we can’t work on it?• Rave is also packaged so that you can extend it without touching the source tree.
9. Rave Developer DependenciesComponent Descriptionrave-portal- Maven POM file listing all Rave-dependencies producedJARs and third-party dependencies.rave-portal-resources Java WAR file containing all Rave Web resourcesrave-shindig Java WAR file containing Rave modifications and extensions to Apache Shindig
10. Rave Extension General Steps• Download and install Rave’s source – “mvn clean install” puts JARs, WARs, and POMs into your local Apache Maven repository.• Create a new Apache Maven project – You’ll need rave-portal-dependencies POM in your <dependencies/>. – Include any configuration files that you would like to modify. – Include the source code for your extensions.
11. Case Study: GridShib and Community Credentials• XSEDE Science Gateways use shared community credentials when accessing backend resources. – Many portal users map to one community account.• GridShib adds attributes to grid credentials – Gateway membership, originating IP address, user email, creation time, etc.• For Rave, we’ll have to change the User service implementation to support this.
12. GridShib Step By Step• Install Rave in your Maven repo.• Create a Maven project with standard directory layout for WAR packaging• Create a new user service (ComUserService) for obtaining a community credential and adding GridShib attributes.• Replace applicationContext-security.xml with your version• In the XML, replace the default UserService with ComUserService.• Place all GridShib resources in src/main/resources• Place web.xml in src/main/webapp/WEB-INF – You’ll need an additional listener to get the IP address.
13. GridShib and Rave Postmortem• The full example is available from the Rave sandbox SVN.• It is also includes examples of how to build new REST services.• GridShib’s dependence on XML library jars are a challenge for one step packaging. – These must be in an endorsed directory
14. The Apache Way• Apache is open community, not just open source licensing or code on the web.• Projects start as incubators with 1 champion and several mentors. – Making good choices is very important• Champion and mentors will judge you, help you on the following• Good, open engineering practices – DEV mailing list design discussions, issue tracking• Properly packaged code – Build out of the box – Licenses, disclaimers, notices, change logs, etc.• Developer diversity – Three or more unconnected developers
15. Apache and Science Gateways• Apache rewards projects for cross-pollination. – Connecting with complementary Apache projects strengthens both sides. – New requirements, new development methods• Apache methods foster sustainability – Building communities of developers, not just users• Apache methods provide governance – Incubators learn best practices from mentors – Releases are peer-reviewed
16. More Information• As an Apache Incubator, Rave welcomes (and needs) new developer involvement• Rave Web Site:• Rave Developer List (public):• Rave includes contributions from many individuals. Seehttp://incubator.apache.org/rave/for a list of champions, mentors, and contributors.