View stunning SlideShares in full-screen with the new iOS app!Introducing SlideShare for AndroidExplore all your favorite topics in the SlideShare appGet the SlideShare app to Save for Later — even offline
View stunning SlideShares in full-screen with the new Android app!View stunning SlideShares in full-screen with the new iOS app!
Building Science Gateways with Apache Rave Marlon Pierce Science Gateway Group Indiana University
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
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.
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.
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.
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
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.
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.
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.
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
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
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
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.