dotcloud/docker — pull request #6199 by icecrime (2014-06-04 19:04:54+00:00)
Title: Event subscription refactoring

Events subscription (`/events` API endpoint) attributes pseudo-unique identifiers to incoming subscribers: originally its host, then its subscription time. This is unnecessary and leads to code complexity.

Introduce a `JSONMessagePublisher` to provide simple pub/sub mechanism for `JSONMessage`, and rely on this new type to publish events to all subscribed listeners. The original logic is kept for the `since` and `until` parameters, and for client disconnection handling.