Notify event from application to web page
first i describe my app then the question and.. sorry for my english.
I have an application that make some data processing, this app is write in C++. The process search for some patterns in the data and trigger some event, when event is triggered i push dat开发者_开发问答a to a Database.
In the other hand i have a webpage (PHP or Ruby o Python) to see what happens in the C++ application. Some kind of Log. The web app query the Database to see the events.
But now i wan't to notify the webpage when i update the database (when an event is occur). The idea is immediately show the database change in the web app.
How can i accomplish that?
Any idea, model, guideline would help..
Thanks in advance and thank for your time!
EDIT: Finally i solve this using couchdb like my DB and node.js. Couchdb have a grate _change API, this can be query for the change in real time with nodejs and push the change (the notification or the data) to webpage using socket.io
You are going to need to be able to run HTTP queries, While you could use sockets and do this manually. You'll probably be much happier using an existing HTTP library. See libCURL: http://curl.haxx.se/libcurl/
Finally i solve this using couchdb like my DB and node.js. Couchdb have a grate _change API, this can be query for the change in real time with nodejs and push the change (the notification or the data) to webpage using socket.io
精彩评论