Backend for Frontend Pattern in Microservices

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • System Design for SDE-2 and above: arpitbhayani.m...
    System Design for Beginners: arpitbhayani.m...
    Redis Internals: arpitbhayani.m...
    Build Your Own Redis / DNS / BitTorrent / SQLite - with CodeCrafters.
    Sign up and get 40% off - app.codecrafte...
    In this video, I discussed the challenge of serving multiple types of clients as an application evolves, leading to a complex backend with various hacks. I introduced the architectural pattern called Back End for Front End (BFF) used in microservices to address this issue. BFF acts as a presentation layer between the core backend system and clients, filtering out unnecessary data for each client type. It enhances user experience, minimizes network bandwidth usage, and allows for client-specific tweaks without impacting the backend. This pattern is beneficial for both monolithic and microservices architectures.
    Recommended videos and playlists
    If you liked this video, you will find the following videos and playlists helpful
    System Design: • PostgreSQL connection ...
    Designing Microservices: • Advantages of adopting...
    Database Engineering: • How nested loop, hash,...
    Concurrency In-depth: • How to write efficient...
    Research paper dissections: • The Google File System...
    Outage Dissections: • Dissecting GitHub Outa...
    Hash Table Internals: • Internal Structure of ...
    Bittorrent Internals: • Introduction to BitTor...
    Things you will find amusing
    Knowledge Base: arpitbhayani.m...
    Bookshelf: arpitbhayani.m...
    Papershelf: arpitbhayani.m...
    Other socials
    I keep writing and sharing my practical experience and learnings every day, so if you resonate then follow along. I keep it no fluff.
    LinkedIn: / arpitbhayani
    Twitter: / arpit_bhayani
    Weekly Newsletter: arpit.substack...
    Thank you for watching and supporting! it means a ton.
    I am on a mission to bring out the best engineering stories from around the world and make you all fall in
    love with engineering. If you resonate with this then follow along, I always keep it no-fluff.

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

  • @sagarkanojia
    @sagarkanojia 2 года назад +2

    Loved the explanation! Clear and Crisp, To the point!
    Helped me a lot in understanding this pattern.

  • @saptarshidey13
    @saptarshidey13 2 года назад +7

    Can't we use graphQL as the bff layer? That will avoid platform specific bff creation.

    • @AsliEngineering
      @AsliEngineering  2 года назад +6

      Yes we can and it beautifully fits as a BFF and hence it is really a very common way to implement BFF pattern.

    • @manikantaannavarapu5415
      @manikantaannavarapu5415 2 года назад +2

      I was about to ask the same question

    • @sahilsamantaray1101
      @sahilsamantaray1101 2 года назад +1

      Throughout the video I was thinking about how we can implement all of this using GraphQL.

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

    You have explained the concept very well
    Thanks for that.

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

    Excellent explanation, thanks

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

    Another gem by Aprit! Great explanation as always!

  • @RishiRajxtrim
    @RishiRajxtrim 3 месяца назад

    Excellent explanation and very useful topics.

  • @ragus1416
    @ragus1416 6 месяцев назад

    Hi, the explanation was really good and live. Keep up the good work!

  • @amarzavery1
    @amarzavery1 2 года назад +1

    loved the content! learnt something new ❤️

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

    Absolutely awesome video and to the point.. Keep it up Arpit!!

  • @Techie-u8s
    @Techie-u8s 24 дня назад

    Thank you

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

    Finally completed 😎😎
    Getting the feeling of becoming a Senior Engineer very soon

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

      You are making great use of your time 🙌 stay curious... Always.

  • @shervilgupta92
    @shervilgupta92 2 года назад +1

    Amazing always ! thanks Arpit

  • @swapnilgt
    @swapnilgt 3 месяца назад

    Code duplication might not really be a problem if the code in BFF is desgined well. The common parts being used for different types of clients can be extracted in to use cases.

  • @TaeChai-uu2ou
    @TaeChai-uu2ou Год назад

    Beautifully explained!

  • @047gauravkumartiwari5
    @047gauravkumartiwari5 8 месяцев назад

    Awesome explanation!

  • @user-dc8dz1oi2v
    @user-dc8dz1oi2v 8 месяцев назад

    Good explanation can you make example video how you implement it practically.

  • @sachinbaiswar2979
    @sachinbaiswar2979 2 года назад

    One scenario i was thinking about -
    If our generic backend sends a generic response to all the BFFs and that response has some set of data that can't or rather shouldn't be cached and some of the BFFs are rejecting that at their level. But the computation for fetching those data would happen every time on backend, increasing unnecessary load on our resources.
    One solution that i can think for this from my end is that we might have some intelligent caching on these fields and would serve the cached data until requested otherwise by the client(BFFs) using some headers or params !
    If you can suggest any other better solution/way for these types of scenarios it would help me. Thanks in advance 🙂

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

    Thank you for this video. I have question. Does the request url remain same for different bffs? For example, if idea is to fetch a product detail for prod prod_id, is the rest call still to the v1/api/products/{prod_id} ? If yes, then on what sort of intelligence does the particular bff tweaks or prunes the data? For example, how does mobile bff know to prune out the faq and review information? And in the subsequent call when we fetch for product review, does mobile bff make anothe call to generic BE or it makes use of cached info to extract the queried info? Is there any known tool or tech suggestions to implement bff or it can be a generic service like any other BE service? Also, considering bff can be a probable spof, in your experience how's the duplication setup like for bffs?
    Thank you 😊

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

    Thanks for sharing

  • @d4devotion
    @d4devotion 2 года назад

    Was worth to watch, great video. And yes there is something which I observed in the video (starting 14:02) which could be a kind of great add-on to your video if you add little bit funny situation. Starting the timing 14:02, you changed your tone to imitate like a "dari sahmi si ladki jisko hamesh question poochne main darr lagta h" and asked this question in that tone which I felt was a great moment in this video :D :D , And then I extended my imagination for this particular scene, I imagined you wearing a long hair wig with lipstick and earings and asking the question exactly like in that tone of Dari sahmi si ladki. :D :D

    • @AsliEngineering
      @AsliEngineering  2 года назад

      Hahahhaha 😭😭😭
      I wish I could enact more such situations. Maybe after some time when I build that camera confidence 😀😀

  • @singh.aadarsh
    @singh.aadarsh Год назад

    Amazing

  • @karthikeyanarla4163
    @karthikeyanarla4163 2 месяца назад

    Is GraphQL a BFF?

    • @AsliEngineering
      @AsliEngineering  2 месяца назад +1

      GraphQL is not BFF but it can be used to implement BFF.

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

    Where can I learn practically by implementing these?

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

    Can't we use graphql here?

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

      Yes. We can.
      That's one on the ways to implement BFF

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

      @@AsliEngineering got it.
      Thanks for replying back❤️

  • @tir0__
    @tir0__ 2 года назад

    ❤️

  • @theSDE2
    @theSDE2 2 года назад

    Unusal timing today. Is there any change is the upload schedule Arpit?

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

    Pretty good explanation thanks🎉