Back to projects

Systems

FAR Messaging

A remote text messaging application close to IRC, designed to run across two machines with a multithreaded server, accounts, rooms, admin roles and file transfer.

FAR distributed messaging system screenshot

Context

Systems and networking project focused on TCP sockets, concurrency and data persistence.

Role

Built commands, client-server communication, room management, authentication and file transfer flows.

Stack

CTCP socketsPostgreSQL

Architecture

Multithreaded C server with one thread per client, mutexes protecting shared state, TCP sockets and PostgreSQL for accounts and persisted data.

Key features

  • Accounts, single active login, public, private and room messages.
  • Admin roles with create, delete, ban, unban and shutdown commands.
  • Direct file transfer with custom headers and binary payloads.

Learnings

  • Manage network concurrency in C with mutexes.
  • Design a robust text protocol for many commands.
  • Identify security limits around password hashing and transfers.