Message Processors

They accept a generator function They initialise some sort of state They iterate though the generator, receiving messages They check if they recognise the message Unrecognised messages are ignored, so skip to next message Recognised messages are processede.g. Match regex, add number, append string, fetch URL. The state might change due to processing the messagee.g. String was appended, number changed. Reply to messages that expect onee.g. Return regex matches or fetch reponse. They keep iterating though the generator until it’s done They might return the state or some sort of result