Hi
i have a spring boot microservice doing some analytics on the data in postgres and returning result. The Predix documentation says about hosting the analytics in Analytic Catalogue, could you please guide on how to post or deploy my microservice on the analytic catalogue
regards Rajesh
Answer by Tom Turner · Jan 05, 2016 at 03:17 AM
Please see the RMD Reference App for some ideas on exposing your microservice REST API to the Analytics framework.
https://www.predix.io/services/starter-pack.html?id=1224
https://github.com/PredixDev/predix-rmd-ref-app
Keeping the Data phase separate from the Analytics algorithm phase is a best-practice which will allow you to reuse the algorithm against other data sources. The Reference App shows you how to do that. This will be similar to how Predix itself will later get data automatically based on configuration.
Soon we'll be working on a Reference App example that mirrors what Sujoy mentioned below where the Java is exposed via uploading it to the catalog and the Catalog pushes the java to the cloud as a Microservice. The Analytics Catalog allows for any Data (or API) to be exposed by each analytic you make but the cost is that the data retrieval is custom to each Dataset needed for each Analytic. The difference, in the Ref App, will be that we'll stick to a simple Analytics API which allows for runtime Data Binding.
Following the pattern, in the Ref App, of a general purpose Analytics API, rather than having a different API for each analytic will save you a lot of time in the long run as you build out more analytics or reuse the same datasources.
Using the simple Federated Data Handler API and XXXDatasourceHandler impls allows you solve the problem of data retrieval just once. Just like a DAO layer in your app.