This is a mirror repo based on my course project with final fixes
- Python
- HTTP
- socket
- xmlrpc
- json
- time
- asyncio
- threading
- sys
Format: python3 server.py [ip] [port]
Example
python3 server.py localhost 3000
Format: python3 server.py [ip] [port] [ip_leader] [port_leader]
Example
python3 server.py localhost 3001 localhost 3000
Format: python3 client.py [ip] [port] [client_ID]
Example
python3 client.py localhost 3000 client01
Command | Description |
---|---|
enqueue(x) |
x is a string. This command is used to add to the queue. Will return queue length after enqueued |
dequeue |
This command is used to pop the queue. Will return the popped value |
log |
This command is used to return the log recorded by leader |
-1 |
Exit the client |