title: Django/Flask Implementation: Listen permanently to connection via HTTP or Socket. (in Background)
body: <p>I'm currently planning a web-app that requires listening permanently to a open socket-connection and writing specifig things to a database.</p>
  
  <p>To get known to flask (framework of my choice) and python in general I want to play around with twitter-streaming-api.</p>
  
  <p>The essential problem is the same. How to implement a permanent "Connection-Listener" for both kind of connection?</p>
  
  <p>Is the below suggested way the best way of doing it?</p>
  
  <p><a href="https://stackoverflow.com/questions/4909165/tweepy-streaming-api-integration-with-django">tweepy Streaming API integration with Django</a></p>
  
  <p>I somehow don't like the idea of having to implement a system-deamon on the machine.</p>
  
  <p>Edit: Of course I want to serve things to users via HTTP. All this should be non-blocking.</p>