-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Database schema #6
Comments
Regarding the fields from MirrorBrain about a mirror, I guess they can be nullable fields, right? |
Right.
Yes, that's what we do in Zimfarm 👍 |
That means, we shouldn't store the AuthInfo on the database then as we can set the public key as environment variable or pass it as a parameter? Right? |
No, we still want to maintain ability to have multiple workers. We'll most likely have one but it can change overtime and we want want to keep records separate. Another thing we may want to do is to have contrib workers run from time to time. My country is not in any VPN's list and will never be so I may start one from time to time to get insights. So we want to independant worker records and we want to identify and authenticate them. We'll store the public key in the DB for that |
Okay |
What do you think about adding a version number to the models especially for the Here's a snippet of it I have used in one of my personal projects.
|
If I understand correctly, it would make some fields un-mutable and the Test a sort of State Machine preventing a worker that has already That seems too sophisticated for our need. We can simply refuse the update should the data already be present in the DB but it's somewhat equivalent so do as you please. Keep in mind that we'll update the resource multiple times to first change status then record the results (or the error). |
Actually, it makes sure a model can always be updated by one request at a time. I agree it's a bit complex for this use-case since only one |
Please, could you provide more insights on the purpose of the |
ISP is an important information ; both historically and should we get multiple workers at the same time. How to get it is a worker issue. We'll look into what the GeoIP DB provide and if it's not there, we can query online services. It's true that over a VPN, such services might fail given the outbound IP is shared accross many users… but when we're on VPN, it's OK because the ISP is the VPN provider, so it can be part of the worker configuration. For non-VPN (that we wont support just now), those servives would likely work. |
Here's a list of the information I think we'd want in the DB.
Given we may want to use Metabase to consume data, we must have all information in-DB as metabase will connect directly and we wont be able to leverage computed stuff in the backend.
This must be taken into consideration when designing the DB. Might have an impact on DB size but that's not an issue
Mirrors
ASN and below params are duplicates from the MB DB that would only be helpful once we intend to configure MB remotely. We may skip all this for now. Also, those information are not available on mirrors.html
Countries
Workers
Tests
@elfkuzco, use this as direction and not specification. You are invited to suggest otherwise. Also at this stage, we want a basis to build upon. No doubt this will evolve as we implement.
The text was updated successfully, but these errors were encountered: