Backend for Frontend Pattern in Microservices

Ғылым және технология

System Design for SDE-2 and above: arpitbhayani.me/masterclass
System Design for Beginners: arpitbhayani.me/sys-design
Redis Internals: arpitbhayani.me/redis
Build Your Own Redis / DNS / BitTorrent / SQLite - with CodeCrafters.
Sign up and get 40% off - app.codecrafters.io/join?via=...
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.me/knowledge-base
Bookshelf: arpitbhayani.me/bookshelf
Papershelf: arpitbhayani.me/papershelf
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.com
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 Жыл бұрын

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

  • @hariharan7729
    @hariharan7729 Жыл бұрын

    You have explained the concept very well Thanks for that.

  • @nazeerhussain6650
    @nazeerhussain665010 ай бұрын

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

  • @swapnilgt
    @swapnilgt2 ай бұрын

    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.

  • @hyrdeshgangwar
    @hyrdeshgangwar Жыл бұрын

    Another gem by Aprit! Great explanation as always!

  • @shervilgupta92
    @shervilgupta922 жыл бұрын

    Amazing always ! thanks Arpit

  • @RishiRajxtrim
    @RishiRajxtrimАй бұрын

    Excellent explanation and very useful topics.

  • @ragus1416
    @ragus14164 ай бұрын

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

  • @amarzavery1
    @amarzavery12 жыл бұрын

    loved the content! learnt something new ❤️

  • @golamrabbi7246
    @golamrabbi724610 ай бұрын

    Excellent explanation, thanks

  • @TaeChai-uu2ou
    @TaeChai-uu2ou Жыл бұрын

    Beautifully explained!

  • @saptarshidey13
    @saptarshidey132 жыл бұрын

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

  • @AsliEngineering

    @AsliEngineering

    2 жыл бұрын

    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 жыл бұрын

    I was about to ask the same question

  • @sahilsamantaray1101

    @sahilsamantaray1101

    2 жыл бұрын

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

  • @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 😊

  • @azzmrd
    @azzmrd10 ай бұрын

    Pretty good explanation thanks🎉

  • @047gauravkumartiwari5
    @047gauravkumartiwari56 ай бұрын

    Awesome explanation!

  • @sachinbaiswar2979
    @sachinbaiswar2979 Жыл бұрын

    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 🙂

  • @ravividap1227
    @ravividap1227 Жыл бұрын

    Thanks for sharing

  • @DanteS-119
    @DanteS-119 Жыл бұрын

    Great video m8

  • @singh.aadarsh
    @singh.aadarsh Жыл бұрын

    Amazing

  • @user-dc8dz1oi2v
    @user-dc8dz1oi2v7 ай бұрын

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

  • @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.

  • @d4devotion
    @d4devotion2 жыл бұрын

    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 😀😀

  • @sauravbhatta5303
    @sauravbhatta5303 Жыл бұрын

    Where can I learn practically by implementing these?

  • @AsliEngineering

    @AsliEngineering

    Жыл бұрын

    Local machine. Not difficult at all.

  • @karthikeyanarla4163
    @karthikeyanarla416319 күн бұрын

    Is GraphQL a BFF?

  • @AsliEngineering

    @AsliEngineering

    19 күн бұрын

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

  • @tir0__
    @tir0__2 жыл бұрын

    ❤️

  • @theSDE2
    @theSDE22 жыл бұрын

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

  • @AsliEngineering

    @AsliEngineering

    2 жыл бұрын

    experimenting :)

  • @theSDE2

    @theSDE2

    2 жыл бұрын

    @@AsliEngineering oh ok

  • @ayushtripathi4514
    @ayushtripathi451411 ай бұрын

    Can't we use graphql here?

  • @AsliEngineering

    @AsliEngineering

    11 ай бұрын

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

  • @ayushtripathi4514

    @ayushtripathi4514

    11 ай бұрын

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

Келесі