Java-REST-Client-Examples Sandbox by DNA-Evolutions
1.5K
Containerizing an application helps to use it more conveniently across different platforms and, most importantly, as a microservice. Further, scaling an application becomes more straightforward as various standardized orchestration tools can be utilized. A Microservice can be launched either (locally) or, for example, as a highly-scalable web-micro-service in a Kubernetes cluster.
This repository is part of our JOpt-REST-Suite. It provides examples of how to set up a REST client in Java to access the following DNA Evolution's web services:
You can find an extensive collection of examples for the core library in our Java-TourOptimizer-Examples repository. Please let us know if you need help to port an example and run it by a REST-Service.
The service can be called via an API-Key using our Microsoft Azure-Kubernetes Infrastructure. If you are interested in hosting our JOpt-REST-GeoCoder and JOpt-REST-GeoRouter products in your environment, please get in touch with us.
All our RESTful Services utilise Spring WebFlux and Swagger. Internally the Java version of TourOptimizer is used. Indeed all specifications for the different services are derived from the core library, leading to guaranteed compatibility between all three services.
Forward-/Reverse geocode Addresses or Positions.
Find distances and driving times between points. Either as turn-by-turn result optionally providing driving instructions and route shapes or as matrix request for multiple routings.
Optimize a problem consisting of Nodes, Resources, and optionally externally provided connections. In contrast to our other services, we allow you to host your JOpt-TourOptimizer locally.
The project is subdivided into five major types of examples:
Each of the example-sections has its own README.
If you want to get started without the hassle of installing Java, Maven and an IDE, we provide a sandbox. The sandbox is based on code-server and can be used inside your browser, and the interface itself is based on Visual Code. The sandbox is available via DockerHub (here). You have to host the sandbox in your Docker environment (Please provide at least 2-4Gb of Ram and 2 Cores). You can pull the sandbox from our DockerHub account (The Dockerfile for creating the sandbox is included in this repository). The latest version of our examples is cloned by default on launching the Docker container, and you can start testing JOpt-REST right away.
You must mount a volume to which the examples of this project are downloaded on the container's startup. After re-launching the container, the latest version of our examples is only cloned if the folder is not already existing, keeping your files safe from being overridden.
Launching a sandbox and mount your current directory ('$PWD') or any other directory you want:
docker run -it -d --name jopt-rest-examples -p 127.0.0.1:8043:8080 -v "$PWD/:/home/coder/project" dnaevolutions/jopt_rest_example_server:latest
After starting the container, you can open http://localhost:8043/ with your browser and log in with the password:
joptrest
During the run of your first example file, some dependencies are downloaded, and it will take some time (below 1 minute depending on your internet connection). In case you need help, contact us. The downloaded examples are taken from our github repository - Java-REST-Client-Examples
If you need any help, please contact us via our company website www.dna-evolutions.com or write an email to [email protected].
Originally, JOpt is a flexible routing optimization-engine written in Java, allowing to solve tour-optimization problems that are highly restricted, for example, regarding time windows, skills, and even mandatory constraints can be applied.
Click, to open our video:
Content type
Image
Digest
sha256:d8a33ce96…
Size
823.6 MB
Last updated
7 months ago
docker pull dnaevolutions/jopt_rest_example_server