NLP programs have to load tons of math models. It's a good choice to separate NLP program from web-service-infrastructure.
We compare the C++ NLP module as the Worker to the Python control module as the Leader. The Leader arranges for the Worker to do its job and collects its achievement.
While the process loop between Leader and Worker is synchronous, you can use Secretary assistant-python-script for making asynchronous calls to Worker.
-
protobuf and python-protobuf
-
Zeromq and pyzmq
All shells should be run at $(zeromq_nlp_service) directory.
./build/bin/Worker
python ./build/bin/Leader_synchronous.py
python build/bin/Secretary_asynchronous.py
python build/bin/Leader_asynchronous.py