How possible is it to get mysql database changes to be pushed to a an admin screen without admin interaction using pusher?
Can pusher run some kind of listener for changes on the mysql or will pusher simple do some kind of fancy polling?
All in all how would such a setup be coded?
A simple example or a link would be very much appreciated.
Invoke PubNub PUSH Message via MySQL Trigger on UPDATE, INSERT and DELETE
MySQL Makes it simple to wrap your coding into easily accessible TRIGGERS via Stored Procedures. You can create something similar with pusher and I know how to do it with PubNub; so here is a quick guide with PubNub and MySQL. Simplicity is what you seek and here is your solution! I will walk you through an easy way to bind any UPDATE, INSERT and DELETE action on your table to a stored function that will get invoked each time, sending a push notifications to your mobile and web apps easily with PubNub.
PubNub Push Message
NOTE: Make sure your PROCEDURE types are correct DOUBLE or VARCHAR or TEXT.
MySQL Trigger Code INSERT Example
NOTE: Make sure to include the columns you need here in your push message.
MySQL Trigger Code UPDATE Example
Monitor the Push Message via Debug Console
http://www.pubnub.com/console?sub=demo&pub=demo&channel=mysql_triggers – You can watch your triggers being fired via PubNub Dev Console. This way you can understand what paramaters you need to have changed and what data is important for you to include in each push notifications that can be received by PubNub websocket and more on the Mobile and Web device.
Receiving The Push Message in JavaScript
Now you have the steps needed to send and receive change events from MySQL directly via simple procedures. There are ways to optimize this method as well such as issuing a signal to a daemon process that queues and pools HTTPS push notifications. This should be plenty efficient.