Parallel and Asynchronous Programming with Streams and CompletableFuture with Venkat Subramaniam

  Рет қаралды 147,613

Devoxx

Devoxx

6 жыл бұрын

Please subscribe to our KZfaq channel @ bit.ly/devoxx-youtube
Like us on Facebook @ / devoxxcom
Follow us on Twitter @ / devoxx
Java 8 makes it relatively easy to program with parallel streams and to implement asynchronous tasks using CompletableFuture. When someone says it’s easy, cautious programmers ask “What’s the catch?” Well, of course, that’s one of the major topic we’ll address in this deep dive session. We will start with a fast introduction to parallel and asynchronous programming with Java 8 and quickly delve into the gotchas, when to use these facilities, when to avoid them, and how and where to put them to good use.

Пікірлер: 91
@user-gk4zw9sf4r
@user-gk4zw9sf4r 4 жыл бұрын
26:43 parallel() and sequential() the last one called wins. 43:40 forEachOrdered() 1:01:00 identical value for reduce operation. Here is my question, if the reduce operation always requires an identical value for initializing it, why doesn't Java omit the parameter? 1:05:00 How many threads should I create? 1:15:36 configuring number of threads JVM wide 1:34:27 CompletableFutures 1:38:10 Lesson from Javascript--Promise 1:39:22 Exception handling and functional programming are mutually exclusive. 1:47:00 Famous or popular functional interfaces; 2:00:47 Thread of execution. 2:12:11 Comparison of stream and completableFuture 2:17:44 Pipeline of completableFuture 2:27:44 Exceptionally 2:44:18 Succeed on timeout 2:53:32 Combine and compose
@moshecsbgu1
@moshecsbgu1 4 жыл бұрын
"If the reduce operation always requires an identical value for initializing it, why doesn't Java omit the parameter?" Not identical but IDENTITY. For different domains and operations you may have different identity values. For example, for integers and '+' the identity is 0, but for integers and '*' the identity is 1.
@akshayshukla2640
@akshayshukla2640 3 жыл бұрын
@@moshecsbgu1 u r a good listener 🙂
@lonbpalmer
@lonbpalmer 3 жыл бұрын
Thank you so much for this!
@dhirajnavale3861
@dhirajnavale3861 10 ай бұрын
not all heroes wear capes, thank you @user-gk4zw9sf4r
@manuel__Youtube
@manuel__Youtube 10 ай бұрын
Why my completalefuture works good with multiple threads in a 2 core system but not in >2 cores?
@MeplaSN
@MeplaSN 4 жыл бұрын
I will recommend this to anyone who is ever interested in understanding Streams and CompletableFutures in Java. It helped me immensely when I started working with Java in my new job after 5 years of Python. Wonderful presentation!
@jorgevillarreal2245
@jorgevillarreal2245 3 жыл бұрын
This guy has to be on something to be able to explain it so flawlessly. Thanks for the video man !
@thepeerdependency
@thepeerdependency Жыл бұрын
I love this guy's talks. Undoubtedly the best videos on Java.
@codeclandelivery3997
@codeclandelivery3997 3 жыл бұрын
I'm sharing this video to anyone I know who's ever made remarks about Java being stuck in the past! Venkat is such a great speaker - such a legend.
@wwhill8033
@wwhill8033 5 жыл бұрын
So well done, and very understandable. Venkat you are my Hero!!
@TheTarnonero
@TheTarnonero 3 жыл бұрын
Thanks to venkat and devoxx. Venkat, you' have a wealth of knowledge that leaves me speechless every time. Your lessons are the best.
@madhanganesh1
@madhanganesh1 4 жыл бұрын
This is awesome talk. Venkat really tied down to all 3+ hours with very interesting talk
@rathinmaheswaran
@rathinmaheswaran 3 жыл бұрын
Finished watching this video for three days . Was tough to analyse and digest it initially. U r my hero Venky brother ❤️
@brujua7
@brujua7 5 жыл бұрын
Great, amazing talk! Very well carried and so dense in the good sense. Really deserves a full course. Thank you! Next time please leave the question part on the video, it must have been very good judging from the knowledgeable audience.
@pdukale9
@pdukale9 2 жыл бұрын
Explained in a Simple and practical way, this is the way an expert teaches, he makes complex things simple
@BharCode09
@BharCode09 4 жыл бұрын
"While you are debugging the code, you applied for another job- that's called concurrency!". "Synchronize and suffer model"... Omfg so true! That's exactly how it screwed developers' not only career but also life.
@akshayavenkatesan2912
@akshayavenkatesan2912 Жыл бұрын
This is gold. Lovvvveee the presentation and the way it was taught. Just perfectttt.. Thanks a tonne Venkat !
@lamhoi5904
@lamhoi5904 2 жыл бұрын
amazing, it really covers all the concepts I am looking for to learn, not just the ones in titles, for the parts don't understand for me and you, can go further into it, love you
@PheonxD
@PheonxD 2 жыл бұрын
Amazing presentation! That was a great introduction to streams and CompletableFuture, easy to understand and follow despite the concepts being hard to grasp. I feel inspired to play around with it myself :D I’ll recommend this to anyone confused with those topics. Thanks a lot, Venkat and Devoxx for sharing it for free!
@PennyToPound
@PennyToPound Жыл бұрын
Amazing style, very intuitive! Didn’t realise how three hours flied 😊😊 I felt like watching a Netflix series with the same concentration.. mind blowing
@Nampjg
@Nampjg 3 жыл бұрын
I have understood the difference between imperative and functional programming first time after listening to his talk :))
@HelloWorld-us9td
@HelloWorld-us9td 4 ай бұрын
This is the best video of CompletableFuture I have ever seen.
@alexhelkar
@alexhelkar 4 жыл бұрын
Thanks Venkat! What an awesome talk!
@brujua7
@brujua7 5 жыл бұрын
Keep an eye on Project Loom, an addition to the Java VM for very lightweight user-mode threads (fibers) .
@blingsingh1057
@blingsingh1057 4 жыл бұрын
Thanks @Devoxx team
@padcom
@padcom 8 ай бұрын
Always a pleasure to listen to Venkat!
@uditgupta6997
@uditgupta6997 5 жыл бұрын
Absolutely amazing talk
@KoenDeJaeger
@KoenDeJaeger 5 жыл бұрын
Great teacher!
@vaneetsharma735
@vaneetsharma735 3 жыл бұрын
amazing. Thank you very much Venkat
@lamhoi5904
@lamhoi5904 2 жыл бұрын
After watching this video, I found out I spent too much time to watch entertain videos, miss this kind of amazing learning videos, then I think I will do the master switch like in video
@emoutraspalavras-marloncou4459
@emoutraspalavras-marloncou4459 2 жыл бұрын
I love how hilarious he is. Very good lecture, professor. I could learn from hours and hours. I first met functional programming thanks to Haskell and I was amazed when I found out that Java had introduced to Java world a functional API. And I was even more surprised to see people using it in the marketplace. For example, in the Spring Framework you end up resorting to functional techniques all the time.
@marshdsilva32
@marshdsilva32 6 жыл бұрын
Amazing I am getting addicted
@neutronstar6739
@neutronstar6739 3 жыл бұрын
I wish i found this video when i was working with asynchronous functions in java
@baburaomulaparthi4531
@baburaomulaparthi4531 11 ай бұрын
Hi sir Thank you so much for sharing intense knowledge on Compleatablefuture and streams.
@neuemage
@neuemage 6 жыл бұрын
Venkat is the best! not even interested in java im watching the whole thing lol
@zurumogbonda3225
@zurumogbonda3225 Жыл бұрын
Watching all Venkat videos and reading all his posts 🙌
@ITech2005
@ITech2005 4 жыл бұрын
This is so underrated.
@Baroquepassion
@Baroquepassion 3 жыл бұрын
extremely helpful and interesting.
@mattgraves3709
@mattgraves3709 3 жыл бұрын
I love your talks Venkat
@nosh3019
@nosh3019 2 жыл бұрын
So valuable, if only i could like twice :)
@sureshnaidu6276
@sureshnaidu6276 3 жыл бұрын
Thanks venkat🙏🙏
@DebabrataPatnaik
@DebabrataPatnaik Жыл бұрын
Just one line its awsome even after 10 years.
@rahuldeepattri9244
@rahuldeepattri9244 4 жыл бұрын
Just Wow!
@hi10drakk
@hi10drakk 3 жыл бұрын
what is the text editor? looks transparent
@AjayYadav-rs9nj
@AjayYadav-rs9nj 2 жыл бұрын
Need to move records from one schema to another schema in db. how can we achieve using Multithreading ?
@guvenseckin542
@guvenseckin542 4 жыл бұрын
Thanks man
@SaravananD
@SaravananD 3 жыл бұрын
The software developer saying to his boss that the project "completedExceptionally" is a good one :)
@UmeshKumar-pq3kc
@UmeshKumar-pq3kc 3 жыл бұрын
Just Awesome
@souvaniksaha
@souvaniksaha 10 ай бұрын
If I want to use map with parallel stream and I want to maintain order. In that case how is it possible ?
@RamKumar-rg3gr
@RamKumar-rg3gr 3 жыл бұрын
Well done pandit ji
@Saurabhnaik
@Saurabhnaik 3 жыл бұрын
Which editor is this?
@nandakumar2933
@nandakumar2933 3 жыл бұрын
impressive !
@dpkpk1573
@dpkpk1573 2 жыл бұрын
Excellent
@charan775
@charan775 Жыл бұрын
any idea which text editor he's using?
@debkr
@debkr Жыл бұрын
Awesome 👍
@relaxsightme
@relaxsightme 6 жыл бұрын
nice talk
@javastreamsapimicroservice9319
@javastreamsapimicroservice9319 2 жыл бұрын
What ide are u using
@KinGxWolF
@KinGxWolF 3 жыл бұрын
Venkat the 🐐!!!!
@63_prathameshzore2
@63_prathameshzore2 Жыл бұрын
what is that editor he is using ?? btw great talk.
@dumizel
@dumizel 8 ай бұрын
supa great, thx)
@IwanSatria
@IwanSatria 4 жыл бұрын
I still don't understand this part (2:21:16). Why does it return 2 instead of 5? The chain should already be extended by then, right? Why is it overwritten with the "thenAccept" instead?
@Brajgamer
@Brajgamer 4 жыл бұрын
Good question That's because at line 13 the call to thenAccept creates a new pipeline and it's not wired to pipeline above it at line 6. It is rather a completely new pipeline rewired to line 19 separately. That's because the lazy evaluation of the code. Both pipeline at line 6 and at the line 13 aren't triggered until there is call to complete at line 19 And at that time both triggered parallely and the second pipeline at line 13 is only printing the data
@rahuldeepattri9244
@rahuldeepattri9244 4 жыл бұрын
@@Brajgamer Many thanks!!!
@yotubecreators47
@yotubecreators47 6 жыл бұрын
best talk ever
@RonTheFlyingDutchman
@RonTheFlyingDutchman 4 жыл бұрын
Then this is the best blog ever: www.baeldung.com/java-completablefuture
@Joseph-oz7tx
@Joseph-oz7tx 8 ай бұрын
The Venkat jokes kill me 🤣😂😅 no no no we shouldn't understand quickly
@ShekharPrasadRajak
@ShekharPrasadRajak 2 жыл бұрын
Just ❤️
@devk5061
@devk5061 5 ай бұрын
Venkat is like sivaji the bossss.!!!!!!!❤
@baburaomulaparthi4531
@baburaomulaparthi4531 11 ай бұрын
Can you please upload classes on jvm architecture and working of jvm.
@thatoneuser8600
@thatoneuser8600 2 жыл бұрын
2:07:00 important 2:10:40 why to use thenRun
@eigbiremolenaugustine6737
@eigbiremolenaugustine6737 6 жыл бұрын
Great!! Does anybody know the IDE he used?
@waqasrana7891
@waqasrana7891 5 жыл бұрын
textmate
@rchalicham
@rchalicham 5 жыл бұрын
i would like to know as well
@Coding-pp9pu
@Coding-pp9pu 4 ай бұрын
1:17:53 Result is not same in both cases.. notice last digits 22944E12 and 2295E12
@tomaszzasada956
@tomaszzasada956 2 жыл бұрын
Really nice video. However he really wanted to look like he doesn't need IDE, but after few hours of lecture he started making simple mistakes that every IDE would point out immediately.
@talesara74
@talesara74 3 жыл бұрын
But I want to argue why did you choose such a complex example explaining parallell programming and asynch programming!
@sudosai
@sudosai 7 ай бұрын
1:34:26
@unpaiddonkey
@unpaiddonkey 3 жыл бұрын
47:23
@Abitgenius
@Abitgenius 4 жыл бұрын
...and what took 12 minutes to run now took exactly TWELVE minutes to run.. haha 20:00
@AhmetSezginDuran
@AhmetSezginDuran 5 жыл бұрын
"...That's called concurrency" 12:55 ROFL!
@andy12829
@andy12829 7 ай бұрын
Brahmin People are so Intelligent 🧠 , Venkat Is an example ❤
@RoloJE1
@RoloJE1 3 жыл бұрын
Here is a cheesy joke. Why was main so busy with 7. Well, because main was afraid of 7 as 789....
@michelleIX
@michelleIX 2 жыл бұрын
28:04 He was talking so fast..holy s.I thought it was fast forwarding
@padcom
@padcom 8 ай бұрын
Might I add that the API in Java is a massacre compared to ECMAScript's version, and that is the nicest way I can express what was shown here without resolving to French
@narasimharao7576
@narasimharao7576 2 жыл бұрын
Thanks Venkat! What an awesome talk!
Red❤️+Green💚=
00:38
ISSEI / いっせい
Рет қаралды 85 МЛН
БАБУШКИН КОМПОТ В СОЛО
00:23
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 17 МЛН
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Паша Осадчий
Рет қаралды 10 МЛН
Получилось у Миланы?😂
00:13
ХАБИБ
Рет қаралды 4,3 МЛН
Functional Programming with Java 8 by Venkat Subramaniam
51:39
Do not walk away from Complexity, Run - Venkat Subramaniam
57:03
What's Looming in Spring? by VENKAT SUBRAMANIAM & JOSH LONG
52:26
Principles Of Microservices by Sam Newman
56:13
Devoxx
Рет қаралды 318 М.
Code Review, you said? - Venkat Subramaniam
46:06
Developer Summit
Рет қаралды 11 М.
Looks very comfortable. #leddisplay #ledscreen #ledwall #eagerled
0:19
LED Screen Factory-EagerLED
Рет қаралды 6 МЛН
Новые iPhone 16 и 16 Pro Max
0:42
Romancev768
Рет қаралды 2,2 МЛН
Look, this is the 97th generation of the phone?
0:13
Edcers
Рет қаралды 7 МЛН
Частая ошибка геймеров? 😐 Dareu A710X
1:00
Вэйми
Рет қаралды 3,1 МЛН
Это Xiaomi Su7 Max 🤯 #xiaomi #su7max
1:01
Tynalieff Shorts
Рет қаралды 2,1 МЛН
Опасность фирменной зарядки Apple
0:57
SuperCrastan
Рет қаралды 11 МЛН