Skip to content

Repository files navigation

Quote Streamer

A real-time stock quote streaming system built with Rust. This workspace implements a client-server architecture where the server generates and streams mock stock quotes to clients via UDP, while managing subscriptions over TCP.

Highlights:

  • Dual-transport networking: TCP for subscription management, UDP for the quote stream
  • Multithreaded server with concurrent per-client processing
  • Graceful handling of client connects/disconnects mid-stream

Stack: Rust · TCP/UDP · Multithreading

Workspace Structure

This project is organized into three main crates:

  • quote-server: The server application that handles ticker subscriptions and streams quotes.
  • quote-client: The client application that subscribes to tickers and displays the live stream.
  • quote-streaming: A shared library containing common data structures and serialization logic.

Getting Started

Prerequisites

Rust (latest stable) and Cargo

Quick Start

  1. Prepare a Tickers File: Create a file named tickers.txt with some ticker symbols, one per line (e.g., AAPL, MSFT, TSLA).

  2. Start the Server:

    cargo run --bin quote-server -- --tickers-file tickers.txt
  3. Start the Client: Open a new terminal window and run:

    cargo run --bin quote-client -- -a 127.0.0.1 -p 5152 args -t AAPL -t MSFT

Documentation

For more detailed information about each component, please refer to the individual README files in their respective directories:

About

Real-time stock quote streaming in Rust — TCP subscriptions, UDP data stream, multithreaded server

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages