Skip to content
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

Improve performance by updating Python client code #1412

Open
leovegoda opened this issue Jul 17, 2023 · 3 comments
Open

Improve performance by updating Python client code #1412

leovegoda opened this issue Jul 17, 2023 · 3 comments
Assignees
Labels
Time:Major 4 - 10 hours work
Milestone

Comments

@leovegoda
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Refactor of the complex sync, update, tasks and fetch components.

Who is affected by the problem?
PeeringDB users get slower performance.

What is the impact?
Improve performance, simplify code, and upgrade to Python 3.

Are there security concerns?
No.

Are there privacy concerns?
No.

Describe the solution you'd like
Proposal from 20C:

These components handle the synchronization of data from the PeeringDB API.

They currently use an antiquated python2 task concurrency implementation that was originally meant to improve performance of initial synchronization.

We think the code for this can be vastly simplified with python3 asyncio and make it much easier to update the client in the future.

  • remove all the old task concurrency code
    • determine if we gain anything from async; if we do, use python's asyncio module instead
  • refactor the fetch and update logic to make it easier to understand and expand upon in the future
    • vastly simplified approach
    • make use of batch inserts

Do you think this feature will require a formal design?
Yes.

Describe alternatives you've considered
Do nothing.

Could this feature request need support from the Admin Committee?
No.

What is the proposed priority?
ASAP

Provide a rationale for any/all of the above
The old code uses Python 2, which is no longer actively supported.

@leovegoda leovegoda added the Time:Major 4 - 10 hours work label Jul 17, 2023
@grizz
Copy link
Member

grizz commented Jul 17, 2023

+1

@martinhannigan
Copy link

martinhannigan commented Jul 17, 2023 via email

@arnoldnipper
Copy link
Contributor

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Time:Major 4 - 10 hours work
Projects
None yet
Development

No branches or pull requests

4 participants