We are implementing some functions that are very computationally intensive (machine learning inference). We don’t want to block the Parse from serving the app while these functions run.
The options I was considering:
Run another api with access to the same data but on a different server. Then when these functions are required simply call those end points on the other server and have them add the end result to the Parse database.
Have another server that can’t access any data from Parse. It then has an api which requires the entire payload of data from our main app. Have a cloud function which accepts the end result and populates it into Parse.
If I go with (1) would it be possible to run a separate Parse app that connects to the same data? It would basically mirror the main parse app except that it would have different cloud code for these long-running functions.
If I go with (2) in some ways it could be simpler because it could run on something like AWS Lambda. But it would require passing a lot of data back and forth to our main Parse app.
In testing option (1) I can get a 2nd instance of
parse-server to connect to the same database. Are there any possible issues with this?
What’s the best way to get the 2 instances to communicate with each other? (e.g. call cloud code of one server instance from the cloud code of a different server instance)