Design exercise 1: Wire protocols
For this design exercise, you will be building a simple, client-server chat application. The application will allow users to send and receive text messages. There will be a centralized server that will mediate the passing of messages. The application should allow:
The client should offer a reasonable graphical interface. Connection information may be specified as either a command-line option or in a configuration file.
You will need to design the wire protocol— what information is sent over the wire. Communication should be done using sockets constructed between the client and server. It should be possible to have multiple clients connected at any time. Design your implementation using some care; there will be other assignments that will utilize this codebase.
You should build two implementations— one should use a custom wire protocol; you should strive to make this protocol as efficient as possible. The other should use JSON. You should then measure the size of the information passed between the client and the server, writing up a comparison in your engineering notebook, along with some remarks on what the difference makes to the efficiency and scalability of the service.
Implementations will be demonstrated to other members of the class on 2/12, where you will also undergo a code review of your code and give a code review of someone else. The code review should include evaluations of the test code coverage and documentation of the system. Code reviews, including a grade, will be turned in on Canvas, along with your engineering notebook and a link to your code repo.