Hi, welcome to 'This is My Architecture'.
I'm Jasmine and I have here with me Dinesh Durai from FoodHub.
-Hi Dinesh, thanks for joining us. -Thank you for hosting me today.
Tell us about FoodHub.
FoodHub basically is a portal where consumers are able to place orders at convenience,
and we have the restaurants and the take-away owners
who can process the order with 0% commission.
Okay 0% commission? Wow, that's amazing.
And do you have global presence?
Yeah, we headquarter in the UK, and we spread our footprints in Australia, New Zealand, Ireland,
and we plan to travel to USA and Canada,
and we are planning to move to 30 countries in two years time frame.
Amazing, that's quite ambitious; but that sounds amazing.
Now, what are challenges in this business?
Okay so the key challenge for this business is speed, right?
So we have our hungry consumer who wants to place an order
and we have the restaurant owners who need to process the order
in a fast manner to serve the needs of the end consumers.
So overall speed and reliability are the two key factors for us.
Okay, got it.
And what are different key features that you would call out as part of this architecture?
Okay, so the key features we have is we have our ePO systems
which are held at the restaurant -restaurant owners will hold it,
and where they'll start processing.
Predominantly we have two key use cases:
one is the consumer ordering; so when the customer wants to place an order,
it's served via CloudFront and S3 at this point.
So today for the discussion let me walk you across the restaurant owner processing an order.
-Okay. -Right.
So basically once the order comes in, we have the Amplify SDK,
which has been set in all our ePOs machines,
and where we could be able to get it.
Predominantly what happens is a typical restaurant,
as different cuisines: you might have a pizza section, a kebab section, the drink section, right?
So orders which are coming in needs to be synced across the devices
so that they could be able to start processing them.
So we have in-built all Amplify SDK into the ePOs machines
and to power this order syncing we use AppSync,
which provides us...
which provides in terms of getting in all the syncing across the devices.
and that tends for example, we are dealing with timid technical people, right?
Even one machine is unplugged, the operation stops.
So what we want to do is we want to ensure that all ePOs machines are up to date,
at any time and any point of time, so we leverage AppSync based on that.
and what we have, we use a lot of Lambda resolvers,
so basically for order syncing and notifications, dashboarding;
so Lambda resolvers helps us a lot, and it helps us during scale as well.
And what we also do is based on the Lambda.
In the past, we used Aurora as our database, now we moved into DynamoDB.
So what DynamoDB gives us the length and breadth of services it has,
and with AWS Managed Services it helps us to scale during a peak period.
Okay great, and I see this is serverless architecture.
So how does that help you in scaling, as well as reducing your operational overhead.
Okay, so predominantly most of the order placements happen on a weekend, for example.
We also do want on a weekend, on a Friday say between 5 to 7 is a peak period, right?
so where the orders are getting placed by consumers.
And same way, the clients - the restaurant owners need to process those orders fast, right?
So with AWS Managed Services, we could able to scale in breadth and length,
and we can able to maintain the concept of speed.
Great, so basically on weekends you might see spikes, right?
And these are not gradual increases of orders, but a spike in a particular period.
And that's where something like DynamoDB helps you, which is a noSQL database.
And amazing that this is completely serverless, that's great.
Now coming to, you know, the insights that the restaurant owners need
in terms of you know, any metrics; so how do you take care of that?
Okay, so predominately what happens in the day the restaurant owners wants to process the orders.
So they won't look at the stats before closing the shop,
so that they know what they've got and how much they earned and so on and so forth, right?
So here insights become a key component for them.
And what we do is from the DynamoDB streams, we pass the data to the Kinesis,
so where it can manage the state, and from Kinesis we push to S3.
So S3 is our data lake at this point where we store all the data,
and we run ETL's over it, and we start computing the data.
So in the end of the day, say predominantly all the restaurants close at 11 PM,
and everybody wants to see the stats, and you can assume the volume,
we have around 28,000 plus restaurants who might need at the same time
So thus we serve it from S3, and we use QuickSight as our predominant dashboarding tool
where we could be able to see it; not only the restaurant owners,
the internal back office people who want to know how the restaurant has fared today,
or probably should I do some campaigns for them.
So for all those insights, QuickSight provides us a lot of insight,
and we are able to maneuver the data and take data-driven decisions.
That's amazing so two-fold, right?
One is looking at the current state, what does it look like in terms of dashboard reports for restaurants,
and another is also giving them intelligent insights in terms of what can they do better.
Right, amazing. And so Kinesis, do you use this for real-time insights?
Yeah, so in the past this is one of the biggest challenges, right?
We used to provide the data end of the day.
So now with Kinesis, we are able to provide real-time data, real-time insights,
so thus we use Kinesis Streams run into S3, from there we query through QuickSight.
Wow, so what could be better than getting real time insights for restaurant owners?
-That's quite a... -So predominantly real-time, right?
When we go into franchise, so the franchise owner at the top want see how his franchises are faring,
so this solution provides him do a real-time data analysis, and see which take-away is doing better,
which is not doing, so that what marketing campaign he can change.
So those data-driven decisions are taken at length and breadth.
Got it, that's great.
And what's the volume of orders that we're talking about here?
Okay on an average weekday, we used to get in concurrency of during a peak time 300 orders per minute.
If you take in the past, we have processed 23 million orders in 2020,
and last year we processed 63 million,
and we're keeping our fingers crossed to cross it back.
Wow, 63 million orders in 2021, that's quite a number.
Thank you for sharing this architecture with us.
And thanks for watching 'This Is My Architecture'.