03 August 2012
You can add ElastiCache to your AWS-based Datomic system in minutes:
- Login to your ElastiCache management console and choose "Launch Cache Cluster"
- Complete the wizard. You can accept all defaults.
- Back at the console, select "Cache Security Groups":
- ... and authorize your Datomic system's security group (default is "datomic"):
- Back at the console, select "Cache Clusters" and copy the node endpoints string:
- Paste the node endpoints into your transactor properties file:
- Set the node endpoints in your peer application code:
That's all there is to it. Datomic will transparently use ElastiCache. There is no need to configure any cache timeouts, or change any code. Datomic's key names will not conflict with any other use, so you can use the cache for other tasks as well.
You can also configure different caches for different process in the system. For example, I keep a local memcached process running at the office, so from a cold peer (my development laptop) queries are fast, even when I am connecting to a transactor that is running in the AWS cloud.