-
-
Notifications
You must be signed in to change notification settings - Fork 19
feat: Azure CosmosDB as a fallback from repos #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@eduardconstantin, would you mind reviewing/giving feedback on that? It was implemented in the past by you, and I'd better get your feedback on whether, after these modifications, it's still a valid logic. Also, I took a look at all the commented out code, and there should be no more. Could you also check if there's still some logic commented out in this one? I think it was mostly the Azure Cosmos DB-related one. |
Fixed in 4e50430 + quickly tested locally and the app is still working. Haven't integrated Azure though, still needs to be tested, but waiting for @eduardconstantin a couple of more days! That might be something you might have in your repo as well. |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://kind-plant-0e80e5803-60.westeurope.5.azurestaticapps.net |
@danieldanielecki hey, sorry for late response, if you uncomment the code then you should be able to use cosmosdb as a database to query the q&a |
thanks for the feedback, will be debugging next week from localhost if it works :) |
@eduardconstantin, and how about pushing to Azure CosmosDB all the datasets? |
the dataset has to be formatted, I don't have the database anymore so I can't tell you exactly what was the format but I believe I had an object with the question and the answers and which answer was the right one. |
Have you uploaded the dataset manually to Azure Cosmos DB or did you have some kind of script for that? |
I believe a had a script, but I deleted it after I uploaded the dataset |
oki, let me try with Cursor Pro to recreate it ;-) |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://kind-plant-0e80e5803-60.westeurope.5.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://kind-plant-0e80e5803-60.westeurope.5.azurestaticapps.net |
@eduardconstantin, I think the PR is ready now. I've been off last 3 weeks, and haven't been working on that, sorry for coming back on that topic... Would you mind to try it by yourself? What wonders me, is only |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://kind-plant-0e80e5803-60.westeurope.5.azurestaticapps.net |
The previous solution was not economically affordable, to have a separate container for every single question set. Azure is charging for every single container. Every single container takes 400 RU/s, and free tier is only until 1000 RU/s. That's why in 79ee998 I made the change, it wasn't feasible economically. |
When I implemented this I was using only one list of questions for Azure Fundamentals and it fit in their free tier plan. |
Thanks for input! Decided to give it a shoot, after reinventing a more economic solution! :) |
Fixes #23
Pull Request Type
Summary
Initially, we had questions coming from Azure Cosmos DB, but those have been replaced by fetching directly from GitHub. However, it would be good to have data in Azure Cosmos DB and use it as a fallback, or simply as a backup. The old code has been mostly reused, and modified to have the fallback functionality.