Experimenting with implementing things in bud.
Follow the installation guide here. That repository also contains docs on bud syntax, like this useful cheatsheet.
A good syntax highlighter for Dedalus code within the .\dedalus-paxos directory is the Souffle extension, which was designed for Datalog.
The code should be run in this order: acceptors, proposers, then clients, each in a separate shell window. To change the number of acceptors, proposers, etc, modify the constants at the bottom of the paxos_protocol.rb
file. Bloom modules that take in these numbers as parameters don't fare well with budplot; don't ask why. Therefore they're hardcoded.
Note: I have yet to test with more than 1 proposer or client. That's a big yikes.
ruby paxos_acceptor.rb <acceptor_id>
Replace <acceptor_id>
with a number, starting from 1. The next acceptor should be 2, etc.
ruby paxos_proposer.rb <proposer_id>
Replace <proposer_id>
with a number, starting from 1. The next proposer should be 2, etc. Leader election should happen immediately; you will see some debug outputs.
ruby paxos_client.rb <num_proposers>
Replace <num_proposers>
with the number of proposers you spun up. You can input commands by typing in the terminal here, then hitting enter. You'll see them with a slot assigned if all goes well. Yay!
The code should be run in this order: coordinator, participants, then client, each in a separate shell window. Type input into the client to test.
Generate a dataflow graph by running the following in their respective directories.
budplot paxos_acceptor_module.rb paxos_client_module.rb paxos_proposer_module.rb paxos_protocol.rb PaxosAcceptorModule PaxosClientModule PaxosProposerModule PaxosProtocol
budplot client_module.rb coordinator_module.rb participant_module.rb 2pc_protocol.rb ClientModule CoordinatorModule ParticipantModule TwoPcProtocol