Context

Doc Abode has an established platform to allow NHS service leads to schedule and co-ordinate visits by clinicians to vulnerable patients in the community. One challenge is communication between service leads and clinicians.

Objective
Design a Secure Communication Portal with the following focus:

  • Real-time Messaging: Instant chat or messaging capabilities between service leads and clinicians.
  • Attachment Capabilities: Securely send and receive attachments such as medical files, images, or even voice notes.
  • Notification System: Alerts for new messages or assignments, ensuring that urgent communications are promptly attended.
  • Integration Point: Tie the communication portal into the existing user and patient databases/systems (you can make assumptions about how they might operate).

Interview preparation
We would ask the candidate to, time permitting, think about this brief ahead of time and come prepared with some possible approaches, solutions, and challenges. They may wish to present a high-level architecture diagram for a proposed solution and talk through their rationale and choices. During the discussion, they should be prepared to elaborate on their design decisions, proposed technologies, and consideration for functional and non-functional requirements.

Functional Requirements

  • One-one chat
    • ??Is group chat required (should multiple people be able to use a chat)??
  • Read receipt
  • Online Status
  • Notifications
    • ??Should it work with any kind of
  • Share attachments securely (medical files, images, voice notes)
  • It should tie the communication portal into existing user and patient systems/databases This is what I don’t know what to do

System Requirements

  • Low Latency
  • High Reliability
  • High Availability
  • Mobile & Desktop
  • Chat History
  • High blob storage
  • E&E Encryption
    • NHS complaince
  • Web Sockets

Capacity Planning

Total Aactive users: 500m
30 messages per day
Total messages per day = 500m30 = 1500m=1.5b
Messages per day = 1.5b/3600
24
It is 18k messages/s

Storage Estimation

Total messages per day = 1.5B
each message approx. 50kb
Total storage = 1.5b*50kb. = 75pb

How to do System Design Interview

  • System Design interview is
    • to assess my ability to translate ambiguous requirements into technical requirements
    • to know whether I can create an architecture for it
    • it is to know how am I thinking when trying to solve problems
    • to assess that the person they hire is who they need and will help the business to achieve goals

During the Interview

  • Start by asking targeted questions
    • Features./use cases
    • Non-functional requirements
    • Scalability
    • Technical Constraints
  • Think out loud and verbally walk through
    • Rationale
    • Trade-offs
    • Decisions
    • Taking pauses for interviewers
  • What talking through, document key aspects on a whiteboard
    • Connect things together logically
    • don’t bog down in low level implementation. It should be high level