Currently all searches reside in memory and are lost when Heroku kills the free dyno. These need to be saved to a database. Has to be a NoSQL like Mongo because of the flexible schema. After this, the search request flow has to change:
A first middleware checks if the search exists in the DB and retrieves it.
Same current flow
When the search finishes, it's stored in the DB and removed from the app state.
Currently all searches reside in memory and are lost when Heroku kills the free dyno. These need to be saved to a database. Has to be a NoSQL like Mongo because of the flexible schema. After this, the search request flow has to change: