How to call a python program from spring boot?
A recommended way would be to convert your Python code in a REST microservice and then use that in your Java program.
I am using implicit library in python to implement a recommendation system. The model is ready, but the problem is my application is java based(spring boot). Now I've the model, matrices and everything setup in python. Basically the model has a offline component, where i perform the data feeding and matrix factorization stuff. After that I've a python method which returns the recommendation for a user. 
The offline component will run once in a month. For the whole month I need to store the factorized matrix in some place and whenever required I need to call my python method from REST endpoint, which will utilize the stored matrix and return some results.
So I've two questions.
1. My factorized matrix is a numpy.sparse_matrix. How can I store it, so that it will be reused again and again?
2. How do i invoke a python method in java endpoint which will utilize the methods from implicit library then do the calculation based on the matrix and return the result?   
Any insight would be appreciated. Thanks in advance.