Write a client/server application that allows a user to:
- Add an annotation
- List annotations
- Delete annotations
An annotation contains:
- A start time
- An optional stop time
- A tag list.
- A source: [string or tag]
- Make use of heritage in Client and Server Socket class definition
- Use Factory Method and Singleton Design Pattern to make sure we create one and only one server per (host, port) combination
- Improve socket connection close (maybe use a staticmethod to close sockets conn.)
- Make a Serialization/Deserialization Factory Method to be able to switch the used library easily depending on the needs.
Pickleshouldn't be used on production. If this code happen s to be deployed on production, make sure to develop a custom unpickler that's safer than the default one. See what Python manual says about pickle above.
Warning The pickle module is not secure against erroneous or maliciously constructed data. Never unpickle data received from an untrusted or unauthenticated source.
- Explain the code with more comments
- Put the code in FLAKE8 format