Essentially used for non - centralization of the tickets between the kiosks. There is a leader, chosen by default as C3 at first. This code represents the implementation of the Multipaxos using python and socket programming coded for Ticket buying kiosks.
Inorder to run the code:
Open 3 terminals and navigate it to the path where your python files are stored, then run the command: python3 tickets.py C1, C2 or C3.All the ip address for these clients are stored in the config.json file. And the config_fr_euca.json file has the ip addresses corresponding to the private instances which we created for our Eucalyptus environment. ( config_fr_euca.json and tickets_fr_euca.py is used instead of config.json and tickets.py, if you are running the code for Eucalptus environment). Once the system starts running, type the command: Buy 20: inorder to buy the 20 tickets from the kiosk. show : This command will be used to show the log of the each kiosk, which should correspond to that of the leader log, because as we know, leader is always true. Warning message will be printed saying "not enoigh tickets" if we try to buy or exceed the limit of buying 1000 tickets from the central server. Or if the tickets in the server goes empty.