High-Performance Spring Data JPA

Varighet: 2 dager (fra kl 09:00-16:00/17:00)

Pris: 16900

Kurskategori: Applikasjonsutvikling

Spring Data JPA is a very popular data access technology,  and knowing its inner workings can make the difference between a high-performance Spring application and one that barely crawls.  

In this training, we go through the most common performance bottleneck issues while providing the most effective solutions as well.

After this training, the students will know more about both Spring and database systems, so that they can better design and develop their application data-intensive applications.

Agenda

Day 1

1. Introduction - 1h 45m

•   O/R mismatch
•   Schema management
•   Logging SQL statements
•   Integration testing with Docker and Testcontainers

2. Mapping Types - 50m

•   Compact column types
•   JPA and Hibernate Types
•   Custom Hibernate Types
•   The Hypersistence Utils project

3. Mapping Identifiers - 55m

•   Natural and surrogate keys
•   UUIDs and clustered indexes
•   JPA and Hibernate identifiers
•   Hibernate identifier optimizers (e.g., pooled, pooled-lo)

4. Relationships - 1h 45m

•   JPA and Hibernate relationships
•   Equals and Hashcode
•   ManyToOne
•   OneToMany
•   ElementCollection
•   OneToOne
•   ManyToMany

5. Persistence Context - 1h 45m

•   Persistence Context and entity state transitions
•   Flushing and Hibernate Action Queue
•   Dirty checking mechanism
•   Bytecode enhancement dirty checking

Day 2

6. Batching and Statement Caching - 1h 45m

•   Statement vs. PreparedStatement batching
•   SQL injection
•   JDBC batching for INSERT, UPDATE, and DELETE
•   Hibernate automatic batching
•   Sorting INSERT and UPDATE statements
•   Statement lifecycle
•   Statement caching

8. Fetching - 1h 45m

•   Statement fetch size
•   Pagination Best Practices: Offset vs. Keyset
•   Projections and mapping tabular result sets to tree-based structures
•   Entity fetching
•   DTO projections vs. Entity queries
•   FetchType.LAZY vs.  FetchType.EAGER
•   Preventing N+1 query issues
•   Streaming data
•   Query plan cache settings

9. Connection and Transaction Management  - 1h 45m

•   Spring and Hibernate connection management
•   Connection pooling
•   Connection monitoring
•   Read-only and Read-write transactions
•   Transaction routing

10. Caching - 1h 45m

•   Cache synchronization strategies
•   Database caching
•   Application-level caching
•   Hibernate second-level caching

Prerequisites/ Required knowledge

It is recommended to bring your own notebook so that you can configure and run tests associated with the material we are going to go through this training.

It is expected that attendees are familiar with Java, Maven, and IDE tools like IntelliJ IDEA or Eclipse.

The attendees can set up the test environment we are going to use during the training by following the instructions provided in the training GitHub repository:

Target audience

This workshop is for any Java developer who happens to work with Spring Data JPA.

Kursinstruktør

Vlad Mihalcea is a Java Champion, one of the top Hibernate ORM project committers, passionate about concurrency challenges, high-performance enterprise solutions, and online transaction processing. Vlad wrote the High-Performance Java Persistence book which became one of the best-selling Java books on Amazon. Vlad regularly speaks at Java conferences all over the world.

He is passionate about enterprise systems, data access frameworks, and distributed systems. He wrote hundreds of articles about Hibernate on his blog , and he has a gold badge for the Hibernate, Java, and JPA tags on StackOverflow. He believes in Open Source Software, and he thinks every developer should get involved, one way or the other.

Ønsker du å samle flere ansatte til et bedriftsinternt kurs?

Finner du ikke det helt optimale kurset eller kombinasjonen av kurs? Da ordner vi det - sammen. Vi kan tilrettelegge kurs slik at de inneholder akkurat det dere har behov for. Vi kan sette opp et helt nytt kurs, eller tilpasse eksisterende kurs og materiell. Flere medarbeidere kan selvfølgelig også samles til et eget felles kurs, for maksimal effektivitet. Ta kontakt med meg for et forslag til gjennomføring og et tilbud basert på deres behov.

Henrik Buzzi