I want to write a web application with client Javascript and an internal server (Python). The client often needs data from the server via AJAX. Data in the database and expensive to download for each request.
However, in a desktop application, I simply load data from the database once into memory, and then gain access to it. In a web application - the server code is run every time for a request, so I can’t do this (each launch must again be loaded from the database into memory). How can this work? Can one process run on the server or do I need to use something else here?
An example is similar to autocomplete here in stackoverflow for tags - how is it implemented on the server for fast caching / loading?
I wonder if a data warehouse such as memcached is a good approach to autocomplete? How do you present keys for partial matches?
source
share