Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Database Event to update client

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not sure to write in the correct area because my problem is not properly related with database anyway i will try :-)
I have a mysql database connected to a simulator generating data associated with the behaviour of an electric circuit, I would like to know if it exists the way to "mimic" such electrical circuit in a web page and the possibility to connect a circuit component with a certain parameter in the database that the simulator can change.
For example in the database I have the parameter A1, I am going to build a circuit in a web page and I associate to a certain circuit object the db parameter A1. When the simulator is running a new value of A1 is generated an event is sent to the "mimic"object associated with this parameter and the object changes color or update a label or something similar. Someone can help me with examples or articles to understand at least the technologies to be used.

Thanks
 
author & internet detective
Posts: 40913
840
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure what forum it belongs in yet either. I put it in a few so we can figure it out once you start getting replies.

I'm not sue what you mean by "mimic". Like a diagram?
 
Sheriff
Posts: 26948
83
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you can have the simulator send a message to the object, that might not be too hard. If you wanted to have a change in the database cause the message to be sent, then that would be a lot harder. But your description doesn't tell me which of those two things you had in mind, or even whether you had something else in mind.
 
takaya treschi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well currently the simulator generates data to be inserted in the DB. such data are typically par1=2, par2=ON etc. The simulator generates some inserts in the DB and the tables (organized for parameter type: int,double,string ecc.) are 3 columns (parameter_name, date, value).
The improvement could be the association between a certain parameter with an event. It means I can register for a list of parameters (par1,par2, par3) and when one parameter, in the list, changes its value an event is launched and (final step) its representation is modified.
For example if I associate a par1 (with possible values 1 and 0) to a traffic light, and I'm registering for it, every time a new instance of par1 is received a notification is sent and the traffic light representation changes its color.
I imagine I can build the "circuit" using something like a javascript library defining the components and so on, but I have no idea how to connect and notify changes in the database with javascript events.

Thanks    
reply
    Bookmark Topic Watch Topic
  • New Topic