A pub/sub model using the smallmachine patterns