3

I am having my database created in MYSQL and a WebSocket application(Autobahn Wamp WebSocket v1) created in Python. I have an application which makes entries in my database.

My requirement is that I need to create a trigger in MYSQL which would notify my Python WebSocket application(Autobahn Wamp WebSocket v1) when data gets inserted in my database.

I would like to know whether it is possible to achieve the above mentioned functionality or not, and if yes how?

Thanks in advance.

oberstet
  • 21,353
  • 10
  • 64
  • 97
Gaurang
  • 371
  • 2
  • 4
  • 21
  • This seems like a pretty full example with MySQL code: http://stackoverflow.com/questions/13474012/invoke-pusher-when-mysql-has-changed – aychedee Jul 31 '14 at 06:56
  • The MySQL data can be inserted by others than your Web app ? – Miguel Prz Jul 31 '14 at 06:57
  • Yes the MYSQL data is inserted by others. Not by my app... – Gaurang Jul 31 '14 at 07:18
  • PostgreSQL allows you to do this via a TRIGGER and NOTIFY : http://www.postgresql.org/docs/9.3/static/sql-notify.html. I don't whether MySQL has similar functionality. – oberstet Jul 31 '14 at 08:19

2 Answers2

3

The python-mysql-replication project maybe interesting. It allows you to receive event like insert, update, delete with their datas from your application

Miguel Prz
  • 13,718
  • 29
  • 42
1

I think you can use pubsubsql which is Mysql push notification service. The link is as follows :
https://github.com/pubsubsql

Bostone
  • 36,858
  • 39
  • 167
  • 227
bharatj
  • 2,327
  • 1
  • 25
  • 25