PubSub design pattern implementation.