WEBHOOKS With .NET Minimal APIs

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024

Комментарии • 17

  • @Tamer_Ali
    @Tamer_Ali Год назад +2

    Thanks a lot Mr.Dan for that awesome real world example.
    need more of these real world examples. happy week off and welcome back

  • @kanupriyagoel2257
    @kanupriyagoel2257 11 месяцев назад

    Thankyou so much for such a wonderful real time explanation of how and why to use webhooks. This is the only video needed to understand webhooks!

  • @ConradAkunga
    @ConradAkunga Год назад +1

    Fantastic!
    I guess the next evolution would be some sort of database or cache on the server side that would store the statuses in case the webhook call fails or is unavailable.

    • @Codewrinkles
      @Codewrinkles  Год назад +1

      That's up to the provider/service to decide. As mentioned in the video, in these scenarios you usually don't control the provider.

  • @matteobarbieri2989
    @matteobarbieri2989 Год назад +1

    great video. One question: similar result (avoiding polling the back-end) is not achievable with SignalR ? Could you make a video with the same project using SignalR Hub explaining main differences?

    • @Codewrinkles
      @Codewrinkles  Год назад +2

      Thanks for the suggestion. Sounds really interesting. I also said it in my video, usually when you have to provide webhooks, you usually don't control the provider/service side. I've never seen one accepting websockets connections. But in theory, you could use SignalR, provided that it's supported by the provider.
      But the suggestion to also create videos on SignalR is actually a good one. Thanks again.

  • @adnanbucalovic5810
    @adnanbucalovic5810 10 месяцев назад

    Great channel in general, the thing that would bring it to the next level is sharing your code from the videos.

    • @Codewrinkles
      @Codewrinkles  10 месяцев назад +1

      I do this already. I share the code inall videos with members on ambassador level.

  • @vicky2118
    @vicky2118 Год назад

    Thank you so much for this wonderful video

  • @nove1398
    @nove1398 Год назад

    Great video, 👍🏼. What happens if you managed to miss a webhook message in your consumer?

    • @Codewrinkles
      @Codewrinkles  Год назад +3

      That's a good question. However, what happens if you miss a regular call in your API? Core idea is, that doesn't happen very often. What you can do if it happens it depends also on what options that provider gives you. Usually these providers also offer REST APIS, so you could have a service that does a reconciliation by making an API call and comparing the response to the current data you hold in your application. Also some providers use retries if your endpoind can't be reached. Or they provide you with instructions on how you can get hold of the missed POST

    • @nove1398
      @nove1398 Год назад +2

      @@Codewrinkles exactly my approach in my last project. I did a REST call after the fact.

    • @Codewrinkles
      @Codewrinkles  Год назад +2

      I saw some providers making REST endpoints available that would list all failed attempts to post data to your webhook. But that sounds more like paradise and probably it's not something you'd find very often :)

    • @nove1398
      @nove1398 Год назад +1

      @@Codewrinkles Indeed, i had a retry mechanism but outside of that i had to poll myself

    • @diegoronkkomaki6858
      @diegoronkkomaki6858 Год назад +2

      Realtime systems (systems that use events/callbacks for data exchange) are nice but I feel like they need to be backed by a fallback mechanism (polling, retry etc) so that you don't end up in a situation where data is missing and you have no idea what happened. Web traffic is brittle and a small hick-up or downtime on your end could lead to missing the callback message.
      I implementened a webhook-like feature in a backend system once, where the backend (the provider) persisted the "callback job" to a database, and retried the callback until a 200 OK was returned from the webhook. That way the backend could be sure that the message was atleast received by someone succesfully and it did not just disappear into nothingess.