03 Why do reactive programming (Reactive programming with Java - full course)

preview_player
Показать описание
Course: Reactive programming in Java
Covers: Reactive fundamentals, Project Reactor

Access this full course NOW & unlock more awesome courses like this by becoming a member:

Website:

Learn the basics of reactive programming. You will learn to "THINK REACTIVE" - understand the paradigm shift and thinking change necessary to write code in a reactive way using Project Reactor.

New video every 3 days! Subscribe and enable notifications to be alerted.
Рекомендации по теме
Комментарии
Автор

Done thanks
Problems with traditional blocking IO:
Unnecessarily performing blocking requests sequentially (when they could be done parallel), but even if we do them in parallel, we will improve performance but we still have to block until they all finish to return our type.

Threads handling requests are idle blocked on IO, more threads are spun up as requests keep coming in and that’s a bottleneck we can’t spin up too many threads

mostinho
Автор

Phenomenal education and for free too! I can't believe it.

Mirza_Media
Автор

Truly ingenious way to explain complex matter! Appreciate that a lot

solaris
Автор

Can't wait for 04 !
Great content

moutonguerrier
Автор

Thanks a lot for the clear and simple explanation

jun-ki
Автор

Can someone with good grasp of sync / async programming in Java's context answer my questions ?

Problems:
1. Synchronised code when not needed. Ex - Two unrelated database calls one after the other

In Sync code: Executing thread will call first db operation, wait for the result, get the result, continue, call next db operation, wait for the result, get the result, continue
In Async code: Executing thread calls the first db operation, calls the second db operation and continues executing next lines of code. Callback function is called on an available thread after db query completes

2. Idling threads, One thread is assigned to one request. So, in any case, we can't execute more requests than number of threads concurrently. Even though the thread is not doing anything it is waiting for the result to come back.

My understanding:
-> If we take a thread snapshot in any point in time for sync code: it can be executing something or it can be waiting unnecessarily for an external call to return
-> In async code, if we take snapshot of a thread in any point in time. It will always be executing something.

Is my understanding correct?

Now my questions:
1. Say, my CPU can run 16 concurrent threads but in Tomcat, by default we have 200 threads. So, when the tomcat thread is idling, any other thread will be executing on CPU. Isn't it? So, what's the improvement here? Aren't we utilising 100% CPU anyway (If, needed)?
2. If we take a snapshot at any moment in time, can there be a case, where < 16 OS threads are being utilised, even when the server is busy? If so, can't we gain improvement from having much more than 200 Tomcat threads?
3. How do we decide number of tomcat threads to spool?
4. A case, when async programming isn't beneficial?

potatopotato
Автор

I'm coming back to the problem you mentioned in this video after finishing the series and I want to know how to solve the synchronous problem. Correct me if I'm wrong, I would make getUser() return a Mono<User> and getPreferences() return Mono<UserPreferences> then zip the two, set the value and finally return the Mono<User> ?

np
Автор

Awesome examples and explanation. Thanks.

evanskemboi
Автор

Thanks for great explanation and "friends" example)

mariyarussakova
Автор

What a great explination.. Thanks a lot for sharing Sir 👏

mohammadmutawe
Автор

Actually javascript did this long time ago, and in async operations and reactive streams javascript has the upper hand, and java is very late behind C# and javascript.

TariqAbdulGhani-ktnk
Автор

Video isn't complete, please upload full video

ZuberKazi
Автор

Can multithreading be done to handle that and if not then why?

Rohityadav-tjbz
Автор

Can someone please send the course link of that request-webserver-thread screenshot that Kaushik used in this video. I want to learn more about it.

anandsinghthakur
Автор

how to develop an api that depends on another api which is not developed yet.

FilmyHooks
Автор

Thank you a lot for your work and your free content! I really appreciate this channel and followed it for quite a while now. I am not an export in how to run youtube channels, however: is it really effective to cut videos into chunks that small and release every three days, even to a point where you cut mid-sentence? Isn''t the decline of viewers too big from first to last video of a series? Maybe it makes sense economically and i only complain because I can't wait for the next video :P
Please keep up the great teaching!

cwlzmlu
Автор

Hi can update your spring framework playlist to spring 5.

jessepinkman
Автор

Hi Koushik, I have taken membership thinking it would have access to full course. Is there a way around or I would have to take membership on website too.

yashmittal
Автор

Why don't you have this course on Udemy?

amitpadgaonkar
Автор

Can't we solve this issue in DB side by using join query concept?

bidyutprakash
join shbcf.ru