views:

57

answers:

1

I will be developing a system that will involve a data acquisition server where each acquisition will fill a row. I also need to have the ability to inform the user application of when new data has been acquired.

From what I have read, it's not a good idea to use a database as a message queue and vice versa, but I was wondering if I could use both?

The acquisition application can add the new row into the database and then notify the listeners in the messaging system. Would this be the best approach for this type of system? Would it be too complex? Is there a design pattern that already implements this?

+1  A: 

Yes, inserting a row in the database and updating the GUI are two distinct operations, which should be separated.

What you are suggesting sounds good:

  1. insert a row in the DB
  2. notify the user application via a notification mechanism (listeners will do fine).
Eric Eijkelenboom