This document discusses various methods for communication between processes in Python, including client-server architectures, message queues, serialization, multiprocessing pipes, forking, and memory-mapped files. It provides code examples and performance results for different serialization formats like JSON, msgpack, and pickle. Memory usage is also compared for multiprocessing pipes, forking, and memory mapping for inter-process communication.
6. LVIV.PY #5
SERIALISATION
▸ Tested for json, ujson, msgpack, pickle
▸ first test — huge attributes number, small attribute size
json: 16.32 ms
ujson: 2.89 ms
msgpack: 1.40 ms
pickle: 1.49 ms
8. LVIV.PY #5
SERIALISATION
▸ Tested for json, ujson, msgpack, pickle
▸ second test — small attributes number, huge attribute size
json: 1.59 ms
ujson: 1.91 ms
msgpack: 1.22 ms
pickle: 1.20 ms