Challenge Overview
In this challenge we are looking for a Proof of Concept solution to demonstrate a wrapper microservice over an R application. The goal is to develop a sample Java based microservice that will wrap an R program using rServe - a server - client interface between Java and R.
You should create three separate applications:
1. Sample R program that will be available via RServe
2. Java module calling the R program using rServe
3. Spring Boot microservice that wraps the java module
It is up to you to choose what the sample R program will do and there are no hard requirements. Any program is a fair game as long as it demonstrates some practical real world scenario for using R language. Good example is a program that reads and parses input data, performs some analytical processing using R packages like forecast or randomForest, and returns the data to the calling java application. Demonstrating rServe integration is a big part of this challenge so the more features are demonstrated the better.
Java application should handle all integration with the R program. Microservice will just call the java application and will not do anything related to R. Service endpoint(s) can be accessed anonymously, with no authentication.
Please note the Microservice and R Program, will be hosted separately on separate servers. Please make provision for it in your sample.
General Requirements
Service should be developed using Spring Boot, latest stable version. Unit tests are required for java application and the microservice. Annotations are preferred over xml configuration where possible.
Deployment
Create a Docker image for the microservice. Image should have just the minimal environment and should start only the app process (so don't make the entrypoint be a bash shell) and the app process should not run as root. Application code should be embedded into the image, and not mapped as a volume. Service logs directories should be mapped to a directory on the host.
Include instructions for deploying the services locally (both with docker and within development environment), and Heroku (docker). Deployment instructions should be based on a RHEL OS (both for microservice and RServe).
References:
https://www.programiz.com/r-programming
https://www.rforge.net/Rserve/
https://www.rforge.net/rJava/