Webhooks vs Websockets vs HTTP Streaming - Which Event-Driven API to use?

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 พ.ย. 2024

ความคิดเห็น •

  • @yosvelquintero
    @yosvelquintero 3 ปีที่แล้ว +79

    WebHooks: Good for updating clients on certain events and avoiding pulling style endpoints
    WebSockets: Good for low latency two-way communications
    HTTP Streaming: Good for long-term connections over HTTP

    • @Zen-t2j
      @Zen-t2j 2 ปีที่แล้ว

      I assume HTTP streaming would be optimal for updating notifications for a social app? Or would that be a WebHook?

    • @LucasSilva-mw7pk
      @LucasSilva-mw7pk 2 ปีที่แล้ว

      @@Zen-t2j WebHook is more indicated if you need a bi-directional fast communication (eg: a shooter online game). In your case of social app, your cliente just need to receive new messages, so might be better if you use streaming.
      For things like chat messages, I would said that the better options should be use something like MQTT. You can also do it by using Long Pooling, but it can be quite inefficient

  • @ben.aka.bigben
    @ben.aka.bigben 5 หลายเดือนก่อน +5

    Man, I just came across your channel and its very sad that you stopped for a year now. The way you explaining things is spot on.

  • @dhanishthaghosh9548
    @dhanishthaghosh9548 3 ปีที่แล้ว +81

    Good explanation! One request, please keep the background music on a lower note (/volume) since it is causing hindrance in concentration and hearing.

    • @ambientcoder5462
      @ambientcoder5462  3 ปีที่แล้ว +15

      I’m glad you liked the explanation! Thanks for the feedback, it’s very valuable to me. I’ll definitely keep the background music in mind for future videos 👌

    • @subramanyamramasani1759
      @subramanyamramasani1759 2 ปีที่แล้ว +1

      Hi bro can you help me how to create webhooks for springboot microservices

    • @robinmaurer2645
      @robinmaurer2645 2 ปีที่แล้ว +1

      @@ambientcoder5462 the music genre is perfect and for any other video format than information/explanation /education the volume is too but here as the comment said just a smidge too loud. Have agreat day!

    • @Zen-t2j
      @Zen-t2j 2 ปีที่แล้ว

      @@ambientcoder5462 I assume HHTP streaming would be optimal for updating notifications for a social app? Or would that be a WebHook?

  • @carltone
    @carltone 3 ปีที่แล้ว +10

    Great comparison video. The connection graphics, pro/con format is well done. Thanks for sharing your knowledge.

  • @alibaba888
    @alibaba888 3 ปีที่แล้ว +1

    One of the best youtube channels explaining APIs

    • @ambientcoder5462
      @ambientcoder5462  3 ปีที่แล้ว

      Thanks for the kind words! Hope you’re enjoying the content 🙂

  • @toekneema
    @toekneema 3 ปีที่แล้ว +3

    truly an amazing video, especially since you also reviewed the Request/response at the beginning!

  • @daniel280187
    @daniel280187 3 ปีที่แล้ว +6

    Great explanation. I appreciate the comparison of the 3 methods with visualizations. Thanks for sharing!

    • @ambientcoder5462
      @ambientcoder5462  3 ปีที่แล้ว

      Thank you :) I’m glad you liked the visualizations.

  • @TaoLi302
    @TaoLi302 3 ปีที่แล้ว +6

    Your channel deserve 400K subscribers. let's make it to 10K first. Really clear explanation to none engineer. Hope you make more videos.

    • @ambientcoder5462
      @ambientcoder5462  3 ปีที่แล้ว

      Thanks for your kind words, really appreciate them 🙂

  • @johnswanson217
    @johnswanson217 3 ปีที่แล้ว +3

    Very clean and clear one! Thank you!!

  • @louicoder
    @louicoder 3 ปีที่แล้ว +5

    You are such a great teacher, I like the simplicity in the explanation 🎉 🎉 🎉 🎉 🎉 🎉 🎉

    • @ambientcoder5462
      @ambientcoder5462  3 ปีที่แล้ว

      Thanks a lot! I’m glad you liked my explanations 🙂

  • @ammadkhan4687
    @ammadkhan4687 9 หลายเดือนก่อน

    Very helpful. Gold worth information at one place. Thanks for sharing.. really appreciate

  • @wagnermoreira786
    @wagnermoreira786 3 ปีที่แล้ว +1

    great explanation! I haven't seen the webhooks implementation on the client-side yet, now I need to try!

  • @Prostopravda
    @Prostopravda ปีที่แล้ว +1

    Keeping a long-living connection is another issue with WebSocket if you use a cloud platform like Cloudflare for DDoS protection. Long-living connections cause Cloudflare servers to run out of ports, so the company has to take fee for that.

  • @foobar7889
    @foobar7889 3 ปีที่แล้ว +4

    Is a con of the websocket approach that if there isn't that much traffic, it's a wasted thread keeping the connection open?

    • @ambientcoder5462
      @ambientcoder5462  3 ปีที่แล้ว

      Yup you’re right. If there isn’t much traffic, websockets might be overkill. If you’d still like to keep things event driven, then webhooks might be an option worth considering.

  • @Kathiisu
    @Kathiisu 3 ปีที่แล้ว +2

    Thanks for the informative video! It is a great help in my process of creating an application.

  • @sureshsambana5219
    @sureshsambana5219 3 ปีที่แล้ว +3

    Thank you very much. That is a neat and smooth explanation. It helped me.

    • @ambientcoder5462
      @ambientcoder5462  3 ปีที่แล้ว

      Happy to hear it helped you Suresh! And thanks for your kind words 🙂

  • @muathithanhcong
    @muathithanhcong 3 ปีที่แล้ว +2

    Great explanation! Thanks for sharing!

  • @user-zb5jp4ti1d
    @user-zb5jp4ti1d 2 ปีที่แล้ว +2

    This is so helpful. Thank you so much. It would be great if you could also provide the source of this information, books or articles that you referred to in order to put this together.

  • @rohitiyer230
    @rohitiyer230 2 ปีที่แล้ว +3

    Does MPEG DASH use http streaming under the hood or websockets for streaming videos?

    • @ambientcoder5462
      @ambientcoder5462  2 ปีที่แล้ว +1

      Most, if not all, video streaming platforms use HTTP streaming as far as I know. Hope this helps!

  • @prabhakarreddyg
    @prabhakarreddyg 3 ปีที่แล้ว +2

    Thanks for crystal clear explanation

    • @ambientcoder5462
      @ambientcoder5462  3 ปีที่แล้ว

      I’m glad you liked the explanation. Thanks for your support 🙂

  • @MrJonnis13
    @MrJonnis13 3 ปีที่แล้ว +2

    Thank you. Very informative.
    Subscribed!

  • @johnnychang3456
    @johnnychang3456 3 ปีที่แล้ว +1

    Clear and concise explanation. Thank you!

  • @molletik
    @molletik 3 ปีที่แล้ว +3

    Hi, it is a very good presentation. It is very helpful. If my application is very complex where it need to handle "Request-Response" and "Event-driven" API, how to define and aggregate both this API's?

    • @ambientcoder5462
      @ambientcoder5462  3 ปีที่แล้ว +1

      Your API will contain multiple endpoints. So each endpoint can be a different style of endpoint depending on your use case.
      For example, retrieving a list of videos on a server is a request-response style endpoint. However, to stream an individual video would not necessarily be request-response style endpoint.
      It is important that you document these traits to the end user.
      Hope this helps 🙂

  • @javi_v7.0
    @javi_v7.0 ปีที่แล้ว

    Great video, brief, to the point.. Thanks!

  • @SaintSaint
    @SaintSaint 2 ปีที่แล้ว

    This was perfect. Thank you so much.

  • @BradleyADavis
    @BradleyADavis 3 ปีที่แล้ว +2

    Great video, thanks!

  • @idc19
    @idc19 ปีที่แล้ว

    Great content. Very enlighting.

  • @faketrump3605
    @faketrump3605 2 ปีที่แล้ว

    you're very good at explaining the concepts. thanks.

  • @isurujn
    @isurujn 3 ปีที่แล้ว +1

    Nice video. Informative and to the point without any fluff 👍🏼

  • @enfieldli9296
    @enfieldli9296 2 ปีที่แล้ว +1

    Hi, which technique were used in push notification, like when someone replied our comment, and we get a notified in the inbox area with the amount of replies we are getting? like the bell icon in youtube

  • @mrsbootsworkouts
    @mrsbootsworkouts ปีที่แล้ว

    Very useful, thank you!

  • @michaelamir25
    @michaelamir25 2 ปีที่แล้ว +1

    What about the GraphQL subscriptions? 🤔

  • @chiragarora3985
    @chiragarora3985 3 ปีที่แล้ว +2

    Amazing explanation 👍

    • @ambientcoder5462
      @ambientcoder5462  3 ปีที่แล้ว

      I’m glad you liked it! Thanks for your kind words :)

  • @lagua000
    @lagua000 3 ปีที่แล้ว +2

    Great video!

  • @shubhankar915
    @shubhankar915 ปีที่แล้ว

    In webhooks, the client is actually another api server, which exposes an end point rather than a mobile or web client, is that correct?

  • @jan5310
    @jan5310 ปีที่แล้ว

    Where does pub-sub with for example MQTT fall under?

  • @JNET_Reloaded
    @JNET_Reloaded 3 ปีที่แล้ว +1

    Can you show how to make a secure node js running from php cli that uses cert an key pem files that allow voice streaming 2 way like a phone call app?

    • @ambientcoder5462
      @ambientcoder5462  3 ปีที่แล้ว

      Thanks for the suggestion, I’ll consider it 🙂

  • @victorpinasarnault9135
    @victorpinasarnault9135 3 ปีที่แล้ว +2

    Real good
    Thank you

  • @JemilOyebisiDeveloper
    @JemilOyebisiDeveloper 3 ปีที่แล้ว +1

    Great explanation!

  • @yogeshyadav5778
    @yogeshyadav5778 ปีที่แล้ว

    Excellent !!!

  • @aryanrahman3212
    @aryanrahman3212 2 ปีที่แล้ว

    Just what I needed 😃

  • @pratheejgc2250
    @pratheejgc2250 3 ปีที่แล้ว +2

    Perfect!!!

  • @shadestorm3995
    @shadestorm3995 3 ปีที่แล้ว +3

    i still don't follow webhooks but other two were crystal clear

    • @ambientcoder5462
      @ambientcoder5462  3 ปีที่แล้ว

      Thanks 🙂

    • @jan5310
      @jan5310 ปีที่แล้ว

      you as client need to provide an public endpoint which the server can call when a certain (by the user/client) specfied event occurs.

  • @stevenlemmo4496
    @stevenlemmo4496 3 ปีที่แล้ว +3

    You need to put your contact info in the TH-cam about section.

    • @ambientcoder5462
      @ambientcoder5462  3 ปีที่แล้ว

      Thanks for pointing this out Steven. I've updated the about section with my channel contact :)

  • @thatgenzdev
    @thatgenzdev 3 ปีที่แล้ว +1

    Great explanation.

  • @pagarevijayy
    @pagarevijayy 3 ปีที่แล้ว +2

    nice man!

  • @datapro007
    @datapro007 2 ปีที่แล้ว

    Good overview, thanks

  • @AlexJaeger716
    @AlexJaeger716 ปีที่แล้ว

    Can i send an http post request while streaming over http?

  • @C0sm1c_Owl
    @C0sm1c_Owl 3 ปีที่แล้ว +2

    Thanks!

  • @allezvenga7617
    @allezvenga7617 ปีที่แล้ว

    Thanks for your sharing

  • @rhtservicestech
    @rhtservicestech 2 ปีที่แล้ว

    This is useful information

  • @sangamsahai9823
    @sangamsahai9823 ปีที่แล้ว

    greatttttt video

  • @gauravpurohit3755
    @gauravpurohit3755 3 ปีที่แล้ว +2

    anyone here..
    my question is can we use any of these connection type to any Api or it depends on Api.

    • @ambientcoder5462
      @ambientcoder5462  3 ปีที่แล้ว

      Hey Gaurav, basically it depends on the API. For example, websockets require both the client and server to establish a websockets connection.
      Hope this helps! 🙂

  • @RaffayDoesTech
    @RaffayDoesTech หลายเดือนก่อน

    When did http become event driven?

  • @mornemarais4198
    @mornemarais4198 ปีที่แล้ว

    well done thanks! :)

  • @AtifShafiinheritance
    @AtifShafiinheritance 2 ปีที่แล้ว +2

    Great

  • @baghdadiabdellatif1581
    @baghdadiabdellatif1581 11 หลายเดือนก่อน

    Thank you

  • @ashutoshpathak1387
    @ashutoshpathak1387 2 ปีที่แล้ว

    Thanks.

  • @srinivasasowmiyan2272
    @srinivasasowmiyan2272 ปีที่แล้ว

    Thank a lot man❤Happy that I found your channel

  • @DdPk3d
    @DdPk3d ปีที่แล้ว

    great video but music is distracting

  • @dopamine_Seeker
    @dopamine_Seeker 3 ปีที่แล้ว +2

    Website socket is best

  • @sandeshth466
    @sandeshth466 7 หลายเดือนก่อน

    Why not SSE

  • @masudofficial76news12
    @masudofficial76news12 2 ปีที่แล้ว +1

    🏆🇮🇩

  • @sravanisajjan5735
    @sravanisajjan5735 3 ปีที่แล้ว +13

    The music in the background is really disturbing and distracting

    • @ambientcoder5462
      @ambientcoder5462  3 ปีที่แล้ว +6

      Thanks for the feedback. I'll keep that in mind for future videos

  • @joshr.2600
    @joshr.2600 ปีที่แล้ว

    🎶 music is weird.

  • @elchemista
    @elchemista ปีที่แล้ว

    put speed 1.5.. you welcome 😉

  • @rishikeshpawar3230
    @rishikeshpawar3230 ปีที่แล้ว +1

    Just remove that background music.... Its annoying

  • @kamertonaudiophileplayer847
    @kamertonaudiophileplayer847 3 ปีที่แล้ว +1

    No, no, again you explain not right. You do not explain why it is inefficient. Oh boy, misinforming people is really bad.

    • @ambientcoder5462
      @ambientcoder5462  3 ปีที่แล้ว +1

      I've cleared explained why it's inefficient. Of course I have not gone into deep details but I've covered as much as I can in a short video. How exactly am I misinforming people?

    • @kamertonaudiophileplayer847
      @kamertonaudiophileplayer847 3 ปีที่แล้ว

      @@ambientcoder5462 A frequent request isn't a cause of the slowness. I appreciate your attempt to educate people, but before doing that, you need have a clear understanding for yourself.

  • @DUhWcpgD7b4SDA2Aep9EqWLyfGu2
    @DUhWcpgD7b4SDA2Aep9EqWLyfGu2 8 หลายเดือนก่อน

    Thanks!