Hello All,
I am tasked with building a process which will compensate for replication delays on our LDAP system. Currently, there is one write server and 4 read servers. After writing an entry to the write server there can be up to a 4 second delay on the system before the entry is replicated to the read servers. Therefore, if I call service "A" which updates a record and then hit service "B" immediately afterwards which is supposed to read that record, the data will be stale.
To resolve this issue I was planning on building a caching web services so that no applications interface directly with the database, but rather through the caching service. The service would store all creates, updates, and deletes in a cache (presumably a List<ModelObject>
). The CRUD - R entries would need to remain in the cache for a minimum of four seconds. Then when service "B" attempts to read, the caching service would check the cache prior to performing the read operation on the database.
So, my question is two part. 1) Is this a feasible solution and if not, what problems do you see? 2) How would I do maintenance against the cache within a WCF service. In other words is there a way to initiate a background worker thread that clears entries from the cache that are 4 seconds old?