Applications of Byzantine Consensus

Marton Trencseni - Sat 23 August 2025 • Tagged with lamport, byzantine, generals, distributed

This article examines where Lamport's original oral-messages Byzantine Generals algorithm does and does not apply in practice, contrasting unsuitable cases like distributed databases and rocket launches with a suitable case in redundant flight control systems.

Continue reading

A more general implementation of Lamport's Byzantine Consensus algorithm in Python

Marton Trencseni - Tue 12 August 2025 • Tagged with lamport, byzantine, generals, python, flask, distributed

This follow-up factors Lamport’s Byzantine Generals algorithm into a generalized class that's independent of I/O and payloads. Any node can initiate a round (be "king"), values can be arbitrary strings, and multiple rounds can run concurrently.

Continue reading

Lamport's Byzantine Generals algorithm in Python

Marton Trencseni - Wed 30 July 2025 • Tagged with lamport, byzantine, generals, python, flask, distributed

I discuss Lamport's Byzantine Generals problem and why it requires a total of N≥3M+1 nodes with M malicious nodes, and then implement the solution using Python with HTTP Flask servers.

Continue reading

Lamport's logical clocks and the Ricart–Agrawala Distributed Mutual Exclusion algorithm in Python

Marton Trencseni - Sun 13 July 2025 • Tagged with distributed, mutual, exclusion, ricart, agrawala, python, flask

This post shows how to implement the Ricart–Agrawala Distributed Mutual Exclusion algorithm with Lamport's logical clocks using HTTP Flask servers.

Continue reading

Exploring Lamport's Bakery algorithm in Python

Marton Trencseni - Fri 11 July 2025 • Tagged with lamport, bakery, python, flask, distributed

This post shows how to implement Lamport’s Bakery algorithm with Python HTTP Flask servers. The Python code is short and readable, helping newcomers grasp the algorithm’s logic without the syntactic overhead of C++. The asynchronous HTTP flow also generates plenty of overlap between workers, so the need for mutual exclusion is obvious. Exposing the variables through REST endpoints enables observation of ticket picking and critical section entry in real time, potentially making the flow of the algorithm easier to understand.

Continue reading