3

Thinking to start using Cassandra in a new Java based project, I found this post Beginning Cassandra -- Use Kundera? Something else? in which it is stated that "Pretending that Cassandra is a relational database the way Kundera does is a great way to paint yourself into a corner without quite understanding how you got there.".

I understand that the data modelling should follow different rules, but suppose I follow these rules, is there anything else to lose if I wrap Cassandra with a JPA layer, like Kundera, DataNucleus or others?

Community
  • 1
  • 1
user5396668
  • 145
  • 3
  • 14
  • FWIW DataNucleus doesn't "pretend that Cassandra is a relational database". That said, this is the JPA API, and the query language isn't a perfect fit for Cassandra (as has been said in many many other posts). This is an opinion based question and not well suited to this site. – Neil Stockton Jan 13 '16 at 10:41
  • WADR, I don't see how the question is an opinion based. I asked a general question about hiding the native API and mentioned 2 examples to better exaplain the question. Having this tool of downvoting doens't mean you have to use it hastily. – user5396668 Jan 13 '16 at 11:33
  • After not finding much, I decided to write a jpa-like cassandra persistence api driver - ohioedge. Check it out and see if that is what you are looking for. – donlys Mar 26 '18 at 16:35

2 Answers2

4

Did you have a look at Achilles ? http://doanduyhai.github.io/Achilles/

It is the most advanced Java object mapper right now for Cassandra and offers some annotations similar to JPA (@Entity, @Column, ...) but is developed with Cassandra semantics in mind (no read-before-write, direct delete, consistency level/ttl/timestamp support etc.) and provides type safety at compile-time

The video tutorials are here: https://academy.datastax.com/demos/advanced-object-mapping-java-achilles-what-why-how

doanduyhai
  • 8,712
  • 27
  • 26
  • 1
    "most advanced". Hmm, maybe that is an opinion (and since you haven't compared to any other "Java object mapper" then that is a baseless opinion), and that is why this site is not suited for opinion based question. – Neil Stockton Jan 13 '16 at 11:14
  • Thanks @doanduyhai. Is Achilles 'battle proven'? In this I mean does it have a list of heavy production users? – user5396668 Jan 14 '16 at 15:38
  • The latest version 4.x not battle proven because just released recently. Older version, namely 3.2.x is used in production by several companies (1Tb worth of data) – doanduyhai Jan 14 '16 at 15:45
0

if Achilles is too much static for U (too much setup for generated files, I could not setup it with kotlin+idea)

https://github.com/valchkou/cassandra-driver-mapping

is pretty well designed library, which executes statements on entity setup/config in runtime

kojiba
  • 11
  • 2