Ever wondered how travel apps like MakeMyTrip/pickyourtrail/ixigo instantly show you a complete holiday package with flights, hotels and activities?
Behind the scenes, these systems don’t call APIs one by one.
Instead, they make parallel API calls to fetch data faster.
In this video, we’ll understand how Java Callable and Future help achieve this using a real-world system design example.
We’ll simulate how a travel app:
1️⃣ Fetches Flights
2️⃣ Fetches Hotels
3️⃣ Fetches Activities
All in parallel, and then combines them to build a holiday package.
By the end of this video you will clearly understand:
• What Callable is in Java
• How Future works
• Difference between Runnable vs Callable
• How to run tasks in parallel
• How results are collected asynchronously
If you want to master Java multithreading with practical examples, this video is for you.
Timelines:
00:00 - Introduction and Agenda
00:29 - How MakeMyTrip curate Holiday Packages
02:25 - Total time taken Sequential vs Parallel
06:10 - Building the intuition for code
10:17 - Code and Explanation
#JavaMultithreading #SoftwareArchitecture #CodingTutorial #Java8 #Java17 #LearnToCode #BitsOfCode #java #coding