This is a general design question.
We are developing a web-application (Java, MySQL, Hibernate, Spring) where we want to display a computed total on one of the screens which gets updated constantly and in real-time. To be more specific, this is an e-commerce application and we are trying to show the total value of orders on a screen to the Administrator as shoppers on the other side are making their purchases. So this screen will always show information like this: Number of Orders: 122 Value of Orders: $23,932.32
We can update the screen via AJAX but need an elegant solution to receive updates from the database or our persistence layer (hibernate) which will tell a Java class in the application layer that a new order has been received so you should compute a new total and update the screen. We are using MySQL as our back-end database. Is there anything that wouldn't required the use of database triggers?
Any help would be great. Thanks in advance.
-kamal
|