Now to do the same as above but use Kyro instead of JSON.
privateSimpleKyroKeyValueStoreLevelDB<Employee>store;store=newSimpleKyroKeyValueStoreLevelDB(file.toString(),Employee.class);//The rest of the CRUD code is the same except for Employee has to implement serializable
Kyro is the fastest Java binary serialization mechanism for the JVM and it works with iOS and Java. Boon is the fastest JSON serialization mechanism for the JVM, and JSON works everywhere.
Now to do the above again but use MySQL instead of LevelDB.
MySQL and JSON
privateSimpleJsonKeyValueStoreMySQL<Employee>store;Stringurl="jdbc:mysql://localhost:3306/slumberdb";StringuserName="slumber";Stringpassword="slumber7890";Stringtable="json-employee-test";...store=newSimpleJsonKeyValueStoreMySQL(url,userName,password,table,Employee.class);//The rest of the CRUD code is the same except
LevelDBKeyValueStore key value store that writes binary data (key and data are binary)
SimpleJavaSerializationKeyValueStoreLevelDB Simple store that has a String key and uses plain Java serialization
SimpleJsonKeyValueStoreLevelDB Simple store that uses Boon JSON serialization and LevelDB
SimpleKyroKeyValueStoreLevelDB Simple store that uses Kyro Serialization and LevelDB
SimpleStringKeyValueStoreLevelDB String keys and String values using LevelDB
I am considering an equal number of Simple stores that use Long as keys. Then beyond that you have to roll your own on top of these.
SimpleJavaSerializationKeyValueStoreMySQL Simple store that has a String key and uses plain Java serialization
SimpleJsonKeyValueStoreMySQL Simple store that uses Boon JSON serialization and MySQL
SimpleKyroKeyValueStoreMySQL Simple store that uses Kyro Serialization and MySQL
SimpleStringKeyValueStoreMySQL String keys and String values using MySQL
SlumberDB fits into the BerkeleyDB sort of use case. It is currently meant for embedded sorts of access. SlumberDB will likely support LMDB and RocksDB. Early RocksDB support was started but not complete. I am also considering a wire protocol on top of JSON and Kryo using Vertx, and some replication using Vertx.
LevelDB is a lightweight database by Google modeled after BigTable tablet store. LevelDB gets used by Chrome.
RocksDB is a server-side version of LevelDB by Facebook that reportedly is more scalable than LevelDB.
MySQL is well MySQL. We are using it as a table with two columns. One column is indexed.
LMDB is an fast, compact key/value store which gets used by the OpenLDAP Project.
Kryo is the fastest and efficient object graph serialization for the JVM.