A simple Internet Radio Station
Rust Makefile
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
Cargo.toml
LICENSE
Makefile
README.md

README.md

Rustcast

A simple Internet Radio Station (based on this project design).

Design Decisions

  • Programming Language: Rust
  • Server Design Model -- Async IO based using mio library
  • I spawn OS threads for each station and communicate to those threads from my server (event loop/poll in the code) using Rust channels. Each station thread is responsible for streaming a single mp3 to a set of UDP clients.
  • I depend on the mio poll mechanism to handle multiple clients.
  • I have used the Rust standard library networking APIs in both of the clients, ie, no dependence on mio in those two programs.

Known Bugs / Missing Functionality

  • The server currently doesn't send announces for change of songs. I could have added it using another dedicated channel which would create another send_message for the relevant connection (I just ran out of time by the time I noticed this was missing). However, the TCP client is capable of handling simultaneous input from server and user as I use threads there as well.
  • The server currently doesn't have a CLI. It was not hard to do, I just noticed it too late as it was not obvious from the reference implementation. I could have spawned another thread to take user input (similar to what I did in the TCP client), have a channel to communicate back to the server (event loop) and take appropriate actions.
  • I am unsure if I have handled timeouts well in the async server. mio seemed to be missing APIs for the same, apart from the timeout argument to the primary poll function. I, otherwise, have setup timeout in the TCP client.

Acknowledgements