Bokeh server and Database

Hi guys,

My app(Flask + Bokeh server + IIS) has to retrieve data from database which is often changed. How could I get the latest dataset from database?

  1. to setup a thread to check
  2. or directly retrieve data when each session is launch
  3. others?
    currently, I have to get data by using methods, which is fine, but, the website performance is for sure affected.

Could some one give me a clue? thanks a lot