Python Forum
notification from database - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: GUI (https://python-forum.io/forum-10.html)
+--- Thread: notification from database (/thread-2391.html)



notification from database - iFunKtion - Mar-13-2017

Hi there,

This is a gui application I am building using qt4 and connects to a couchdb server. Within this application, there is a very simple messaging system. I have set up a separate database for just the messages to make it easier, I hope. I am aware that there are 3 basic ways to get notification from couchdb, using polling, Long poll or continuous feed. As for the messages, they will be sent to the database maybe once every half hour, or so, but they go out to 12 clients.

What is the standard way to get this coming into an application? If I were to set up a continuous connection, where would it come into? or does it not really matter? I do as it happens have a separate class the deals with the database connection regarding the rest of the application, but this simply opens the connection sends the data and closes it again.


RE: notification from database - Larz60+ - Mar-13-2017

Since it's a RDBMS (I don't know couch db but if it has any Moxie, there will be a trigger)
use trigger to fire notification when event occurs.
RDBMS - Relational Database management system (not supposed to use acronyms.


RE: notification from database - iFunKtion - Mar-13-2017

Thanks for your input, Couchdb it will supposedly send change notifications, however, I couldn't get it to work i.e. it would send just the one change notification the moment the application started, then it would timeout after 90 seconds, which is somewhat annoying when you are only accessing the database every 5 minutes or so, so I have opted to get the application to check the database for new documents every minute.


RE: notification from database - Larz60+ - Mar-13-2017

Quote:Couchdb it will supposedly send change notifications
??  -- Do you have any documentation on this?