A simple typed publisher-observer mechanism