Search code examples
pythonthrift

Running thrift server as daemon


Right now I'm testing the waters with Apache Thrift, and I'm currently using a TThreadedServer written in Python, but when I run the server, it is not daemonized. Is there any way to make it run as a daemon, or is there another way to run thrift in a production environment?


Solution

  • Daemonizing processes has nothing to do with thrift. Thrift only provides the communication layer for different platforms and you can run the server in one of the several programming languages thrift supports (that is - great majority of what you can think of). No matter if you write the server in Java, C++ (I've tried those so far) or python, none of them will create a daemon. This feature is not supported (e.g. PHP natively doesn't support neither multithreading nor daemonizing).

    I've just seen supervisord, didn't play with it much, but it seems to be a good choice to manage processes like thrift servers.