Have you looked at couchdb? It has an http api and you can "watch" the modifications made to the database using a "_changes" feed that has options for longpoll, eventsource and a "continuous poll".
Web socket is not supported out of the box yet but you can always put couchdb in front of a proxy and send the changes feed over the socket connection once it's established.
Web socket is not supported out of the box yet but you can always put couchdb in front of a proxy and send the changes feed over the socket connection once it's established.