Apparently you can create services that are run with Twisted's twistd in two different ways. On the one hand you can create services using the Twisted Application Infrastructure and in the other you can create a service using the Twisted Plugin System. It seems like besides some differences in how you start the the app on the command line, and the means by which you write the actual service, they are two ways to accomplish the same thing?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Looks like I found the answer:
http://twistedmatrix.com/pipermail/twisted-python/2009-September/020346.html
Which is the recommended or preferred way to deploy an app that will leverage twistd: designing the app as a twistd plugin or creating a Service and using a .tac file?
A plugin is nicer in that you can have command-line options, e.g.
$ twistd -n web --path=/tmp --port=8080