Тёмный

28 Exercise Using flatMap and distinct operators (Reactive programming with Java - full course) 

Java Brains
Подписаться 665 тыс.
Просмотров 18 тыс.
50% 1

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:
/ @java.brains
Website:
www.javabrains.io
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.

Опубликовано:

 

5 сен 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 11   
@MrSATYAMJOSHI
@MrSATYAMJOSHI Год назад
Thank you Kaushik. If anyone is interested, "Spring in Action" is one of the books that explains Java Reactive programming in detail.
@arnav_gaur
@arnav_gaur Год назад
Thanks Kaushik for the awesome content! I binge watched the playlist. Eagerly waiting for rest of the videos :)
@mostinho7
@mostinho7 Год назад
Done thanks Calling subscribe is what starts the flux stream, if you don’t call subscribe then it won’t get triggered even if you perform operations on the flux stream .distinct() operator eliminates repeated values from flux stream .distinctUntilChanged() will remove repeated values in a row like 1,1 but will not remove repeated values if they changed in between Project reactor has operators documentation to find out how each one works to transform the stream and if it is blocking or async
@alanmangroo3656
@alanmangroo3656 Год назад
Great video. Thanks!
@shivask5543
@shivask5543 Год назад
👌!! Thanks!!
@mrrishiraj88
@mrrishiraj88 Год назад
Good day greetings
@manamohansamal1040
@manamohansamal1040 Год назад
For mapping int to its related user we are doing a filter inside a map of the first flux, so isn't that a blocking operation as the id need to wait for the user flux to complete until check for the last element complete the filter operation?
@adambickford8720
@adambickford8720 Год назад
.flatMap is inherently async, it's not returning the user it's returning yet another publisher (Flux) that will eventually publish 1 user (due to the take(1)) on subscribe. FlatMap is so you don't end up with Flux which is awkward "in the future i'll give you another promise about the future" so skip the middleman and go to the last promise.
@manamohansamal1040
@manamohansamal1040 Год назад
@@adambickford8720 yes its returning flux of flux but that doesn't guarantee to be a async process, a flux can be a sync process also.
@adambickford8720
@adambickford8720 Год назад
@@manamohansamal1040 yes, you can break any contract (though a good runtime will actually prevent you from blocking). But the API is there to support async, which is what he's demonstrating. You also don't check for the last element, you eval each one and it short circuits after 1 hit in this case. It could literally be the first element.
@dadylle
@dadylle Год назад
Subscribe is the contract between the source and the consumer, when data is ready the source push data to observers how are in there subscriber's list, maybe at the time of subscribing there is no data.
Далее
How I Did This INSANE Trick 🤯📱🍬
00:10
Просмотров 4,6 млн