Architecture of Popular
Architecture of Popular
Object-Relational Mapping
Providers
Craig Russell
Mitesh Meswani
Larry White
TS-4856
2007 JavaOneSM Conference | Session TS-4856 |
Goal
Agenda
Concepts of ORM
Major User-Visible Components
Major Internal Components
Performance Methodology
Key Findings/Recommendations
Call to Action
Concepts of ORM
Business Logic
Persistence aware
Uses persistence API
Domain
Objects
Persistence
Provider
Mapping
Metadata
Persistence Provider
Domain Objects
Business
Logic
Mapping Metadata
Database
Domain to database
2007 JavaOneSM Conference | Session TS-4856 |
Agenda
Concepts of ORM
Major User-Visible Components
Major Internal Components
Performance Methodology
Key Findings/Recommendations
Call to Action
Persistent Class
Persistence Unit
Entity classes
Rows, columns, primary/foreign keys
Persistence Context
Query API
Entity classes
Persistent fields/properties
Relationships
10
Connection Pooling
11
Persistent fields
Private, protected
Persistent properties
12
Byte-code Enhancement
a.k.a. weaving, transforming
13
Agenda
Concepts of ORM
Major User-Visible Components
Major Internal Components
Performance Methodology
Key Findings/Recommendations
Call to Action
14
Persistence unit
Persistence context
Entity maps/lists
15
Internal Architecture
Persistence Context
Persistence Unit
Cache
Manager
Modified
List
ID
Map
2nd Level
Cache
Transactional
Cache
Mapping
Metadata
Data Access
SQL Generation
ResultSet Processing
Statement Caching
Connection Pooling
16
Connection/
Statement
Pool
17
Agenda
Concepts of ORM
Major User-Visible Components
Major Internal Components
Performance Methodology
Key Findings/Recommendations
Call to Action
18
Performance Methodology
Choose a workload
Choose a configuration
Choose products to measure
Measure, verify, repeat (until exhaustion)
19
Performance Methodology
How do we do that?
Conduct experiments
Analyze and correlate with measurements
Modify workload and repeat
20
Performance Methodology
Why should we NOT do that?
21
Performance Methodology
Why should we NOT do that?
22
Performance Methodology
Why should we NOT do that?
23
Measuring Performance
Workload driver
Operations implementation
24
25
No Pool
Pool
40
50
60
70
80
90
Users
2007 JavaOneSM Conference | Session TS-4856 |
26
Field
Property
225
200
175
150
125
100
50
100
150
200
250
300
350
Users
2007 JavaOneSM Conference | Session TS-4856 |
27
No Cache
Cache
100
80
60
40
20
0
25
50
75
100
125
Users
2007 JavaOneSM Conference | Session TS-4856 |
28
250
225
200
175
150
50
100
150
200
250
300
350
Users
2007 JavaOneSM Conference | Session TS-4856 |
29
Key Findings
And recommendations
30
Call to Action
31
Q&A
Craig Russell
Mitesh Meswani
Larry White
http://diy.dev.java.net
32
Architecture of Popular
Object-Relational Mapping
Providers
Craig Russell
Mitesh Meswani
Larry White
TS-4856
2007 JavaOneSM Conference | Session TS-4856 |