Design Pattern: Reading Serial Ports
Serial ports must be read constantly to keep from losing data.
Packets sent over serial port must be assembled, checked for errors.
Implement as two separate processes:
Serial port reader
High priority process that reads data from the serial port, sends it to the Packet assember actor.
Packet assembler actor
Lower priority process that reads the raw data from the Serial port reader, assembles into packets for higher level protocol.
Separation keeps things lively, but need to watch actor queue size ...