I have an app created in Anvil. The layout of the app is done in the Forms, and I have code running on my local (personal) machine callable with @anvil.server.callable to do the heavy number crunching. To make the response snappy, it has ~2GB of JSON objects loaded in memory. It works beautifully, but is dependent on (1) my local machine, and (2) my internet connection for anyone else to use the app.
This is not a showstopper- I have an extra workstation I can use effectively as a server. But I might prefer to do this on Anvil’s AWS-hosted servers. A few questions that arise are:
- What is the default memory allotment? And can we buy more?
- Can I do something in a server module like
with open(“really_big_JSON.txt”) as handle:
dictionary = json.load(handle) - Will the variables loaded in memory in question (2) persist between users & sessions as the loading process is slow?
Thanks in advance.