You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to use Orama on AWS, in particular on Lambda. My idea is to have two Lambdas:
one that is an API Gateway that will be called by the frontend (Flutter app, React, whatever) that will download the orama db from s3, restore the database, search the for the response and respond to the frontend,
one that is connected to a DynamoDB table as trigger, every time that an item on that table is inserted/modified/removed, this lambda will download the file, restore the database, perform the correct operation and re-upload it.
I think that one problem with this solution is the race condition that multiple triggers could cause, two triggers could download the file, update it and then re-upload. The solution could be using the AWS SQS system and send every operation as message, on the receiver side a lambda launched with maximum concurrency = 1 restore the db, perform all the operations and re-upload the file.
Are there any other solutions?
Thanks in advance, Riccardo
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everybody,
I would like to use Orama on AWS, in particular on Lambda. My idea is to have two Lambdas:
I think that one problem with this solution is the race condition that multiple triggers could cause, two triggers could download the file, update it and then re-upload. The solution could be using the AWS SQS system and send every operation as message, on the receiver side a lambda launched with maximum concurrency = 1 restore the db, perform all the operations and re-upload the file.
Are there any other solutions?
Thanks in advance, Riccardo
Beta Was this translation helpful? Give feedback.
All reactions