GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - aholyoke/traildb-java: Java bindings for TrailDB

BranchesTags
Open more actions menu

Latest commit

 

History

200 Commits
200 Commits

Folders and files

NameName
Last commit message
Last commit date
.circleci
.circleci
 
 
examples
examples
 
 
it
it
 
 
java
java
 
 
native
native
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
Dockerfile.installed
Dockerfile.installed
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
Readme.md
Readme.md
 
 
pom.xml
pom.xml
 
 

Repository files navigation

TrailDB Java CircleCI

Java Bindings for TrailDB

Installation

mvn install -P Linux

or

mvn install -P Mac

Only Linux and OS X are supported for the time being. Windows is on the way.

Run

Compile and run the example by adding the jar to your classpath and setting java.library.path to the object file.

javac -cp native/linux/target/lib/traildbJava.jar examples/Example.java

java -Djava.library.path=`pwd`/native/linux/target/ -cp examples:native/linux/target/lib/traildbJava.jar Example

Architecture

├── java
│   ├── pom.xml (TrailDB Java Classes)
│   ├── src
│   │   └── main
│   │       └── java
│   │           └── traildb                       ───┐
│   │               ├── TrailDB.java                 │
│   │               ├── TrailDBConstructor.java      │
│   │               ├── TrailDBTrail.java            │
│   │               ├── TrailDBMultiTrail.java       │ 1
│   │               └── TrailDBEventFilter.java      │
│   └── target                                       │
│       └── classes                                  │
│           └── traildb                           <──┘
│               ├── TrailDB.class                 ─────┐
│               ├── TrailDBConstructor.class      ───┐ │
│               ├── TrailDBTrail.class               │ │
│               ├── TrailDBMultiTrail.class          │ │
│               └── TrailDBEventFilter.class         │ │
├── native                                           │ │
│   ├── linux                                      3 │ │ 2
│   │   ├── pom.xml (Linux Build)                    │ │
│   │   └── target                                   │ │
│   │       ├── custom-javah                         │ │
│   │       │   └── traildb-java.h                <──┘ │
│   │       ├── lib                                    │
│   │       │   └── traildbJava.jar               <────┘
│   │       ├── libTraildbJavaNative.so           <──┐
│   │       └── objs                              ───┘ 5
│   │           ├── TrailDB.o                     <──┐
│   │           ├── TrailDBConstructor.o             │
│   │           ├── TrailDBTrail.o                   │
│   │           ├── TrailDBMultiTrail.o              │ 4
│   │           └── TrailDBEventFilter.o             │
│   ├── pom.xml (Native Build)                       │
│   └── src                                          │
│       └── main                                     │
│           └── native                            ───┘
│               ├── TrailDB.c
│               ├── TrailDBConstructor.c
│               ├── TrailDBTrail.c
│               ├── TrailDBMultiTrail.c
│               └── TrailDBEventFilter.c
└── pom.xml (TrailDB)
  1. Java sources under java/src/main/java/traildb are compiled using javac to their .class files under java/target/classes/traildb

  2. Java classes are jarred together into native/<platform>/target/lib/traildbJava.jar

  3. javah is used on the .class files to automatically generate the header file native/<platform>/target/custom-javah/traildb-java.h

  4. The header file is included in every c source under native/src/main/native. Each c source is compiled with gcc to their .o object files under native/<platform>/target/objs.

  5. Each object file is linked into a shared object file native/<platform>/target/libTraildbJavaNative.so. The TrailDB library is linked at this stage.

Images

  • The base image is defined in Dockerfile. It is an ubuntu image with the jdk and traildb installed. It can be built using make build

  • The installed image is defined in Dockerfile.installed. It is the base image with traildb-java bindings installed. It can be built using make install

Development

  • Implement exception raising

  • Unit tests

  • Set up maven or gradle or something so people can install

  • Benchmark relative to other language bindings

  • Audit multithreaded support

  • Cache field and method lookups

  • Benchmark again to evaluate efficacy of field caching

  • Finish implementing everything else

  • Enable -Wall and -Werr and fix issues

Functions

TrailDBConstructor

  • Constructor

  • add

  • append

  • finalize

  • close

  • setOpt

  • getOpt

TrailDB

  • Constructor

  • dontNeed

  • willNeed

  • numTrails

  • numEvents

  • numFields

  • minTimestamp

  • maxTimestamp

  • version

  • setOpt

  • getOpt

  • setTrailOpt

  • getTrailOpt

  • lexiconSize

  • getField

  • getFieldName

  • close

  • getUUID

  • getTrailId

TrailDBTrail

  • getTrail

  • getTrailLength

  • setEventFilter

  • unsetEventFilter

  • next

  • peek

  • getItem

TrailDBMultiTrail

  • setEventFilter

  • unsetEventFilter

  • next

  • peek

  • getItem

TrailDBEventFilter

  • addTerm

  • addTimeRange

  • newClause

  • numClauses

  • numTerms

  • isNegative

About

Java bindings for TrailDB

Topics

circlecidockerjavajava-bindingsjnitraildbtraildb-java

Resources

Readme
MIT license
Activity

Stars

3 stars

Watchers

0 watching

Forks

4 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.