没有合适的资源?快使用搜索试试~ 我知道了~
首页high performance java persistence
A high-performance data access layer must resonate with the underlying database system. Knowing the inner workings of a relational database and the data access frameworks in use can make the difference between a high-performance enterprise application and one that barely crawls.
资源详情
资源评论
资源推荐


High-Performance Java Persistence
Get the most out of your persistence layer
Vlad Mihalcea
© 2015 - 2016 Vlad Mihalcea

To my wife and kids

Contents
I Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1. Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1 The database server and the connectivity layer . . . . . . . . . . . . . . . . . . . . 3
1.2 The application data access layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.1 The ORM framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.2 The native query builder framework . . . . . . . . . . . . . . . . . . . . . . 4
2. Performance and Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1 Response time and throughput . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Database connections boundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 Scaling up and scaling out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3.1 Master-Slave replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3.2 Multi-Master replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3.3 Sharding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
II JDBC and Database Essentials . . . . . . . . . . . . . . . . . 14
3. JDBC Connection Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.1 DriverManager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2 DataSource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.2.1 Why is pooling so much faster? . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3 Queuing theory capacity planning . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.4 Practical database connection provisioning . . . . . . . . . . . . . . . . . . . . . . 26
3.4.1 A real-life connection pool monitoring example . . . . . . . . . . . . . . . . 27
3.4.1.1 Concurrent connection request count metric . . . . . . . . . . . . . . 28
3.4.1.2 Concurrent connection count metric . . . . . . . . . . . . . . . . . . . 29
3.4.1.3 Maximum pool size metric . . . . . . . . . . . . . . . . . . . . . . . . 30
3.4.1.4 Connection acquisition time metric . . . . . . . . . . . . . . . . . . . 30
3.4.1.5 Retry attempts metric . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.4.1.6 Overall connection acquisition time metric . . . . . . . . . . . . . . . 31
3.4.1.7 Connection lease time metric . . . . . . . . . . . . . . . . . . . . . . . 32
4. Batch Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
剩余244页未读,继续阅读













安全验证
文档复制为VIP权益,开通VIP直接复制

评论0