1 / 10

Application Development Best Practices

Application Development Best Practices. caGrid Knowledge Center February 2011. What best practices?. The Knowledge Center has identified a set of caGrid development best practices based upon the practices of the caGrid development team and 2.5 years of community support.

chaz
Download Presentation

Application Development Best Practices

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. Application Development Best Practices caGrid Knowledge Center February 2011

  2. What best practices? The Knowledge Center has identified a set of caGrid development best practices based upon the practices of the caGrid development team and 2.5 years of community support. Best practices subject areas: • caGrid Installation • Service Creation • Service Testing • Service Deployment • Service Operation

  3. caGrid Installation Installation best practices • Install all packages installed by the caGrid installer into a single top-level directory, like ‘ext-1.3.0.2’. • Do not install into a path that contains a space, like ‘Documents and Settings”. • Set environment variables as specified by the Installer. • Do not deploy into the Globus container, use Tomcat or JBoss.

  4. Service Creation Service creation best practices • Review your model more than once! Service creation is a waterfall process. If you find an error in your model after you create your service you will have to throw out the service and start again. • When possible, stick with the functionality provided by Introduce. • If you need to alter Introduce functionality, create an extension at one of the many extension points that are provided. Contribute the extension back as a Community Project. • If you need to change the functionality of a caGrid project for your service, create your own class that extends the caGrid class and package it into an appropriately named jar. • Configure your service to use transport layer security (encryption) and to require users to connect using a trusted, non-expired grid certificate. • Update the Introduce generated client class to connect to your service and perform some real functionality.

  5. Service Creation (cont) Service creation best practices • Build your analytical service as an API first, then grid-ify it • This gives you a way to test your business logic in isolation • The API can be used without a grid service front end in tightly integrated applications

  6. Service Testing Testing best practices • Write unit tests to: • Query each exposed object: entire object, selected attributes, by Id, associations with other objects, and with Query Modifiers (count, etc.). • Test every operation that you have added to the service • Test any custom serialization logic your data types use • Write integration tests to: • Deploy the service and invoke the client operations • Verify resources get created, persisted, and destroyed as they should • Use negative tests to: • Verify failure modes throw the correct exceptions • Make sure your code handles bad or unexpected input

  7. Service Deployment Deployment best practices • Deploy into a container that was created by the caGrid Installer to avoid manual configuration errors. • Test that your container starts successfully before attempting to deploy and test your service. • Use a secure container. • One container per user. • One service deployed per container. • Verify that your service metadata specifies a responsible contact in the Hosting Research Center element. This helps the KC / NCI contact the service maintainer.

  8. Service Operation Operation best practices • Monitor your service by URL and verify the presence of the “this is an AXIS service” text. • Use a monitoring tool that will notify the service maintainer when the service is not responding. (The Training Grid is monitored using Nagios) • Truncate your container logs! The Tomcat catalina.out file is not truncated by default. (The Training Grid hosts use logrotate) • Watch your CPU, RAM and Disk utilization to optimize them for your service.

  9. Community Sharing • Share your code back with the community via downloadable zip or publicly accessible source repository. • Share your design and user documentation. • Publicize your project on the caGrid User Group Teleconference. • Create a Community Project.

  10. Each caGrid project has a “Project Status” page containing compliance with our best practices.

More Related