our web architecture is based on commercial products both for in memory caching and the relational backend database.
In the context of investigating moving the web stack into the cloud, we are looking at Couchbase both for the caching layer (which would also sit in the cloud, next to the apps) as well as potentially replacing the internal database with Couchbase as a document oriented NoSQL database (at least for the read portion).
That would mean that we would have to make the following changes:
- Asymmetric read/write...the apps would always read from the cache but write to the backend systems of record (read >> write). The backend systems of record would then update the internal NoSQL database which in turn would populate the cache
- Implement read through cache....apps in the cloud would always talk to the in memory caching layer (including XCDR). if objects are not found in the cache, the cache should automatically retrieve data from the internal backend couchbase db, without the application code being aware of it (not a side cache)
So, my questions are:
- Is having a cloud based caching layer plus a NoSQL internal backend database a valid pattern ?
- Is it possible to implement a read through cache with Couchbase, i.e. the CB caching layer would transparently retrieve the data from the backend db if not found in the cache ? If yes, what kind of backends would be supported for that (relational db's, NoSQL, couchbase itself)
- Regardless of whether implementing a side cache (i.e. the apps first talk to the cache and then to the backend) or a read through cache (i.e. the apps talk to the cache, and the cache talks to the backend), how to expose the couchbase data manipulation API via HTTP, or is it recommended to use the couchbase SDK even across WAN links (in terms of latency) ? How does the memcached API play into this ?
thx Nick