PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/System Design/Akuna Capital

Design user communication manager APIs

Last updated: Mar 29, 2026

Quick Overview

The question evaluates a software engineer's ability to design lightweight in-memory APIs and data structures for bidirectional user sessions, covering API design, hash-based adjacency structures, complexity analysis, concurrency control, edge-case handling, and basic testing.

  • medium
  • Akuna Capital
  • System Design
  • Software Engineer

Design user communication manager APIs

Company: Akuna Capital

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Take-home Project

Design a lightweight in-memory communication manager between users. Implement 2–3 functions: connect(userA, userB) to establish a bidirectional session, disconnect(userA, userB) to terminate it, and clear(userA, userB) to remove session state/history without leaving users connected. Specify method signatures, data structures (e.g., hash maps, adjacency sets), expected time/space complexities, edge cases (duplicate connects, missing sessions), and how you would handle concurrency or invalid inputs. Include a brief testing plan.

Quick Answer: The question evaluates a software engineer's ability to design lightweight in-memory APIs and data structures for bidirectional user sessions, covering API design, hash-based adjacency structures, complexity analysis, concurrency control, edge-case handling, and basic testing.

Related Interview Questions

  • Implement a two-user communications handler - Akuna Capital (medium)
  • Design communication handler and exceptions - Akuna Capital (medium)
  • Design an order-matching engine - Akuna Capital (hard)
  • Fix and harden an object pool - Akuna Capital (hard)
  • Design user communication functions - Akuna Capital (easy)
Akuna Capital logo
Akuna Capital
Aug 1, 2025, 12:00 AM
Software Engineer
Take-home Project
System Design
2
0

In-Memory Communication Manager (Bidirectional Sessions)

Goal

Design a lightweight, in-memory manager that tracks bidirectional user-to-user sessions (think direct-message sessions). Provide 2–3 API functions:

  • connect(userA, userB): establish a bidirectional session.
  • disconnect(userA, userB): terminate the session.
  • clear(userA, userB): remove session state/history while keeping users connected.

Requirements

  • Specify method signatures (language of your choice), key data structures (e.g., hash maps, adjacency sets), and expected time/space complexities.
  • Discuss edge cases (duplicate connects, self-connects, missing sessions) and how to handle invalid inputs.
  • Describe concurrency handling and guarantees.
  • Include a brief testing plan.

Assume user IDs are strings (or integers) and all data lives in a single process. No persistence is required.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Akuna Capital•More Software Engineer•Akuna Capital Software Engineer•Akuna Capital System Design•Software Engineer System Design
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.