Ecosystem:Apache Ignite
Test procedure
There are the following ways to use the combination of Apache Ignite and PostgreSQL.
- Ignite persists in-memory cached objects to PostgreSQL via JDBC (CachedJdbcBlobStore and CachedJdbcPojoStore)
- Ignite does not directly interact with PostgreSQL, but is used as a second-level cache of Hibernate ORM
- Ignite acts as a replacement for memcached, and PostgreSQL server processes cache data via the pgmemcache extension
Here I show the use as a memcached replacement. First, download the Apache Ignite binary distribution and unzip it.
Then start the Ignite server. The Ignite server starts accepting memcached binary protocol at port 11211.
$ cd ${Ignite_home_dir}
$ bin/ignite.sh examples/config/example-cache.xml
Install the pgmemcache extension as described in ${pgmemcache_dir}/README.rst. Start the PostgreSQL server.
To run the pgmemcache regression test, change the port number to 11211 in the first line of ${pgmemcache_dir}/test.sql as follows:
SELECT memcache_server_add('localhost:11211');
Run the test.
$ psql -f test.sql postgres
However, incrementing/decrementing an integer value with memcache_incr()/memcache_decr() doesn't seem to work. If you try to increment/decrement an object that was previously cached by memcache_add()/memcache_set(), the function call reports a warning message and returns -1. But subsequent calls to memcache_incr()/memcache_decr() create a new cache entry and increment/decrement its value. This is probably due to some defect of Ignite, because pgmemcache works fine with memcached proper.