Parallel and Asynchronous Programming with Streams and CompletableFuture by Venkat Subramaniam

preview_player
Показать описание

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.

Рекомендации по теме
Комментарии
Автор

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++".

tdrake
Автор

This is a comprehensive guide to understand parallel and asynchronous programming with Stream APIs

shyambaitmangalkar
Автор

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.

crabsynth
Автор

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

juanmf
Автор

I am simple man. I see Venkat I press like

cukamart
Автор

*Venkat is a real Java, Scala, Groovy Boss* 👑

goxrplus_studio
Автор

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 YouTube, this is far beyond awesome. 10 out of 10 would recommend.

superman-uprm
Автор

This is simply excellent! Easy to understand, well-structured, put in simple way and hilarious at times. Thank You sir!

marcinkurek
Автор

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.

tdrake
Автор

reading books about java not understanding anything -> come back to this guy's presentations - everything makes sense

cmpuipf
Автор

I love the way he present not only in this video but all his presentation.

samuelasmelash
Автор

How can he manage to: talk, read error, find typo, and fix it without interrupting? 25:03 :) I love all his talks

maxfarsikov
Автор

He holds us through is wit and presentation.

boosan_m
Автор

Wow, amazing presentation. It would be an amazing opportunity to work with Venkat

coderanger
Автор

Fantastic talk, as usual with Venkat Subramanian !!

ptyxs
Автор

Wonderful way of delivery and easy to understand

anindya
Автор

Great presentation, especially regarding number of threads to use.

nO_dNAL
Автор

Another brilliant presentation from Venkat.

briansupra
Автор

amazing speech, content and examples.. excellant

check
Автор

at 2:10:16, venkat mention about completeOnTimeout.. but this API is available since Java 9 not 8

tushargoel
join shbcf.ru