Apache geode provided following two types of persistence models.
- persisting on local disk (shared nothing architecture each member writes to it own disk).
- persistence on HDFS (removed from current develop branch).
But in the current Apache Geode architecture there is no support for plugin any other custom storage for persistence of cold data and keep operational data in memory.
There are no direct interfaces provided which you can implement for your store and that store will be used for persisting/retrieving data.
We are trying to create a pluggable storage framework wherein you can attach any kind of storage, write/read in any format based on your storage.
Consistency and availability is managed by attached store and not by Apache Geode.
We are proposing a pluggable storage interface which can be implemented by any application and they will be able to push and retrieve the data from that store.
Following major interfaces we are adding for pluggability.
CacheStoreManager : Manages all the cache stores. Creation/Removal/modification to the cache store is done by CacheStoreManager.
CacheStoreFactory : Used for creating cache store
CacheStore creation and attaching the cache store to the region is done as follows
CacheStore pluggabilitry is achieved using readthrough and writebehind concepts in geode.
In geode we can create a asynceventlistener and attach that to the region. We are using the same asyncevent queue framework for persistence of data in cache store.
For retrieval of data, if there is miss in the cache then we are retrieving it from cache store.
Sequence diagram for put/get with attached cachestore
- CacheStores are supported only for partitioned regions.