[System Design] Transfer Sum

LiveRunGrow
4 min readSep 11, 2023
Photo by Aditya Vyas on Unsplash

Problem Description

We’d like to put up a counter of how much money has been transferred through the money-exchange APP in the past week. The purpose is to help customers trust us by showing how much volume we’re moving successfully.

Step 1: Gather Requirements

First, we need to ask the interviewer some questions to clarify the requirements. Lets imagine the answers to those questions are in italics.

Functional

  • What currency should the volume be expressed in? It should be in the local currency of the user. If they’re from a US IP address, let’s give them that value in USD. If they are from France, display in Euros.
  • What exchange rate to use? During time of transaction or when the APP page is loaded? Up to you.
  • What is the data source? There is a Transfer Service which will produce an event whenever a transfer has been sent out, and how mich and in what currency. There is a rate service which you can use.

Non Functional

  • How long should we store the data for? Can we purge data that exist for more than 1 week? Yes, don’t need to store data for more than 1 week.
  • What is the expected writes and reads? More writes than read.

--

--

LiveRunGrow

𓆉︎ 𝙳𝚛𝚎𝚊𝚖𝚎𝚛 🪴𝙲𝚛𝚎𝚊𝚝𝚘𝚛 👩‍💻𝚂𝚘𝚏𝚝𝚠𝚊𝚛𝚎 𝚎𝚗𝚐𝚒𝚗𝚎𝚎𝚛 ☻ I write & reflect weekly about software engineering, my life and books. Ŧ๏ɭɭ๏ฬ ๓є!