Me and a group for class are implementing a three tier system with an interface that involves a table, and remote procedure calls to update and view recent information. We are using MySQL and java to do it. I have already learned how to connect and query the database and use it to do all the table modifications on the user end side to update the database.
What I am wondering though is, if one of my interface applications has a table, how would I implement a way to keep the table information consistent if another application updates that same information. Do I just constantly refresh the information by comparing a last modified timestamp or something? The thing is since it's three-tier the interface is not necessarily synched with the database directly, but goes through a controller in the app logic to connect to the database. Does the other application also have to share the same service that the first app uses to modify the update and just send the information that it was updated to that app? I know the observer pattern applies (Subject being the database connection class, and observers being the two interfaces), but implementing it through sockets I don't really get.