Illustration Image

Cassandra.Link

The best knowledge base on Apache Cassandra®

Helping platform leaders, architects, engineers, and operators build scalable real time data platforms.

10/31/2017

Reading time:4 min

Achilles

by John Doe

View On GitHub PresentationAchilles is an open source advanced object mapper for Apache Cassandra. Among all the features:Advanced bean mapping (compound primary key, composite partition key, timeUUID, counter, static column …) Pluggable codec system to define your own types Life cycle interceptors to define custom behavior before INSERT/UPDATE/DELETE/SELECT operations Fluent options system to parameter runtime statements (consistency level, retry policy, …) Powerful and type-safe DSL to create your own queries Display of DML scripts & DDL statements Wrapper to deploy an embedded Cassandra server easily Tight integration with JUnit for productive TDD programming Support for Bean Validation (JSR-303) Support for Lightweight Transaction with dedicated listener interface Support for Materialized View Support for typed-safe Function calls Support for the new JSON API Support for multi-project compilation unit Support for native index, SASI and DSE Search Support for GROUP BY since Cassandra 3.10 and DSE 5.1.x Flexible naming strategy & insert strategy Runtime Schema Name Provider for multi-tenant environments Full compatibility with Java 8 CompletableFuture Warning: Achilles versions 4.x are no longer maintained, only bug-fixes are supported, please migrate toversion 5.x and follow the [Migration From 4.x Guide]InstallationBelow is the compatibility matrix between Achilles, Java Driver and Cassandra versionsAchilles version Java Driver version Cassandra version 5.3.1 (all Cassandra versions up to 3.11.0, all DSE up to 5.1.2) 3.3.0 3.11.0 5.2.1 (all Cassandra versions up to 3.7, all DSE up to 5.0.3) 3.1.3 3.7 5.0.0 (all Cassandra versions up to 3.7, all DSE up to 5.0.3) 3.1.0 3.7 4.2.3 (all Cassandra versions up to 3.7, all DSE up to 5.0.3) 3.1.0 3.7 4.0.1 (limited to Cassandra 2.2.3 features) 3.0.0-alpha5 2.2.3 3.2.3 (limited to Cassandra 2.1.x features) 2.1.6 2.1.5 3.0.22 (limited to Cassandra 2.0.x features) 2.1.6 2.0.15 Warning: there will be no new features for branches older than 5.0.x. Those branches areonly supported for bug fixes. New features will not be back-ported. Please upgrade to thelatest version of Achilles to benefit from new featuresTo use Achilles, just add the following dependency in your pom.xml: <dependency> <groupId>info.archinnov</groupId> <artifactId>achilles-core</artifactId> <version>${achilles.version}</version> </dependency>Do not forget to deactivate incremental compilation and use Java 8 in your pom.xml file <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.8</source> <target>1.8</target> <useIncrementalCompilation>false</useIncrementalCompilation> <annotationProcessors> <annotationProcessor>info.archinnov.achilles.internals.apt.processors.meta.AchillesProcessor</annotationProcessor> </annotationProcessors> </configuration> </plugin> </plugins> </build> Achilles 5.x requires a JDK 8 to work. It is recommended to use JDK 8 update 45 or laterFor unit-testing with embedded Cassandra, add this dependency with test scope: <dependency> <groupId>info.archinnov</groupId> <artifactId>achilles-junit</artifactId> <version>${achilles.version}</version> <scope>test</scope> </dependency>For now, Achilles depends on the following libraries:cassandra (see matrix version above) cassandra-driver-core (see matrix version above) Jackson core, annotations, databind & module jaxb annotations 2.3.3 Google Auto Common 0.4 Google Auto Service 1.0-rc2 Java Poet 1.5.1 Guava 18.0 slf4j-api 1.7.2 commons-io 2.4 commons-lang3 3.3.2 commons-collections 3.2.1 validation-api 1.1.0.Final org.eclipse.jdt.core.compiler-ecj 4.4.2Configure Your IDEAchilles is using code generation at compile time through annotation processors, you’ll need to configure your IDE carefully. Please follow the IDE Configuration guide5 minutes tutorialTo boostrap quickly with Achilles, you can check the 5 minutes tutorialQuick ReferenceTo be productive quickly with Achilles. Most of useful examples are given in the Quick ReferenceAdvanced tutorialTo get a deeper look on how you can use Achilles, check out the KillrChat applicationDocumentationAll the documentation and tutorial is available in the WikiVersioned documentation is available at DocumentationMailing listFor any question, bug encountered, you can use the mailing listLicenseCopyright 2012-2016 DuyHai DOANLicensed under the Apache License, Version 2.0 (the “License”); you may not use this application except in compliance with the License. You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Illustration Image

Achilles

Build Status

Presentation

Achilles is an open source advanced object mapper for Apache Cassandra. Among all the features:

  • Advanced bean mapping (compound primary key, composite partition key, timeUUID, counter, static column …)
  • Pluggable codec system to define your own types
  • Life cycle interceptors to define custom behavior before INSERT/UPDATE/DELETE/SELECT operations
  • Fluent options system to parameter runtime statements (consistency level, retry policy, …)
  • Powerful and type-safe DSL to create your own queries
  • Display of DML scripts & DDL statements
  • Wrapper to deploy an embedded Cassandra server easily
  • Tight integration with JUnit for productive TDD programming
  • Support for Bean Validation (JSR-303)
  • Support for Lightweight Transaction with dedicated listener interface
  • Support for Materialized View
  • Support for typed-safe Function calls
  • Support for the new JSON API
  • Support for multi-project compilation unit
  • Support for native index, SASI and DSE Search
  • Support for GROUP BY since Cassandra 3.10 and DSE 5.1.x
  • Flexible naming strategy & insert strategy
  • Runtime Schema Name Provider for multi-tenant environments
  • Full compatibility with Java 8 CompletableFuture

Warning: Achilles versions 4.x are no longer maintained, only bug-fixes are supported, please migrate to version 5.x and follow the [Migration From 4.x Guide]

Installation

Below is the compatibility matrix between Achilles, Java Driver and Cassandra versions

Achilles version Java Driver version Cassandra version
5.3.1 (all Cassandra versions up to 3.11.0, all DSE up to 5.1.2) 3.3.0 3.11.0
5.2.1 (all Cassandra versions up to 3.7, all DSE up to 5.0.3) 3.1.3 3.7
5.0.0 (all Cassandra versions up to 3.7, all DSE up to 5.0.3) 3.1.0 3.7
4.2.3 (all Cassandra versions up to 3.7, all DSE up to 5.0.3) 3.1.0 3.7
4.0.1 (limited to Cassandra 2.2.3 features) 3.0.0-alpha5 2.2.3
3.2.3 (limited to Cassandra 2.1.x features) 2.1.6 2.1.5
3.0.22 (limited to Cassandra 2.0.x features) 2.1.6 2.0.15

Warning: there will be no new features for branches older than 5.0.x. Those branches are only supported for bug fixes. New features will not be back-ported. Please upgrade to the latest version of Achilles to benefit from new features

To use Achilles, just add the following dependency in your pom.xml:

	<dependency>
		<groupId>info.archinnov</groupId>
		<artifactId>achilles-core</artifactId>
		<version>${achilles.version}</version>
	</dependency>

Do not forget to deactivate incremental compilation and use Java 8 in your pom.xml file

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <useIncrementalCompilation>false</useIncrementalCompilation>
                    <annotationProcessors>
                        <annotationProcessor>info.archinnov.achilles.internals.apt.processors.meta.AchillesProcessor</annotationProcessor>
                    </annotationProcessors>
                </configuration>
            </plugin>
        </plugins>
    </build>        

Achilles 5.x requires a JDK 8 to work. It is recommended to use JDK 8 update 45 or later

For unit-testing with embedded Cassandra, add this dependency with test scope:

 	<dependency>
 		<groupId>info.archinnov</groupId>
 		<artifactId>achilles-junit</artifactId>
 		<version>${achilles.version}</version>
 		<scope>test</scope>
 	</dependency>

For now, Achilles depends on the following libraries:

  1. cassandra (see matrix version above)
  2. cassandra-driver-core (see matrix version above)
  3. Jackson core, annotations, databind & module jaxb annotations 2.3.3
  4. Google Auto Common 0.4
  5. Google Auto Service 1.0-rc2
  6. Java Poet 1.5.1
  7. Guava 18.0
  8. slf4j-api 1.7.2
  9. commons-io 2.4
  10. commons-lang3 3.3.2
  11. commons-collections 3.2.1
  12. validation-api 1.1.0.Final
  13. org.eclipse.jdt.core.compiler-ecj 4.4.2

Configure Your IDE

Achilles is using code generation at compile time through annotation processors, you’ll need to configure your IDE carefully. Please follow the IDE Configuration guide

5 minutes tutorial

To boostrap quickly with Achilles, you can check the 5 minutes tutorial

Quick Reference

To be productive quickly with Achilles. Most of useful examples are given in the Quick Reference

Advanced tutorial

To get a deeper look on how you can use Achilles, check out the KillrChat application

Documentation

All the documentation and tutorial is available in the Wiki

Versioned documentation is available at Documentation

Mailing list

For any question, bug encountered, you can use the mailing list

License

Copyright 2012-2016 DuyHai DOAN

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this application except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Related Articles

packages
cassandra
admin-monitor

DataStax Enterprise OpsCenter

John Doe

7/24/2018

Checkout Planet Cassandra

Claim Your Free Planet Cassandra Contributor T-shirt!

Make your contribution and score a FREE Planet Cassandra Contributor T-Shirt! 
We value our incredible Cassandra community, and we want to express our gratitude by sending an exclusive Planet Cassandra Contributor T-Shirt you can wear with pride.

Join Our Newsletter!

Sign up below to receive email updates and see what's going on with our company

Explore Related Topics

AllKafkaSparkScyllaSStableKubernetesApiGithubGraphQl

Explore Further

libraries