Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Synapse Repository Services are implemented using a four-tier architecture:

  1. Controller (org.sagebionetworks.repo.web.controller)
    Classes in the Controller level collect and parse incoming web requests. Controllers translate web requests into appropriate Java method calls to the Service layer.
  2. Service (org.sagebionetworks.repo.web.service)
    Classes in the Service level serve as the interface between controllers and managers. Services interact with one or more Manager to produce a result for an upstream Controller.
  3. Manager (org.sagebionetworks.repo.web.manager)
    Classes in the Manager level provide a layer of abstractoin to access and modify data objects (usually of a particular type) in the DAO.
  4. DAO (org.sagebionetworks.repo.model.jdo)
    Classes in the DAO level manipulate the low-level data objects which are stored in the Synapse repository.

...

Any extensions or modifications to the repository services should be designed and implemented in observance of this architecture. All public methods which modify database state, whether directly or indirectly, should have explicit @Transactional annotations. By default, classes should enforce read-only, propagation-supported behavior on member methods. (Any other methods should NOT have @Transactional annotations, to avoid initiating unnecessary transactions. See http://static.springsource.org/spring/docs/2.0.x/reference/transaction.html) for details on Spring Transaction management.