Skip to content

Kundera with RethinkDB

Devender Yadav edited this page Oct 10, 2017 · 4 revisions

This is an experimental feature. We encourage the community to contribute to the development and testing of it.


RethinkDB

RethinkDB is the first open-source, scalable JSON database built from the ground up for the realtime web. It inverts the traditional database architecture by exposing an exciting new access model – instead of polling for changes, the developer can tell RethinkDB to continuously push updated query results to applications in realtime. RethinkDB’s realtime push architecture dramatically reduces the time and effort necessary to build scalable realtime apps.

Support

Being a JPA provider, Kundera provides support for RethinkDB. Kundera maps JPA Entity with RethinkDB Table.

To use it, the user needs to add the following dependency in pom.xml:

<dependency>
     <groupId>com.impetus.kundera.client</groupId>
     <artifactId>kundera-rethinkdb</artifactId>
     <version>${kundera.version}</version>
</dependency>

Persistence unit configuration

<persistence-unit name="rethinkdb_pu">
	<provider>com.impetus.kundera.KunderaPersistence</provider>
	<properties>
		<property name="kundera.nodes" value="localhost" />
		<property name="kundera.port" value="28015" />
		<property name="kundera.keyspace" value="testdb" />
		<property name="kundera.client" value="rethink" />
		<property name="kundera.ddl.auto.prepare" value="create" />
		<property name="kundera.client.lookup.class" value="com.impetus.client.rethink.RethinkDBClientFactory" />
	</properties>
</persistence-unit>

Features:

  • CRUD

    • User can Create, Read, Update and Delete data in RethinkDB Table using Kundera. Refer test-case.
  • Basic Select Queries

    • User can perform basic SELECT queries with WHERE clause. Refer test-case.
  • Schema Generation

    • User can automatically generate schema by using kundera.ddl.auto.prepare property in Persistence Unit. Check Schema Generation for more details.

Limitation:

  • CRUD on simple entities (without embeddables, relationships and inheritance) is possible.
  • Only queries with WHERE clause (without AND/OR operators) are allowed.
Clone this wiki locally