I would like to implement a mechanism which will provide a RESTful API that allows a client to register interest in a subject with a sever, and receive asynchronous notifications from the server after the interest is registered. In enterprise (messaging) architecture, this is known as publish/subscribe 'pattern'.

With desktop applications, this is readily acheivable - however with web applications, it is proving to be more difficult.

is there a (preferably open source) framework or library out there that allows the publish/subscribe pattern to be applied to web applications?.

Server side technology may be in any of the following languages: C, C++, PHP, Python, Ruby.

I am running on Linux Ubuntu 10.0.4