Reputation: 357
I create a C++ program for prediction using ANN. I took a long time to initialize models but after loading them it can predict quickly. How can I create a service using this executable file that loads models one time (when OS starts) and after loading I using it for prediction?
Upvotes: 0
Views: 95
Reputation: 1224
You can break your program into two parts, a server and clients. The server can initialize models and be ready for predictions. The server can start as a service when the sytems starts. Use systemd for installing the service so that it starts after the system boot. The clients can provide the user interface for predictions and can communicate with the server using some inter process communication mechanism.
Upvotes: 1