RxAerospike

RxJava2 wrapper for aerospike-client-java

License

License

Categories

Categories

Net
GroupId

GroupId

com.github.ganet
ArtifactId

ArtifactId

rxaerospike
Last Version

Last Version

0.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

RxAerospike
RxJava2 wrapper for aerospike-client-java
Project URL

Project URL

https://github.com/Ganet/rxaerospike
Source Code Management

Source Code Management

https://github.com/Ganet/rxaerospike/tree/master

Download rxaerospike

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.ganet/rxaerospike/ -->
<dependency>
    <groupId>com.github.ganet</groupId>
    <artifactId>rxaerospike</artifactId>
    <version>0.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.ganet/rxaerospike/
implementation 'com.github.ganet:rxaerospike:0.3.0'
// https://jarcasting.com/artifacts/com.github.ganet/rxaerospike/
implementation ("com.github.ganet:rxaerospike:0.3.0")
'com.github.ganet:rxaerospike:jar:0.3.0'
<dependency org="com.github.ganet" name="rxaerospike" rev="0.3.0">
  <artifact name="rxaerospike" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.ganet', module='rxaerospike', version='0.3.0')
)
libraryDependencies += "com.github.ganet" % "rxaerospike" % "0.3.0"
[com.github.ganet/rxaerospike "0.3.0"]

Dependencies

compile (3)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib jar 1.0.5
com.aerospike : aerospike-client jar 3.3.1
io.reactivex.rxjava2 : rxjava jar 2.0.3

test (3)

Group / Artifact Type Version
junit : junit jar 4.11
org.jetbrains.kotlin : kotlin-test jar 1.0.5
org.mockito : mockito-core jar 2.2.17

Project Modules

There are no modules declared in this project.

#RxAerospike Build Status Maven Central GitHub license

RxAerospike is a wrapper for aerospike-client-java which re-implements the database operations using RxJava2 and Kotlin. This wrapper also has 100% code coverage.

Current features

  • RxAerospike implements all non-deprecated operations from IAsyncClient and every operation returning a Task.
  • Synchronous operations have not been implemented yet, but they will be. Also, certain scan operations are implemented in a strange way, which does not send onCompleted() or onFailure() notifications (although they can throw exceptions), and this increases the difficulty of wrapping them.
  • All the other operations implemented in AerospikeClient and AsyncClient are still available in this wrapper (synchronous, admin and scan operations from IAerospikeClient), but not implemented using RxJava.

Why Kotlin?

  • Kotlin makes it very easy to implement class delegation by eliminating all the boilerplate code.
  • Also Kotlin supports default parameters, which generate different methods auto-magically in Java by using the annotation @JvmOverloads, reducing boilerplate code even more.

Maven central

	<dependency>
		<groupId>com.github.ganet</groupId>
		<artifactId>rxaerospike</artifactId>
		<version>0.3.0</version>
	</dependency>

FAQ

Why not implement the wrapper using Kotlin extension functions?

In a Kotlin world, that would be the way to go and the ideal implementation. However, this wrapper is intended to be compatible with Java applications as well, so class delegation is a better option.

Why don't you have a code coverage badge to prove the 100% coverage claim?

I attached an IntelliJ coverage report to the project, as other coverage tools like JaCoCo would not report the correct percentage (i.e. they base their results on .class bytecode rather than real source code and in this case AerospikeRxClient extends AsyncClient but its not responsible at all for testing its implementation). Feel free to download the project and run the tests with IntelliJ code coverage enabled.

Contact and contributions

I will setup a contribution model soon, please use this mailing list for any questions for now: https://groups.google.com/forum/#!forum/rxaerospike

Versions

Version
0.3.0
0.2.0
0.1.0