Java Asynchronous Programming

Поділитися
Вставка
  • Опубліковано 8 чер 2024
  • A teaser and precursor to Reactive programming, Java Asynchronous programming allows efficient use of CPU and provides scalability.
    Channel
    ----------------------------------
    Master difficult programming concepts in few minutes. I try to explain difficult concepts like Java concurrency in simple to understand manner using animations and small code snippets. Explore videos on topics like Spring Boot, Cloud Foundry, Java 8 (with more coming soon). I am happy to clarify your doubts. Ask me anything in the comments. I am also happy to take requests for new videos.
    New video added every Sunday.
    Subscribe or explore the channel - bit.ly/defog_tech
    Playlists
    ----------------------------------
    Java Executor Service - bit.ly/exec_srvc
    Java Concurrency - bit.ly/java_crncy
    Spring Boot 2.0 - bit.ly/spr_boot2
    Java 8 - bit.ly/java_8-11
    Intellij IDEA Shortcuts - bit.ly/i_idea
    Popular Videos
    ----------------------------------
    Executor Service - • Java ExecutorService -...
    Introduction to CompletableFuture - • Introduction to Comple...
    Understand how ForkJoinPool works - • Understanding how Fork...
    Java Memory Model in 10 minutes - • Java Memory Model in 1...
    Volatile vs Atomic - • Using volatile vs Atom...
    What is Spring Webflux - • What is Spring Webflux...
  • Наука та технологія

КОМЕНТАРІ • 99

  • @snehil32
    @snehil32 3 роки тому +26

    This UA-cam channel deserves over a million subscriber.

  • @himanshugusain1856
    @himanshugusain1856 5 років тому +41

    One of the most underrated UA-camr...you are the best sir .. massive respect 😊

  • @rishankgupta1507
    @rishankgupta1507 5 років тому +20

    You are articulated in your explanation which is lacking in others...I appreciate your hard work and thankful to you.

  • @livelifenjoy
    @livelifenjoy 3 роки тому +2

    Your each video covers most important aspect of any thing that one has to do in programming :
    What problem it's solving and how ?
    Awesome , please keep going !!

  • @amileyjones9082
    @amileyjones9082 5 років тому +9

    You are doing a great job with imparting the detailed knowledge you have with concurrency. Watched all your videos. Keep up the good work.

    • @DefogTech
      @DefogTech  5 років тому

      Thank you for your kind words! Any topic suggestions for next videos?

    • @pawanpawar2446
      @pawanpawar2446 3 роки тому +2

      @@DefogTech please make videos on design patterns

    • @divyayadav6993
      @divyayadav6993 2 роки тому

      I really appreciate if you can make videos for design patterns in the same crisp fashion as you did for concurrency but without diluting the content. Basically, design pattern that can be used by Staff engineers level through your video. Thanks for your work and really appreciate for your generous effort.

  • @chilukabharath4809
    @chilukabharath4809 3 роки тому +1

    hey, finally i found best channel to get the information in detail.

  • @zeliofernandes1608
    @zeliofernandes1608 5 років тому +4

    You are a rolemodel who truly help others and not like others who just create lengthy videos to get no. of likes.

    • @DefogTech
      @DefogTech  5 років тому +2

      Thank you.. my aim is only to help people understand concepts. I'm happy it's helping

  • @demirg
    @demirg 4 роки тому +1

    Thanks for the great explanation and the background on why we need this.

  • @dishithpoojary
    @dishithpoojary 3 роки тому +3

    We need more views and subscribers on this channel. The content is amazing! Thank you.

  • @alissoncpnunes
    @alissoncpnunes 3 роки тому

    What an amazing job at explaining such complex topic!

  • @shellindebted5328
    @shellindebted5328 4 роки тому

    Awesome explaination.Thank you so much!!

  • @corabora6644
    @corabora6644 5 років тому

    Simply Fantastic. Clear cut, concise, to the point, no nonsense, learned a lot....thanks !! (A summary at the end would have been a nice touch) but I love the way he progresses through Async technologies in time

    • @DefogTech
      @DefogTech  5 років тому

      Thank you! Have noted the summary thing, good idea!

  • @ambarishkapil8004
    @ambarishkapil8004 3 роки тому

    Wow man, you have a very clear concept on this topic. Thanks for making the tutorial.

  • @hyperborean72
    @hyperborean72 4 роки тому

    Excellent overview. Extremely difficult topic made much more clear

  • @naseermohammad3756
    @naseermohammad3756 3 роки тому

    I believe I am going to watch this atleast 6-7 times. Such beatufilly explained. And to grasp such deep concepts deserves watching as many times as I quote. This is 2nd time

  • @pragmaticsoftwareengineer7965
    @pragmaticsoftwareengineer7965 4 роки тому

    Excellent video mate.. Thanks for doing this.

  • @danielchangmasa2836
    @danielchangmasa2836 3 роки тому

    This was a very insightful. Kudos. Going to watch more videos from this channel.

  • @Sanjay-pu4sp
    @Sanjay-pu4sp 4 роки тому

    Very well explained, like all your other videos. Please don't stop creating content :)

  • @SandeepKumar-bm7qu
    @SandeepKumar-bm7qu 4 роки тому +3

    Thank you for this tutorial. Very well explained. Excellent job. Can you please add separate tutorial for Event loop also? Thanks again.

  • @kiranpanda8161
    @kiranpanda8161 6 років тому +27

    Crystal clear, explanation. Very good tutorial.

  • @subhjitdutta3056
    @subhjitdutta3056 5 років тому

    very nice explanation.beyond my expectation.keep it up good work.

  • @khadijaaitbouiramouin7776
    @khadijaaitbouiramouin7776 3 роки тому

    Magical explanation, Thank you soo much

  • @rahulmodey1315
    @rahulmodey1315 2 роки тому

    Very nicely explained. Thank You

  • @mahendharkhedhar7887
    @mahendharkhedhar7887 6 років тому

    Wow wonderful amazing sir expecting more and more vedios like this

  • @panupongsanprasit330
    @panupongsanprasit330 Рік тому

    Thank you for most valuable explanation

  • @manojkumar-qf1rp
    @manojkumar-qf1rp 5 років тому

    Thanks for the wonderful explanation

  • @biltusamanta6932
    @biltusamanta6932 4 роки тому

    Very good explanation.. neat and clean. Awesome keep up the good work

  • @wandererme3703
    @wandererme3703 5 років тому +2

    Thank you for making these videos very easy to understand.

    • @DefogTech
      @DefogTech  5 років тому +1

      You're welcome! I'm happy it helped

  • @Bommutiwariplayz0170
    @Bommutiwariplayz0170 5 років тому

    Thanks a lot for the video.Very nice explanation

  • @sayedthebacktracker
    @sayedthebacktracker Рік тому

    You know what question I have to understand Asynchronous programming. Thanks heaps.

  • @rsrini7
    @rsrini7 5 років тому

    Wow!! What a deep and in relating the technologies... Extraordinary.. No words to express buddy.. Kudus to your work and hope to expect more from you. Thank you.

    • @DefogTech
      @DefogTech  5 років тому

      Thank you so much for the kind words!

  • @RaviPatel-po2gu
    @RaviPatel-po2gu 4 роки тому +3

    Thank you very much, you have a great Knowledge
    Thank you Thank You Thank You

  • @marinab2337
    @marinab2337 3 роки тому

    Thank you very match for lessons!

  • @w_0_045
    @w_0_045 2 роки тому

    Thanks for sharing!

  • @rajibdas4u
    @rajibdas4u 5 років тому

    Very good tutorial. Keep it up. Thanks.

  • @MateuszLubinski
    @MateuszLubinski 2 роки тому

    Great explanation, thanks!

  • @abhishekdubey5336
    @abhishekdubey5336 3 роки тому

    Amazing explanation of such a complex topic..👍

  • @prasanthrajendran1611
    @prasanthrajendran1611 6 років тому +3

    I am really impressed about your interest on Java concurrency package. Simple explanations with your depth understanding.keep up your good work and I will be chasing you for your Spring Reactive Videos

    • @DefogTech
      @DefogTech  6 років тому +3

      Thank you so much! Means a lot to me. My upcoming videos are about Condition class and Introduction to Spring Reactive. Hope you like them too.

    • @thomassun3046
      @thomassun3046 4 роки тому

      @@DefogTech I'm looking forward to the Spring course, and can U plz make a series of videos about Big data?Thx a lot

    • @mostinho7
      @mostinho7 Рік тому +1

      @@DefogTech please come back and continue making videos, you are a great explainer and you can grow this channel and make a lot of money from it. This is my advice if you are doing other work that is keeping you away from the channel, this channel will make you more money than anything else if you upload regularly with your same quality.

  • @sriharshaananthoju8671
    @sriharshaananthoju8671 Рік тому

    You deserve million subscribers!

  • @Kynatosh
    @Kynatosh 2 роки тому

    This is so well explained wow

  • @ismile47
    @ismile47 4 роки тому

    Thank you so much very clear..awesome.

  • @subhraroutray5065
    @subhraroutray5065 Рік тому

    Very good explanation 😊

  • @mk9834
    @mk9834 4 роки тому

    your explanation is magnificent

  • @AshishBurnwal
    @AshishBurnwal 5 років тому +1

    Best explanation sir. Thank you so much

    • @DefogTech
      @DefogTech  5 років тому

      You are welcome buddy!

  • @dineshchandgr
    @dineshchandgr 3 роки тому

    what an amazing video. kudos to u

  • @RohitPal-lz1wf
    @RohitPal-lz1wf 3 роки тому

    Soon you will reach 1 million. May God bless you

  • @veerapareddydushyanth2513
    @veerapareddydushyanth2513 5 років тому

    It's clean and neat explanation of asynch api... Thank you .... We r waiting for more videos on asynch api

    • @DefogTech
      @DefogTech  5 років тому +2

      Thanks mate! Did you check out the spring webflux and java coroutine videos, they're also related to async API

  • @BeingDeveloperWithAB
    @BeingDeveloperWithAB 5 років тому

    Very nice, keep uploading some more videos on core java and spring

  • @vijaybhatt8467
    @vijaybhatt8467 2 роки тому +1

    Dear Defog Tech, please make tutorials on vert.x toolkit in a similar fashion. Your style of teaching is excellent. Thanks

  • @nikhilpawar7876
    @nikhilpawar7876 Рік тому

    You are God of multithreading❤

  • @krishnajha9700
    @krishnajha9700 2 роки тому

    thank you so much.....it's very helfull to me .....please make a tutolial for Netty Framwork

  • @amintalukder8583
    @amintalukder8583 3 роки тому

    Very nice video.. nicely explained

  • @benpracht2655
    @benpracht2655 2 роки тому

    Very rarely does somone cover the underlying OS/machine view of interpreted languages anymore. Plus one for you.

  • @gurudatt-shahane
    @gurudatt-shahane Рік тому

    Thank you❤

  • @diegoramos27
    @diegoramos27 3 роки тому

    Hi sir, than you for the video, one question, do we need to use nio at client side in order to consume Spring Web Flux service? Or how do we implement the client side? Thank you

  • @ashvajitchauhan608
    @ashvajitchauhan608 5 років тому +2

    Such videos are amazing to understand better. Please make a video on spring full package, thanks a lot for great knowledge sharing

  • @rishikapoor5476
    @rishikapoor5476 2 місяці тому

    May i know the things we try to achieve using concurrency using lock system or we can say wait and notify method but in this case only 1 thread is executed once at a time then what is the benefit of using multithreading here. We use 2 threads for different purpose but only one thread works at once so my query is if the scenario where you have to use lock mechanism can we achive that task without using mutithreading

  • @anilkinikar
    @anilkinikar 3 роки тому

    Your tutorials are awesome. But I am not seeing any new videos from you. Please keep up the good work. 👍🏼

  • @thomassun3046
    @thomassun3046 4 роки тому

    It is so clear for me! Could I ask a question please?imagine that in a simple java program which just include a main thread and print"hello world", normally I will execute all code and exit.but what if I use completeabefuture call supplyAsync which will take 5mins to download a video. and thenAccept to print something. It will absolute block the program to be finished right? I think main thread will be blocked!

  • @centurion3708
    @centurion3708 3 роки тому

    Do you think i should invest my time learning reactive programmng or native conccurency api ?

  • @diegoramos27
    @diegoramos27 4 роки тому +3

    One question, when you use callback isn’t that creating a new thread to wait for the operation to complete? In that case, wouldn’t the thread pool start starving if thousand of calls are being made at the same time? Because the main thread would not be blocked but still the listener threads would be blocked, right?...

    • @suman6327
      @suman6327 4 роки тому

      I kind of have same question as you. If you look code snippet @9:45, callback is essentially a Thread (new Runnable()). I would like instructor to Defog this point. Thanks

    • @gauravkungwani
      @gauravkungwani 3 роки тому

      i was also thinking---- does this asynchronous callbacks wont create separate threads, so how the problem of having thousands of threads is solved ?

  • @rajneeshraikwar6285
    @rajneeshraikwar6285 4 роки тому +2

    Please create video on concurrent collection of java 8

  • @SpiritOfIndiaaa
    @SpiritOfIndiaaa 5 років тому

    Thanks a lot , quality of tutorials are high in quality ...sir how to debug java1.8 streams? any tools for it ?

  • @amitmohanty2679
    @amitmohanty2679 2 роки тому

    Thanks!

    • @DefogTech
      @DefogTech  2 роки тому

      Thank you so much for the monetary appreciation. Means a lot to me!

  • @anubhavgupta8075
    @anubhavgupta8075 Рік тому

    Hi Sir,
    Could you please make videos on JAVA microservices?

  • @aditchauhan876
    @aditchauhan876 5 років тому

    You owned viewers

  • @superdevelopertr6127
    @superdevelopertr6127 5 років тому

    You have talked about Sync API future get() method. What if we keep list of futures after we submit our tasks to executor service and in future we get result, will it be async in that matter?

    • @DefogTech
      @DefogTech  5 років тому +1

      The task will be performed in Async manner but get() blocks the thread until result is ready making it not ideal

  • @prasannakarthikl
    @prasannakarthikl 3 роки тому

    nice..

  • @AnasKhan-ch2xh
    @AnasKhan-ch2xh 4 роки тому +1

    Hi brother, your videos are superb. I just wanted to know if I have a long array to process and I want to divide it in multiple chunks and give it to multiple threads, how can I do it. Please help.

    • @DefogTech
      @DefogTech  4 роки тому +1

      Best way to handle this is to push all elements in executor service which are stored as tasks in blocking queue.. and they will be handled by threadpools utself

  • @PizzaGamingTheReal
    @PizzaGamingTheReal Рік тому

    Hello, you say that servlet thread-pool is a fixed 200 thread-pool and when we are doing a long job in each request we can slow down the server for the users, i.e. if we have 200 requests and still they are processing user 201 has to wait until one of the jobs finishes, hence we have to use asynchronous programming. Cool, but I have question regarding the traditional CompletableFuture variant and WebFlux's Mono, Flux variant (FYI: I watched your video about WebFlux). In 10:00 minute you say that we create a new thread under the hood, but in the WebFlux's video you say that it is event based, that is we are still using maximum 200 threads, when we get a request we pass it to the DB asynchronously and then we handle other requests with that thread and when the DB finishes its job it fires an event and with one of our threads from out servlet thread-pool we get the result and send as the response back to the user. Did I understand it right?

    • @DefogTech
      @DefogTech  Рік тому +1

      Its been a while since I checked the Spring code. My current understanding is: within the servet GET method, if we mark the processing as async, it will get offloaded to another thread-pool thus servlet thread will become free to accept more requests. The other thread-pool could either be a single thread which is reactive/event-based or N threads. In Webflux example the servlet thread-pool directly calls DB.
      But yes, overall idea being no-where you should have synchronous processing in the flow, otherwise the processing will slow down.

    • @PizzaGamingTheReal
      @PizzaGamingTheReal Рік тому

      @@DefogTech Thanks!

  • @VenkataSomaSekharS
    @VenkataSomaSekharS 6 років тому +1

    Hi Thanks for your videos. Quick brush up from Java Concurrency in Practice. Could you please add some videos on topics like ZeroGC, OffHeap data structures like Chronicle HFT / Coral Collections, Disruptor 3.0, Memory Mapped I/O, NIO, Kafka
    Thanks & Best Regards
    Sekhar SVS

    • @DefogTech
      @DefogTech  6 років тому +2

      Will add it to the list. Though I have limited experience on Java performance. So, please expect delays :)

    • @MakeItStik
      @MakeItStik 3 роки тому

      Were you able to find any good resource on these topics ?

  • @subhashanand2276
    @subhashanand2276 3 роки тому

    Very helpful, wanted to applaud using the youtube feature. But the payment keeps on failing.

  • @venkteshdwivedi
    @venkteshdwivedi 4 роки тому

    can you please refer some books for more knowledge of Java concurrency

    • @DefogTech
      @DefogTech  4 роки тому +2

      Concurrency in practice by Brian Goetz

  • @narendra9903
    @narendra9903 3 роки тому

    Am wondering why there are no new videos😭

  • @pddesi952
    @pddesi952 2 роки тому

    Why this person not creating new videos???

  • @vinaypandey5599
    @vinaypandey5599 3 роки тому

    Hi Deepak,
    Seems you have stopped creating videos. If you are reading this comment can you add a video on LOOM and GRAAL please? I don't think anyone can explain it better than you.

    • @DefogTech
      @DefogTech  3 роки тому +1

      Hi Vinay, I had created one for Loom - ua-cam.com/video/VwBnPZQl5m8/v-deo.html
      Will do one for Graal soon