14
Developing PiMS 1.0 Bill Lin

Developing PiMS 1.0

  • Upload
    sarila

  • View
    52

  • Download
    0

Embed Size (px)

DESCRIPTION

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. - PowerPoint PPT Presentation

Citation preview

Page 1: Developing PiMS 1.0

Developing PiMS 1.0

Bill Lin

Page 2: 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%)

Bill Lin - Developing PiMS 1.0

Page 3: Developing PiMS 1.0

PiMS architecture

Generic servlets

Data Model API

Database

Persistence layer

Presentation model API

Java server pages Applet?

Page 4: Developing PiMS 1.0

PiMS old DM architecture - Before V0.5

CCPN generatedDatamodel API(117k lines of code)

PIMS DM API (4k lines of code)

CCPN generated Persistence Api (2k lines of code)

DatabaseCCPN

generated SQL

schema

CCPN generation Machine

CCPNDataModel

Page 5: Developing PiMS 1.0

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

Main Problems

Page 6: Developing PiMS 1.0

PiMS new DM architecture - After V0.5

Generated**Datamodel API(25k lines of code)

PIMS DM API **(2k lines of code)

Hibernate Persistence Package

Database*

CCPN* generated

SQL schema

(CCPN) generation Machine

CCPN*DataModel

Hibernate Mapping

files

* Same as before**Most interface same as before

Page 7: Developing PiMS 1.0

■ 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

Improvement

Page 8: Developing PiMS 1.0

■ Generated code is much easier to understand■ Generated code reduced from 117k to 25k

lines

Improvements

Page 9: Developing PiMS 1.0

■ 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:

Improvements

MetaClass metaClass = version.getModel().getMetaClass(ccp.api.Target.Status.class.getName());Collection statuses = version.getAll(metaClass);

Collection<Status> statuses=version.getAll(Status.class);

Page 10: Developing PiMS 1.0

■ 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

Improvements

Page 11: Developing PiMS 1.0

PiMS future DM architecture

Datamodel Api PIMS API

Hibernate Persistence Package

Database SQL schema

DataModel

Hibernate Mapping

files

Annotation in POJOAnnotation in POJO

Generation Machine

?

Page 12: Developing PiMS 1.0

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

PiMS future DM architecture

Page 13: Developing PiMS 1.0

■ 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

Database Upgrader

Page 14: Developing PiMS 1.0

■ Testing:■ Found 111 defects in PiMS

■ Fixing:■ Around 100 defects

■ Web Functions:■ MRU■ Leeds Primer Order Forms

Others