1 / 14

Developing PiMS 1.0

Developing PiMS 1.0. Bill Lin. Bill Lin - Developing PiMS 1.0. 850 of 5000 commits in PiMS during last 12 months: Applying Hibernate as the persistence layer & improve DataModel API(60%) Database Upgrader (15%) Others: testing, defect fixing, web functions (25%). PiMS architecture.

sarila
Download Presentation

Developing PiMS 1.0

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. Developing PiMS 1.0 Bill Lin

  2. Bill Lin - Developing PiMS 1.0 850 of 5000 commits in PiMS during last 12 months: • Applying Hibernate as the persistence layer & improve DataModel API(60%) • Database Upgrader (15%) • Others: testing, defect fixing, web functions (25%)

  3. PiMS architecture

  4. CCPN generated Datamodel API (117k lines of code) PIMS DM API (4k lines of code) CCPN DataModel CCPN generated Persistence Api (2k lines of code) CCPN generation Machine CCPN generated SQL schema Database PiMS old DM architecture - Before V0.5

  5. Main Problems Were: • Generated code was “out of control” • Generated code was difficult to understand • Generated API was not easy to use • Performance Problem • Single transaction only

  6. Generated** Datamodel API (25k lines of code) PIMS DM API ** (2k lines of code) CCPN* DataModel Hibernate Persistence Package Hibernate Mapping files (CCPN) generation Machine CCPN* generated SQL schema Database* PiMS new DM architecture - After V0.5 * Same as before **Most interface same as before

  7. Improvement • Generated code is under control • The “target” code is provided before generated • Generation machine is control by Anne with CCPN’s help • Code can be changed without generation machine

  8. Improvements • Generated code is much easier to understand • Generated code reduced from 117k to 25k lines

  9. Improvements • Generated API is easier to use • PiMS DM API code reduced from 4k to 2k lines with more functions • Simplified the way to use API A simple example: MetaClass metaClass = version.getModel(). getMetaClass(ccp.api.Target.Status.class.getName()); Collection statuses = version.getAll(metaClass); Collection<Status> statuses=version.getAll(Status.class);

  10. Improvements • Performance is improved a lot • Duration of loading 9,000 targets reduced from “>24 hours” to “<20 mins” • Cache is in used now. • Multi-transaction is supported now

  11. Datamodel Api PIMS API DataModel Annotation in POJO Hibernate Persistence Package Hibernate Mapping files Generation Machine ? Database SQL schema PiMS future DM architecture

  12. PiMS future DM architecture Will be: • Less dependence • Not rely on CCPN’s generation Machine • ObjectDomain Ltd is apparently no longer trading • More flexible • Annotation within source code will control mappings, UML and SQL

  13. Database Upgrader • Changes to Data Model risk damaging existing data • Upgrader is essential to protect user data during upgrades • PIMS is already in production use by MPSI, SSPF, YSBL • Upgrader has been created for each version of PiMS: version 0.4, 0.5, 0.51 and 1.0

  14. Others • Testing: • Found 111 defects in PiMS • Fixing: • Around 100 defects • Web Functions: • MRU • Leeds Primer Order Forms

More Related