About the Project
Corestack / Tetrish is my current systems-style project direction around taking a predefined service interface and thinking about how far I can push it into a distributed setup. The basic requirement is to speak the provided protocol correctly, parse the expected headers/messages, and make the service behave. The interesting part is what happens after that.
I started thinking about running multiple tetrisd services and multiple client/game binaries,
then immediately ran into the classic distributed systems questions: who owns the state, what order do inputs happen in,
what happens during leader changes, and how do you avoid a client rendering a reality that the cluster later overwrites?
Ideas Being Explored
- Parsing the provided service protocol cleanly rather than inventing a completely different wire format.
- Running multiple service instances for fault tolerance / experimentation.
- Using Raft-style leader election and replicated logs for the authoritative game state.
- Thinking about Lamport clocks / ordering when user inputs arrive at different nodes.
- Separating "client input accepted" from "state committed" so that rendering does not lie too much.
- Understanding where distributed consistency is useful, and where it is just me making Tetris unnecessarily cursed.
Status
Current status: design / implementation exploration. The main lesson so far is that distributed consensus is not just "run three services and vote". Once user input and live rendering are involved, the awkward edge cases become visible very quickly.
- Known: the service protocol should be followed instead of replaced.
- In progress: clean structure for parsing, service state, and client/server boundaries.
- Exploring: whether Raft is a good fit for the state machine or whether it becomes too heavy for the assignment shape.
- Open question: how much ordering/replication is educational without turning the whole thing into a mini thesis.
Why This Is Interesting
This sits in the nice painful intersection between Unix/network programming and distributed systems. It is one thing to read about consensus, totally ordered multicast, Lamport clocks, and state machines. It is another thing to ask "okay, but what happens to the falling block on screen if the leader dies now?" I'm pretty noob at these stuff so trying my best at C and relearning/implementing the ideas would be fun.