1

I have an c# application that makes changes to a mysql database via nusoap server in PHP. i have to open another instance of that same application and it makes changes to the same database. i want to know please ¿how can i notify the first instance of the app when the second one makes any change on the database so the first one updates its interface with the updated data?

i tried implementing a method that every certain time checks the database for any changes but that is not an option because changes has to be made at the moment the second instance changes the database

i've tried this to know if there is another instance with the same name but it's all that i have

instances = Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length;
ProgrammingLlama
  • 36,677
  • 7
  • 67
  • 86
  • 1
    _"changes has to be made at the moment the second instance changes the database"_ - why? Databases aren't usually intended to push information. You access the information they store by querying them. – ProgrammingLlama Apr 01 '19 at 03:11
  • See a similar question [here](https://stackoverflow.com/questions/23031723/mysql-listen-notify-equivalent). – ProgrammingLlama Apr 01 '19 at 03:13
  • changes have to be made because the first instance needs to update its interface with the new data at the moment the second one makes changes its for a tic tac toe game implementation – Alejandro Castañeda Apr 01 '19 at 03:24
  • i can't use any other libraries than the ones provided by visual studio – Alejandro Castañeda Apr 01 '19 at 03:25
  • 1
    Given you control the backend in both instances, make the modification place an element on a message queue like rabbitmq and the other instances should be listening to this for a change. Message queues are designed for this form of data distribution. – danblack Apr 01 '19 at 03:30
  • Visual Studio doesn't provide any libraries (fyi). – ProgrammingLlama Apr 01 '19 at 04:30

0 Answers0