I am a computer programmer, but I want to learn something about web services. I decided to use python. I am trying to understand how web applications work. I know how to create a basic tornado website (request-response) and a working jabber client, but I do not know how to mix them. Can i use any python components in web services? Should they have a specific structure (synchronization or asynchronous)? Because I am stuck in loop handlers:
If the tornado starts the web server with the command:
app = Application()
app.listen(options.port)
tornado.ioloop.IOLoop.instance().start()
... since (where) can I start the xmpp loop?
client.connect()
client.run()
I think the tornado listening loop should handle xmpp listening, but don't know how
Sincerely.
Edit: I forgot. I am using pyxmpp2