Performance oriented Spring Data JPA & Hibernate by Maciej Walkowiak

  Рет қаралды 21,491

Devoxx

Devoxx

2 ай бұрын

Hibernate - the most popular persistence technology for Java - also the most controversial one. Some people love it, some people hate it. No matter in which group you are, the chances you will work in Hibernate in at least one project are close to 100% - and you have no other choice than learning it. Not only the basics, but most importantly - how to leverage the power of Hibernate without sacrificing application and database performance.
In this session you will learn how to configure Hibernate and Spring Data JPA for efficient database connection management, what is a N+1 problem and how to solve it, how and when to use projections for fast data retrieval ... and more!

Пікірлер: 38
@vladmihalcea
@vladmihalcea 2 ай бұрын
Great talk and thanks for the shout out!
@richardwang3438
@richardwang3438 Ай бұрын
you look familiar
@frostbittenkingdoms245
@frostbittenkingdoms245 Ай бұрын
Of course you were mentioned in the first five minutes :D.
@vladmihalcea
@vladmihalcea 25 күн бұрын
@@frostbittenkingdoms245 Who would have thought? :D
@jonnycoddington1883
@jonnycoddington1883 2 ай бұрын
This is an absolute goldmine, thanks Maciej!!! We have a part of our application that takes about 40ms to do a simple insert so this talk is excellently timed 👌🏻
@lytung1532
@lytung1532 Ай бұрын
Thanks for sharing. More sessions like this please!
@JorgeCorradi
@JorgeCorradi Ай бұрын
Pure gold! Thank you so much for the awesome presentation.
@tobyzieglerrr
@tobyzieglerrr 2 ай бұрын
Very very good talk, hands on and i took away at least 4 things that i did not know or did not fully understand before. Thanks!
@user-me3df3xx6l
@user-me3df3xx6l Ай бұрын
This was exceptionally useful, thanks mr. Walkowiak
@rieckpil
@rieckpil 2 ай бұрын
Awesome talk, Maciej. One can not emphasis enough the importance of understanding what's going on behind Hibernate & Spring Data JPA - I really liked the wallpaper 🍃
@jimishukurow2286
@jimishukurow2286 Ай бұрын
Definitely need to try PROJECTIONS ...
@CanhNguyen-ls7kq
@CanhNguyen-ls7kq Ай бұрын
Good talk, thank you Maciej
@praveens2272
@praveens2272 2 ай бұрын
If anyone doesn't understand jpa and hibernate at this level(internal workings), they will screw up the application. I think it's better to write plain SQL queries and execute or may be JOOQ helpful.
@rajeshhazari
@rajeshhazari Ай бұрын
Thanks, do you have any simple spring boot starter for Jooq for and intermediate level experience with jdbc and pure sql
@praveens2272
@praveens2272 Ай бұрын
@@rajeshhazari i didn't understand your question, you need code samples for JOOQ ?
@rajeshhazari
@rajeshhazari Ай бұрын
​@@praveens2272 yes some samples starters using jooq to show complex examples
@SBala-xk6lr
@SBala-xk6lr Ай бұрын
This was exceptional. Thanks
@ayoubzoubeidi8052
@ayoubzoubeidi8052 Ай бұрын
thank you for this amazing talk
@fipabrate
@fipabrate 2 ай бұрын
Very very good talk. I enjoyed it
@tahahajivand1843
@tahahajivand1843 Ай бұрын
it was really helpful. thank you for your hard work
@joachimdietl6737
@joachimdietl6737 Ай бұрын
I once attended one of Vlad's lectures at the JAX and i had the feeling (same as here) that the time is over, when it is getting interesting.
@TheMrDrakiula
@TheMrDrakiula 2 ай бұрын
Vlad actually used to work on the Hibernate project for RedHat in the past at some point.
@joachimdietl6737
@joachimdietl6737 Ай бұрын
Nice video!
@odrotbohm
@odrotbohm 2 ай бұрын
Is there any reason you did not fix the aggregate model instead? It's a phenomenon I run into quite frequently: folks run into performance problems and immediately resort to tweaking persistence metadata, when *actually* the problem is in the model itself. Spring Data deals with DDD aggregates, in which Many-to-One relationships to other aggregates have no place at all. Those would be modeled as identifier references instead, so that these are basic values to Hibernate, and it would not need to resolve references The entire lazy/eager discussion is avoided on the Hibernate level. No get-by-reference tricks, no tweaking of Hibernate metadata. Applications would simply resolve the identifiers when they *actually* need the reference. Creating a BankTransfer wouldn't even need to resolve the accounts beforehand.
@illyam689
@illyam689 Ай бұрын
34:34 "It's a commercial tool, which is great.. for Vlad" ROTFL!! 🤣🤣🤣
@vivekbansal-bc9eg
@vivekbansal-bc9eg Ай бұрын
I have a question in bank transfer execute method he said hibernate will open the session then closes in case of findById.But earlier he said because of OSIV it mantains a session throughout request after a db call. can anyone answer
@kavinduchamiran4869
@kavinduchamiran4869 Ай бұрын
27:20 I didn't understand how annotating the execute() method with @Transactional reduced the number of database queries. Can someone explain pls?
@TheMaciejek
@TheMaciejek Ай бұрын
Because we have already assigned ids for these entities, and thus save() method will underneath invoke merge() instead of persist() and merge underneath has to check if these entities exists, so it has to issue another select query. In case when you are using @Transactional, the entities from the first and second select will be stored in hibernate session cache and thus the merge, instead of firing new request, can simply take it from cache.
@kanaillaurent526
@kanaillaurent526 Ай бұрын
First YAGNI Spring
@nirmalmewada
@nirmalmewada Ай бұрын
Simple answer is dont use Hibernate, It makes simple problem more simpler (which we might not need) and complex problem more complex (which we definatly not need it), Got for micro framework like MyBatis if you really want to consider performance, its great sweet point.
@abirbasak1948
@abirbasak1948 Ай бұрын
Using hibernate for 5 years, I agree that it is not the best tool for database handling. Most of the time plain SQL is much more predictable and easy to work with
@praveens2272
@praveens2272 2 ай бұрын
This demo code is available in GitHub? If not please share the link. Thanks.
@gauntr
@gauntr 2 ай бұрын
Gib code pls 😂
@Arunkumar-uz3vh
@Arunkumar-uz3vh Ай бұрын
It's there on his GitHub page. Repo name: performance-oriented-spring-data-jpa-talk
@geraldodev
@geraldodev 2 ай бұрын
Or use SQL and clojure with it's awesome data strucutres :)
@Sucheit
@Sucheit 2 ай бұрын
cant even lazy load one to one
@matdryz
@matdryz Ай бұрын
Do you have a long running transaction? just split it into two transactions 😂
@jimishukurow2286
@jimishukurow2286 Ай бұрын
Projections with nested entities are sucks ...
Bootiful Spring Boot 3 x by Josh Long
44:32
Devoxx
Рет қаралды 26 М.
О, сосисочки! (Или корейская уличная еда?)
00:32
Кушать Хочу
Рет қаралды 4 МЛН
Зу-зу Күлпәш. Агроном. (5-бөлім)
55:20
ASTANATV Movie
Рет қаралды 522 М.
路飞关冰箱怎么关不上#海贼王 #路飞
00:12
路飞与唐舞桐
Рет қаралды 6 МЛН
顔面水槽がブサイク過ぎるwwwww
00:58
はじめしゃちょー(hajime)
Рет қаралды 99 МЛН
Spring Data JPA from 0-100 in 60 minutes
1:02:31
VMware Tanzu
Рет қаралды 80 М.
How Netflix Really Uses Java
50:31
InfoQ
Рет қаралды 26 М.
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 916 М.
DONT USE AN ORM | Prime Reacts
25:46
ThePrimeTime
Рет қаралды 192 М.
Java 21 JVM & GC Improvements #RoadTo21
12:09
Java
Рет қаралды 15 М.
Google IO 2024 Full Breakdown: Google is RELEVANT Again!
27:35
Matthew Berman
Рет қаралды 39 М.
Я Создал Новый Айфон!
0:59
FLV
Рет қаралды 3,1 МЛН
Я Создал Новый Айфон!
0:59
FLV
Рет қаралды 3,1 МЛН
What % of charge do you have on phone?🔋
0:11
Diana Belitskay
Рет қаралды 314 М.