My project manager has requested a trimmed-down master/slave deployment without the JMS component (or any mode of communication between master and slave). The organization is worried about 'too many moving parts' and possible points of failure. We have mutually come up with the following alternative design:
1. As before, the slave would have a read-only local copy of the index, but it would no longer attempt to post index-update messages on any JMS queue.
2. A database trigger would be set up on appropriate tables to set a modified-date timestamp on a row when an update to that row is made by the slave (or any external process, which there is one).
3. A separate master process would wake up on a cron-schedule, get all the indexable Hibernate entities that have been modified since its last run-time and reindex them. It would not attempt to connect to any JMS queue.
4. The master process would switch its master copy to its source copy, as before, at the end of a given run.
5. A separate rsync job would be set up to periodically copy the master source index to a source location local to the slave, to avoid the slave having to make an network hop when refreshing its local index.
What would be the easiest way to implement this approach (i.e., what classes to reuse/sublcass?). Any potential pitfalls?
Thanks in advance,
Michael