Excited by the upcoming release of Chrysalis I wanted to start a little web app project using the wallet.rs library. Without going into too many details, users on the site will be able to generate an Iota address to deposit their tokens and have the ability to withdraw them. I'm, using Next.js for the web app, and deploying on Vercel, which will automatically create my API routes as serverless functions.
I'm stumped on how to proceed with the integration of the Node.js wallet.rs library into my web app. The issue is the wallet.rs library creates a Stronghold database that can only be accessed locally on the machine. This doesn't work in a serverless environment because there will be many machines/instances being spun up. How can they talk to a singular, locally stored Stronghold database?
I was thinking of storing the Stronghold database onto a storage service like AWS S3, however many serverless functions downloading the database file onto their own machine, performing their own actions, and overwriting the database back into the S3 wouldn't work too well. It would overwrite the data the other machines had written. Doesn't seem too efficient either.
Is there something I'm missing on a simple way to have a serverless application integrate the wallet.rs Node.js library?