16
Building Science Gateways with Apache Rave Marlon Pierce Science Gateway Group Indiana University

GCE11 Apache Rave Presentation

Embed Size (px)

DESCRIPTION

Presented at GCE11 workshop at SC11, Seattle, WA, November 18th, 2011

Citation preview

Page 1: GCE11 Apache Rave Presentation

Building Science Gateways with Apache Rave

Marlon PierceScience Gateway Group

Indiana University

Page 2: GCE11 Apache Rave Presentation

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

Page 3: GCE11 Apache Rave Presentation

Gadget Dashboard View

Gadget Store View

Page 4: GCE11 Apache Rave Presentation

Mobile View

Page 5: GCE11 Apache Rave Presentation

Rave Building Blocks

• Rave is implemented in JavaScript, Java with Spring MVC– Bean initialization specified in XML configuration files.– Inversion of Control makes it easy to swap out

implementations.– Disciplined MVC through Java annotations

• Builds on Apache Shindig and Wookie– Provide layout management, user management,

administration tools, production backend data systems, etc.

Page 6: GCE11 Apache Rave Presentation

Rave ComponentsComponent Description

Models User, Page, Region, RegionWidget. These are interfaces with default implementations

Controllers 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.

Page 7: GCE11 Apache Rave Presentation

Rave Configuration FilesConfiguration File Description Developer

ModificationsapplicationContext.xml Instantiates all beans,

controllers, and services.

Add new Java Beans here to support extensions.

applicationContext-security.xml

Specifies allowed URL patterns, enables OpenID support, and to specifies the authentication provider.

Change the default authentication module or expose additional REST services.

dataContext.xml Used to set up the default H2 database and to populate it with demo accounts.

Override default data store, initial population methods.

Page 8: GCE11 Apache Rave Presentation

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.

Page 9: GCE11 Apache Rave Presentation

Rave Developer DependenciesComponent Description

rave-portal-dependencies

Maven POM file listing all Rave-produced JARs and third-party dependencies.

rave-portal-resources Java WAR file containing all Rave Web resources

rave-shindig Java WAR file containing Rave modifications and extensions to Apache Shindig

Page 10: GCE11 Apache Rave Presentation

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.

Page 11: GCE11 Apache Rave Presentation

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.

Page 12: GCE11 Apache Rave Presentation

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.

Page 13: GCE11 Apache Rave Presentation

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

Page 14: GCE11 Apache Rave Presentation

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

Page 15: GCE11 Apache Rave Presentation

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

Page 16: GCE11 Apache Rave Presentation

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. See http://incubator.apache.org/rave/ for a list of champions, mentors, and contributors.