Skip to content

Latest commit

 

History

History
95 lines (69 loc) · 2.92 KB

README.md

File metadata and controls

95 lines (69 loc) · 2.92 KB

Aristotle

Java Version Badge Apache License Badge

Aristotle is a JSR 370 JAX-RS webservice of CRUD operations against a graph database. It supports Neo4J now.

Start Locally in Jetty

Navigate to a dedicated directory; make sure port 8080 is not occupied and the following environment variables are set:

export NEO4J_URI=
export NEO4J_USERNAME=
export NEO4J_PASSWORD=
export NEO4J_DATABASE=

Then start webservice with:

./jetty-start.sh

Press Ctr-C to stop the webservice and delete generated directories if needed when done.

Test

mvn clean verify

Deployment

At this moment deployment is manual and pretty much follows jetty-start.sh

Sending Logs to ELK Cloud

Simply add Logstash integration and install agent on the production server. The logs will be available on integration dashboard.

Gateway Registration

export GATEWAY_PUBLIC_IP=<gateway IP>

# vocabulary paged & count
curl -v -i -s -k -X POST https://api.paion-data.dev:8444/services \
  --data name=wilhelm-ws-languages \
  --data url="http://${GATEWAY_PUBLIC_IP}:8080/v1/neo4j/languages"
curl -i -k -X POST https://api.paion-data.dev:8444/services/wilhelm-ws-languages/routes \
  --data "paths[]=/wilhelm/languages" \
  --data name=wilhelm-ws-languages

# expand
curl -v -i -s -k -X POST https://api.paion-data.dev:8444/services \
  --data name=wilhelm-ws-expand \
  --data url="http://${GATEWAY_PUBLIC_IP}:8080/v1/neo4j/expand"
curl -i -k -X POST https://api.paion-data.dev:8444/services/wilhelm-ws-expand/routes \
  --data "paths[]=/wilhelm/expand" \
  --data name=wilhelm-ws-expand

# search
curl -v -i -s -k -X POST https://api.paion-data.dev:8444/services \
  --data name=wilhelm-ws-search \
  --data url="http://${GATEWAY_PUBLIC_IP}:8080/v1/neo4j/search"
curl -i -k -X POST https://api.paion-data.dev:8444/services/wilhelm-ws-search/routes \
  --data "paths[]=/wilhelm/search" \
  --data name=wilhelm-ws-search

We should see HTTP/1.1 201 Created as signs of success.

Example requests

License

The use and distribution terms for Aristotle are covered by the Apache License, Version 2.0.