Parallel and Asynchronous Programming with Streams and CompletableFuture by Venkat Subramaniam

  Рет қаралды 68,335

Devoxx

Devoxx

6 жыл бұрын

Subscribe to Devoxx on KZbin @ bit.ly/devoxx-youtube
Like Devoxx on Facebook @ / devoxxcom
Follow Devoxx 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.
Dr. Venkat Subramaniam is an award-winning author, founder of Agile Developer, Inc., creator of agilelearner.com, and an instructional professor at the University of Houston. He has trained and mentored thousands of software developers in the US, Canada, Europe, and Asia, and is a regularly-invited speaker at several international conferences. Venkat helps his clients effectively apply and succeed with sustainable agile practices on their software projects.
Venkat is a (co)author of multiple technical books, including the 2007 Jolt Productivity award winning book Practices of an Agile Developer. You can find a list of his books at agiledeveloper.com. You can reach him by email at venkats@agiledeveloper.com or on twitter at @venkat_s

Пікірлер: 56
@tdrake59
@tdrake59 6 жыл бұрын
Best statement in this video: "If you want to run code really fast and you don't care about result being really wrong then you should go back and program in C++".
@cukamart
@cukamart 6 жыл бұрын
I am simple man. I see Venkat I press like
@shyambaitmangalkar1511
@shyambaitmangalkar1511 6 жыл бұрын
This is a comprehensive guide to understand parallel and asynchronous programming with Stream APIs
@goxr3plus_studio
@goxr3plus_studio 6 жыл бұрын
*Venkat is a real Java, Scala, Groovy Boss* 👑
@PatrickCornelien
@PatrickCornelien 6 жыл бұрын
And Kotlin
@almasabdrazak5089
@almasabdrazak5089 4 жыл бұрын
@@PatrickCornelien and . net
@crabsynth3480
@crabsynth3480 5 жыл бұрын
Perfection is Venkat ! What a passionate teacher... Really makes me want to improve my programming and thinking skills. Venkat turns coding into some sort of performance art like music... Its like watching a composer conducting a symphony.
@c0mpuipf
@c0mpuipf 3 жыл бұрын
reading books about java not understanding anything -> come back to this guy's presentations - everything makes sense
@marcinkurek2950
@marcinkurek2950 4 жыл бұрын
This is simply excellent! Easy to understand, well-structured, put in simple way and hilarious at times. Thank You sir!
@tdrake59
@tdrake59 6 жыл бұрын
Venkat, I've watched several of your presentations, and I feel that I should say that you are one of the best out there. Your presentations are exhaustive but succinct, effective, and compelling.
@superman-up7rm
@superman-up7rm 4 жыл бұрын
Truly a java master , efficient lecturer 👍.. Everything to the point.. I also saw another video of this guy , compared to other horrible and outdated java stuff on KZbin, this is far beyond awesome. 10 out of 10 would recommend.
@juanmf
@juanmf 4 жыл бұрын
incomplete index: Parallel streams: 12:30 Structure of concurrent vs sequential code // begging error prone as lost comment 14:00 Sequential() 16:30 & 20:30 Parallel() vs Sequential() 18:00 observing threads // end error prone 22:20 order of execution (forEachOrdered()) 24:00 Controlling the order 28:10 parallel and Filtering 30:00 reduce 39:00 parallel and reduce 42:20 Parallel stream 50:50 How many threads & where are things running 54:50 work stealing 56:45 Change n of threads at JVM 1:02:55 Changing to a new ThreadPool programmatically 1:07:30 Parallel != fast 1:18:00 Find1st vs findAny 1:23:00 parallel and resource utilization efficiency Completable Future: 1:28:00 Async execution 1:29:00 callbacks; promise 1:33:55 Java CompletableFuture == JS promise 1:37:30 supplyAsync(() -> {}); get() vs getNow(default) 1:41:30 thenAccept(data -> {}) 1:44:00 speed of caller (main thread); that determines who runs the code 1:46:00 ForkJoinPool supplyAsync(() -> {}, pool1), still main might steal work. 1:47:34 Async vs no Async, choose thread to run. thenAcceptAsync(fn, pool2) 1:52:10 creating pipelines 1:55:50 error channel/exceptions
@raghavanaliassaravananm1546
@raghavanaliassaravananm1546 3 жыл бұрын
Awesome
@rioszac60
@rioszac60 3 жыл бұрын
You deserve a beer 🍺 🙂
@maxfarsikov2197
@maxfarsikov2197 6 жыл бұрын
How can he manage to: talk, read error, find typo, and fix it without interrupting? 25:03 :) I love all his talks
@kolmnurk
@kolmnurk 5 жыл бұрын
just started to scroll comments to see if anyone else noticed it :D inhuman!
@juanmf
@juanmf 4 жыл бұрын
multi-threading...
@vipinkoul595
@vipinkoul595 Жыл бұрын
@@juanmf Is it multi-tasking or multi-threaded or multi-programming :-) how does he context switch ;-)
@samuelasmelash8719
@samuelasmelash8719 4 жыл бұрын
I love the way he present not only in this video but all his presentation.
@ptyxs
@ptyxs 5 жыл бұрын
Fantastic talk, as usual with Venkat Subramanian !!
@boosan_m
@boosan_m 3 жыл бұрын
He holds us through is wit and presentation.
@briansupra7
@briansupra7 6 жыл бұрын
Another brilliant presentation from Venkat.
@coderanger75
@coderanger75 6 жыл бұрын
Wow, amazing presentation. It would be an amazing opportunity to work with Venkat
@nO_d3N1AL
@nO_d3N1AL 6 жыл бұрын
Great presentation, especially regarding number of threads to use.
@anindya7911
@anindya7911 5 жыл бұрын
Wonderful way of delivery and easy to understand
@priyanshuborthakur7773
@priyanshuborthakur7773 6 жыл бұрын
One word. Superb.
@check43210
@check43210 5 жыл бұрын
amazing speech, content and examples.. excellant
@cooldudecs
@cooldudecs 6 жыл бұрын
Excellent!
@nupursharma5905
@nupursharma5905 5 жыл бұрын
you are AWESOME!!!
@fstreamdl1631
@fstreamdl1631 6 жыл бұрын
damn !!! this guy is awesome
@rahul41189
@rahul41189 6 жыл бұрын
Perfect..... very valuable info...... Thanks :)
@naresh_muthyala
@naresh_muthyala 6 жыл бұрын
Nice explanation of stream api
@binodkumarsingh1705
@binodkumarsingh1705 5 жыл бұрын
You are full on code, Thanks for this... :)
@samuelvishesh
@samuelvishesh 6 жыл бұрын
We need more of this for Java noobs like me 💜😍
@Lahiru_Udana
@Lahiru_Udana 5 жыл бұрын
Thank you
@kenichimori8533
@kenichimori8533 6 жыл бұрын
Beyond high sense
@runthecode_
@runthecode_ 3 жыл бұрын
I wish my university professors were this good 😁
@nguyenquan4836
@nguyenquan4836 Жыл бұрын
Super sir
@sibin_peter
@sibin_peter 6 жыл бұрын
Where can I download the notes for this? Usually he has them at his website under agiledeveloper.com/downloads.html but doesn't seem to have this particular talk included.
@Howard_Roark_4eva
@Howard_Roark_4eva 6 жыл бұрын
How to find out the value of blockingfactor for an app? Can it be computed?
@Ravikumar-gj6qw
@Ravikumar-gj6qw 2 жыл бұрын
Tq venkat
@tushargoel5522
@tushargoel5522 5 жыл бұрын
at 2:10:16, venkat mention about completeOnTimeout.. but this API is available since Java 9 not 8
@Ahliddin007
@Ahliddin007 6 жыл бұрын
I love Venkat presentations, but my eyes simply couldn't watch this with screen constantly micro-jumping.. Is there anywhere the same talk with better video quality?
@antildeepak
@antildeepak 6 жыл бұрын
What is this Sleep.sleep? Is it some custom implementation for Thread.sleep? I don't get it in Java API
@krushnatkhawale1149
@krushnatkhawale1149 6 жыл бұрын
Deepak Antil you've got it right, hidden implementation of standard sleep operation.
@Saurabhnaik
@Saurabhnaik 5 жыл бұрын
1:25 CompletableFuture
@gurugajananbhat5408
@gurugajananbhat5408 5 жыл бұрын
Beautiful... Can we have shorter session on the same.. ? I really appreciate you sir for the great work. But need shorter session.
@ajaydhingra1982
@ajaydhingra1982 6 жыл бұрын
The reason why he is not getting performance change at 1:11 is because he is creating thread pool with different size but eventually using only one thread always from the pool :-) and i think same the the problem @ 1:05. He is using only one thread out of ForkJoinPool so 50/100 does not matter
@crabsynth3480
@crabsynth3480 5 жыл бұрын
I don't understand the underlying implementations completely so I'm not certain but where does the code say that the threads in the pool has different sizes? And where does it say that only one thread is being used from the pool...?? Maybe under the hood the language is doing what you said so that's what he is demonstrating just that... But I couldn't understand or see how he manually created a pool of different sized threads then only used one. Also your timestamps are off by a unit. Interesting idea nonetheless... Would like to know more about your reasoning.
@MrTheking200794
@MrTheking200794 6 жыл бұрын
Which ide he is using ? i am asking because ide is showing output instantly
@Anbu_Sampath
@Anbu_Sampath 6 жыл бұрын
Mian Muhammad Zubair textmate
@MrTheking200794
@MrTheking200794 6 жыл бұрын
Okay textmate is only for mac i guess thx for reply
@narendraswm
@narendraswm 6 жыл бұрын
1:25:25
@relaxsightme
@relaxsightme 6 жыл бұрын
Nice talking.
@saulmighty
@saulmighty 6 жыл бұрын
He always pronounces years as ears😁
@crabsynth3480
@crabsynth3480 5 жыл бұрын
That's how we pronounce it in India he he... Also same goes for hours(ours) , is(ease) etc etc...
Kotlin for Java Programmers by Venkat Subramaniam
51:40
Devoxx
Рет қаралды 56 М.
ROCK PAPER SCISSOR! (55 MLN SUBS!) feat @PANDAGIRLOFFICIAL #shorts
00:31
Always be more smart #shorts
00:32
Jin and Hattie
Рет қаралды 46 МЛН
Incredible magic 🤯✨
00:53
America's Got Talent
Рет қаралды 38 МЛН
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 170 #shorts
00:27
Do not walk away from Complexity, Run - Venkat Subramaniam
57:03
Plain Functional Programming by Martin Odersky
46:58
Devoxx
Рет қаралды 97 М.
Exploring Java 9: The Key Parts by Venkat Subramaniam
2:34:10
Event Sourcing   You are doing it wrong by David Schmitz
43:05
The JVM and Docker. A good idea? by Christopher Batey
46:54
FP vs OOP: Choose Two by Brian Goetz
42:59
Devoxx
Рет қаралды 31 М.
Tomasz Nurkiewicz - CompletableFuture in Java 8, asynchronous processing done right
1:01:10
Using Traits, Mixins and Monads in JVM Languages
3:03:06
Parleys
Рет қаралды 7 М.
Мой инст: denkiselef. Как забрать телефон через экран.
0:54