Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

DDSUG 2009 Back-porting DSpace 2.0 Services to DSpace 1.6.0

The release of "DSpace Services" represents the first offering of the DSpace 2.0 technology developed with funding from JISC, and staffing support from the DSpace Foundation, CARET, MIT, @mire, Open Repository, and HP.

This is a presentation on what DSpace services are and how they integrate into DSpace 1.6.0

Thanks to the efforts on this initiative by Mark Diggory from @mire, Aaron Zeckoski from CARET, Ben Bosman from @mire, Graham Triggs from Open Repository and Bradley McLean from DuraSpace Foundation. top

  • Be the first to comment

  • Be the first to like this

DDSUG 2009 Back-porting DSpace 2.0 Services to DSpace 1.6.0

  1. 1. BACK-PORTING DSPACE 2.0: DSPACE SERVICES Mark Diggory DSUG 2009
  2. 2. Conflicts in DSpace. Developers vs. Developers?
  3. 3. But is it Their Fault? Pioneer Argonne computer scientist Jean F. Hall.
  4. 4. But is it Their Fault? No, Developers: Pioneer Argonne computer scientist Jean F. Hall.
  5. 5. But is it Their Fault? No, Developers: Need to Innovate Pioneer Argonne computer scientist Jean F. Hall.
  6. 6. But is it Their Fault? No, Developers: Need to Innovate Need to change code Pioneer Argonne computer scientist Jean F. Hall.
  7. 7. But is it Their Fault? No, Developers: Need to Innovate Need to change code Need to solve immediate issues formost. Pioneer Argonne computer scientist Jean F. Hall.
  8. 8. Static code is not extensible... public class StaticManager { public static Object getSomething(Object object) { SomeOtherManager.doSomethingElse(...); } }
  9. 9. Consider Anti-Patterns
  10. 10. Consider Anti-Patterns Hardcoding: Configuration is hardcoded into static “Managers” Database CRUD is hardcoded into DpaceObjects.”
  11. 11. Consider Anti-Patterns Hardcoding: Configuration is hardcoded into static “Managers” Database CRUD is hardcoded into DpaceObjects.” God Object: ConfigurationManager, Context, DSpaceObject Concentrate too much functionality in a class
  12. 12. Consider Anti-Patterns Hardcoding: Configuration is hardcoded into static “Managers” Database CRUD is hardcoded into DpaceObjects.” God Object: ConfigurationManager, Context, DSpaceObject Concentrate too much functionality in a class JAR Hell: Users resort to classpath ordering to overload core API. User override classes directly to change behavior.
  13. 13. Importance to @mire?
  14. 14. Importance to @mire? Many clients with similar need for customization.
  15. 15. Importance to @mire? Many clients with similar need for customization. All Products dependent on DSpace.
  16. 16. Importance to @mire? Many clients with similar need for customization. All Products dependent on DSpace. We have to guaruntee upgrade path.
  17. 17. Importance to @mire? Many clients with similar need for customization. All Products dependent on DSpace. We have to guaruntee upgrade path. Need stability and modularity in DSpace.
  18. 18. Modularity http://google-guice.googlecode.com/files/Guice-Google-IO-2009.pdf
  19. 19. Modularity http://google-guice.googlecode.com/files/Guice-Google-IO-2009.pdf
  20. 20. Modularity http://google-guice.googlecode.com/files/Guice-Google-IO-2009.pdf
  21. 21. Services: Can Help
  22. 22. Services: Can Help Removes Hardcode: Data Models are anemic, Services implemented separate from interfaces used by applications.
  23. 23. Services: Can Help Removes Hardcode: Data Models are anemic, Services implemented separate from interfaces used by applications. Lessens JAR Hell: API contracts, default implementations off limits. Want to change behavior, write changes separately.
  24. 24. Services: Can Help Removes Hardcode: Data Models are anemic, Services implemented separate from interfaces used by applications. Lessens JAR Hell: API contracts, default implementations off limits. Want to change behavior, write changes separately. Removes God Objects: Services separate functional areas, separate Data Models without interdependency assure separation.
  25. 25. Services: Architecture: services-util services-api services-impl
  26. 26. Services: Architecture: services-util services-api services-impl DSpaceKernel- ServletContextListener DSpaceWebapp- DSpaceKernelManager DSpaceKernelInit ServletFilter JMX <<Interface>> DSpaceKernelImpl DSpaceKernel
  27. 27. Services: Architecture: services-util services-api services-impl DSpaceKernel- ServletContextListener DSpaceWebapp- DSpaceKernelManager DSpaceKernelInit ServletFilter JMX <<Interface>> DSpaceKernelImpl DSpaceKernel Guice <<Interface>> DSpace ServiceManager DSpaceServiceManager Spring OSGi <<Interface>> EventServiceImpl EventService
  28. 28. Services: Architecture: services-util services-api services-impl <<Interface>> DSpace ServiceManager <<Interface>> EventService
  29. 29. Services: Architecture: services-util services-api services-impl /* Instantiate the Utility Class */ DSpace dspace = new DSpace(); /* Access get the Service Manager by convenience method */ ServiceManager manager = dspace.getServiceManager(); /* Or access by convenience method for default services */ EventService service = dspace.getEventService(); <<Interface>> DSpace ServiceManager <<Interface>> EventService
  30. 30. Services: Default Services services-util DSpace services-api <<Interface>> ServiceManager <<Interface>> EventService <<Interface>> ConfigurationService <<Interface>> RequestService <<Interface>> SessionService
  31. 31. Services: Default Services services-util DSpace DSpace dspace = new DSpace(); services-api EventService es = dspace.getEventService(); <<Interface>> ServiceManager ConfigurationService cs = dspace.getConfigurationService(); <<Interface>> EventService RequestService rs = dspace.getRequestService(); <<Interface>> ConfigurationService SessionService ss = dspace.getSessionService(); <<Interface>> RequestService <<Interface>> SessionService
  32. 32. Services: Default Services dspace-xmlui-webapp services-util Spring Application Context DSpace services-api registerService <<Interface>> Your Own Services ServiceManager Your Own Event registerEventListener <<Interface>> Listeners EventService addConfiguration <<Interface>> Your Own Configs ConfigurationService addInterceptor Your Own Request <<Interface>> Interceptors RequestService <<Interface>> SessionService
  33. 33. Spring: Web Application Context
  34. 34. Spring: Registering Event Listeners <?xml version="1.0" encoding="UTF-8"?> <beans> <bean id="dspace" class="org.dspace.utils.DSpace"/> <bean id="dspace.eventService" factory-bean="dspace" factory-method="getEventService"/> <bean class="org.my.EventListener"> <property name="eventService" > <ref bean="dspace.eventService"/> </property> </bean>
  35. 35. Spring: Java Analogy DSpace dspace = new DSpace(); EventService service = dspace.getEventService(); MyEventListener listener = new MyEventListener(); service.registerEventListener(listener);
  36. 36. DSpace 1.6 Statistics Our first example of service usage DSpace XMLUI Webapp Cocoon UsageEvent EventService SolrUsage LoggingActor EventListener SolrLogger DSpace Solr Webapp fireEvent receiveEvent post HTTP Solr HTTP LogUsage Request EventListener receiveEvent Writes to log dspace .log
  37. 37. Services: Firing Events DSpace dspace = new DSpace(); Event event = new UsageEvent( UsageEvent.Action.VIEW, request, context, object); dspace.getEventService().fireEvent(event);
  38. 38. Proposed Next Steps: Integrate remaining Services
  39. 39. Proposed Next Steps: Integrate remaining Services DSpaceDataSource: DB Connection Pool
  40. 40. Proposed Next Steps: Integrate remaining Services DSpaceDataSource: DB Connection Pool UserService: Auth and Permissions
  41. 41. Proposed Next Steps: Integrate remaining Services DSpaceDataSource: DB Connection Pool UserService: Auth and Permissions StorageService: ContentStorage
  42. 42. Proposed Next Steps: Integrate remaining Services DSpaceDataSource: DB Connection Pool UserService: Auth and Permissions StorageService: ContentStorage MetaRegistryService: Content Models, Metadata Schema, DCMI Application Profiles.
  43. 43. Proposed Next Steps: Integrate remaining Services DSpaceDataSource: DB Connection Pool UserService: Auth and Permissions StorageService: ContentStorage MetaRegistryService: Content Models, Metadata Schema, DCMI Application Profiles. SearchService: Unified search and browse
  44. 44. Proposed Next Steps: Integrate remaining Services DSpaceDataSource: DB Connection Pool UserService: Auth and Permissions StorageService: ContentStorage MetaRegistryService: Content Models, Metadata Schema, DCMI Application Profiles. SearchService: Unified search and browse MappingService: External Identifier Mapping to DSpace objects.
  45. 45. Proposed Next Steps: Replacement of Legacy Managers
  46. 46. Proposed Next Steps: Replacement of Legacy Managers EventManager <-------------------------------- EventService
  47. 47. Proposed Next Steps: Replacement of Legacy Managers EventManager <-------------------------------- EventService ConfigurationManager <-------------- ConfigurationService
  48. 48. Proposed Next Steps: Replacement of Legacy Managers EventManager <-------------------------------- EventService ConfigurationManager <-------------- ConfigurationService DatabaseManager <---------- DSpaceDataSource Service
  49. 49. Proposed Next Steps: Replacement of Legacy Managers EventManager <-------------------------------- EventService ConfigurationManager <-------------- ConfigurationService DatabaseManager <---------- DSpaceDataSource Service EPerson/ResourceBundle <-------------------- UserService
  50. 50. Proposed Next Steps: Replacement of Legacy Managers EventManager <-------------------------------- EventService ConfigurationManager <-------------- ConfigurationService DatabaseManager <---------- DSpaceDataSource Service EPerson/ResourceBundle <-------------------- UserService DSO and BitstreamStorage <------------- StorageService
  51. 51. Proposed Next Steps: Replacement of Legacy Managers EventManager <-------------------------------- EventService ConfigurationManager <-------------- ConfigurationService DatabaseManager <---------- DSpaceDataSource Service EPerson/ResourceBundle <-------------------- UserService DSO and BitstreamStorage <------------- StorageService Search and Configurable Browse <--------- SearchSevice
  52. 52. Proposed Next Steps: Remove God Objects DSpace Database Manager Database Pool Context DB cac ID he Authentication Manager
  53. 53. Proposed Next Steps: Remove God Objects DSpace Database Manager Database Context is composite object Pool Context DB cac ID he Authentication Manager
  54. 54. Proposed Next Steps: Remove God Objects DSpace Database Manager Database Context is composite object Pool Gets passed around everywhere Context DB cac ID he Authentication Manager
  55. 55. Proposed Next Steps: Remove God Objects DSpace Database Manager Database Context is composite object Pool Gets passed around everywhere Context Represents: DB cac ID he Authentication Manager
  56. 56. Proposed Next Steps: Remove God Objects DSpace Database Manager Database Context is composite object Pool Gets passed around everywhere Context Represents: DB cac State, Identity, Transaction ID he Authentication Manager
  57. 57. Proposed Next Steps: Kernel as “Context Container” DSpace Kernel Service Manager Session Session Service Request Request Service Your Cache Code Service User Service Data Source Service
  58. 58. Proposed Next Steps: Liberate the Implementation
  59. 59. Proposed Next Steps: Liberate the Implementation Remove Static Accessors allowing for proper API contracts and usage of Extensibility.
  60. 60. Proposed Next Steps: Liberate the Implementation Remove Static Accessors allowing for proper API contracts and usage of Extensibility. Decouple Initialization of “StaticManagers” as Services into either core Spring, Guice or Application startup.
  61. 61. Proposed Next Steps: Liberate the Implementation Remove Static Accessors allowing for proper API contracts and usage of Extensibility. Decouple Initialization of “StaticManagers” as Services into either core Spring, Guice or Application startup. Enforce contracts and backward compatability as a community practice to assure reliable API + Services.
  62. 62. In Summary
  63. 63. In Summary DSpace 2.0 is successful project to date.
  64. 64. In Summary DSpace 2.0 is successful project to date. Yet, will take multiple releases to integrate.
  65. 65. In Summary DSpace 2.0 is successful project to date. Yet, will take multiple releases to integrate. Work is incremental, projects need to be tractable.
  66. 66. In Summary DSpace 2.0 is successful project to date. Yet, will take multiple releases to integrate. Work is incremental, projects need to be tractable. Work needs to be kept close to the trunk
  67. 67. In Summary DSpace 2.0 is successful project to date. Yet, will take multiple releases to integrate. Work is incremental, projects need to be tractable. Work needs to be kept close to the trunk DSpace Services are here as the first step.
  68. 68. In Summary DSpace 2.0 is successful project to date. Yet, will take multiple releases to integrate. Work is incremental, projects need to be tractable. Work needs to be kept close to the trunk DSpace Services are here as the first step. Faster when we all collaborate in migration activities.
  69. 69. In Summary DSpace 2.0 is successful project to date. Yet, will take multiple releases to integrate. Work is incremental, projects need to be tractable. Work needs to be kept close to the trunk DSpace Services are here as the first step. Faster when we all collaborate in migration activities. Could always use a little more “$upport”
  70. 70. Special Thanks: Ben Bosman Graham Triggs Art Lowel Kevin Van de velde Bradley McLean Aaron Zeckoski
  71. 71. Supporting Organizations: Mark Diggory mdiggory@atmire.com
  72. 72. BACK-PORTING DSPACE 2.0: DSPACE SERVICES Mark Diggory DSUG 2009

×