System Design Basics
(Lottery Ticket)
Md Imran Hasan Hira
Software Developer, Booking.com
The situation
Alan Turing needs some help.
He is out of money and he is looking for a work.
The stupid solution
Alan Turing needs some help.
He is out of money and he is looking for a work.
So he decided to sell lottery ticket and earn some
money around that.
Alan Turing is selling lottery ticket
Alan TuringLottery Ticket
Customers
Turing became popular
Alan TuringLottery Ticket
More Customers
Turing's ticket booth became super popular
Alan TuringLottery Ticket
Excessive Customers
At some moment, Turing feeling like...
Lottery Ticket
Excessive Customers
কাস্টমারেে ***
দাাঁ ড়ারে পােছিনা
So, Turing recruited some people for him
Lottery Ticket
Excessive Customers
Alan Turing
T.B. Lee G. Hopper D. Knuth
J.V.
Neumann
Things were running fine, but then more customers
came
Lottery Ticket
Super Excessive Customers
Alan Turing
T.B. Lee G. Hopper D. Knuth
J.V.
Neumann
Turing came up with this idea to put them in line
Lottery Ticket
Customers waiting in to get service
Alan Turing
T.B. Lee G. Hopper D. Knuth
J.V.
Neumann
...
...
...
...
With too many people in the line, the ticket resellers
were unnecessarily going back and forth to Turing
Lottery Ticket Alan Turing
T.B. Lee G. Hopper D. Knuth
J.V.
Neumann...
...
...
...
So, Turing printed a bunch of tickets and give them
to resellers upfront, so that they can save time
All Lottery Tickets Alan Turing
T.B. Lee G. Hopper D. Knuth
J.V.
Neumann
...
...
...
...
Lottery Ticket Lottery Ticket Lottery TicketLottery Ticket
And the final design looks like this
All Lottery Tickets
Alan Turing
T.B. Lee G. Hopper D. Knuth
J.V.
Neumann
...
...
...
...
Lottery Ticket Lottery Ticket Lottery TicketLottery Ticket
System design terminologies
All Lottery Tickets
Alan Turing
T.B. Lee G. Hopper D. Knuth
J.V.
Neumann
...
...
...
...
Lottery Ticket Lottery Ticket Lottery TicketLottery Ticket
Source of true Information
Data Orchestrator
Pre-Generated Content
Data Processor
Job queue (FIFO)
Horizontal Load Balancing
Thank You :)

System design basics - Part 2

  • 1.
    System Design Basics (LotteryTicket) Md Imran Hasan Hira Software Developer, Booking.com
  • 2.
    The situation Alan Turingneeds some help. He is out of money and he is looking for a work.
  • 3.
    The stupid solution AlanTuring needs some help. He is out of money and he is looking for a work. So he decided to sell lottery ticket and earn some money around that.
  • 4.
    Alan Turing isselling lottery ticket Alan TuringLottery Ticket Customers
  • 5.
    Turing became popular AlanTuringLottery Ticket More Customers
  • 6.
    Turing's ticket boothbecame super popular Alan TuringLottery Ticket Excessive Customers
  • 7.
    At some moment,Turing feeling like... Lottery Ticket Excessive Customers কাস্টমারেে *** দাাঁ ড়ারে পােছিনা
  • 8.
    So, Turing recruitedsome people for him Lottery Ticket Excessive Customers Alan Turing T.B. Lee G. Hopper D. Knuth J.V. Neumann
  • 9.
    Things were runningfine, but then more customers came Lottery Ticket Super Excessive Customers Alan Turing T.B. Lee G. Hopper D. Knuth J.V. Neumann
  • 10.
    Turing came upwith this idea to put them in line Lottery Ticket Customers waiting in to get service Alan Turing T.B. Lee G. Hopper D. Knuth J.V. Neumann ... ... ... ...
  • 11.
    With too manypeople in the line, the ticket resellers were unnecessarily going back and forth to Turing Lottery Ticket Alan Turing T.B. Lee G. Hopper D. Knuth J.V. Neumann... ... ... ...
  • 12.
    So, Turing printeda bunch of tickets and give them to resellers upfront, so that they can save time All Lottery Tickets Alan Turing T.B. Lee G. Hopper D. Knuth J.V. Neumann ... ... ... ... Lottery Ticket Lottery Ticket Lottery TicketLottery Ticket
  • 13.
    And the finaldesign looks like this All Lottery Tickets Alan Turing T.B. Lee G. Hopper D. Knuth J.V. Neumann ... ... ... ... Lottery Ticket Lottery Ticket Lottery TicketLottery Ticket
  • 14.
    System design terminologies AllLottery Tickets Alan Turing T.B. Lee G. Hopper D. Knuth J.V. Neumann ... ... ... ... Lottery Ticket Lottery Ticket Lottery TicketLottery Ticket Source of true Information Data Orchestrator Pre-Generated Content Data Processor Job queue (FIFO) Horizontal Load Balancing
  • 15.