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

Add support for native query engine bindings #27

Open
Tracked by #116 ...
RobertCraigie opened this issue Jun 21, 2021 · 4 comments · May be fixed by #165
Open
Tracked by #116 ...

Add support for native query engine bindings #27

RobertCraigie opened this issue Jun 21, 2021 · 4 comments · May be fixed by #165
Labels
kind/improvement An improvement to existing feature and code. level/advanced priority/medium topic: internal Improvement or addition to non user facing code topic: perf Improvement or regression with performance

Comments

@RobertCraigie
Copy link
Owner

RobertCraigie commented Jun 21, 2021

Problem

Prisma has experimental support for natively binding the query engine to the node client, this reduces the overhead between the client and the rust binary, improving performance.

We should look into whether or not this is feasible for us to do as well.

Suggested solution

Would probably make use of Py03 and Py03-asyncio I don't know how feasible this is yet but if this does end up shipping we would have to bundle the rust binary with the package either using wheels or a build extension as providing downloads for rust binaries is not something that would be feasible for me to provide.

Maybe related, should look into cibuildwheel for packaging, see uvloop for an example using GitHub actions

Status

Moved status to #165

@RobertCraigie RobertCraigie added the kind/improvement An improvement to existing feature and code. label Jun 21, 2021
@RobertCraigie RobertCraigie added the topic: internal Improvement or addition to non user facing code label Oct 27, 2021
@RobertCraigie
Copy link
Owner Author

As the internal query engine is asynchronous I do not know how this feature would be properly implemented for the synchronous client.

The naive solution is to simply use something like loop.run_until_complete() however I don't know what side effects this could cause or it's limitations.

@RobertCraigie RobertCraigie added the process/candidate Candidate for the next release label Nov 30, 2021
Repository owner locked and limited conversation to collaborators Nov 30, 2021
Repository owner unlocked this conversation Nov 30, 2021
@RobertCraigie RobertCraigie added this to the v0.4.1 milestone Nov 30, 2021
@RobertCraigie

This comment has been minimized.

@RobertCraigie
Copy link
Owner Author

Found a good solution, implement synchronous rust functions that call the asynchronous rust functions.

@RobertCraigie RobertCraigie linked a pull request Dec 5, 2021 that will close this issue
17 tasks
@RobertCraigie RobertCraigie removed the process/candidate Candidate for the next release label Dec 13, 2021
@RobertCraigie RobertCraigie removed this from the v0.4.1 milestone Dec 13, 2021
@RobertCraigie RobertCraigie added the topic: perf Improvement or regression with performance label Jan 7, 2022
@RobertCraigie RobertCraigie changed the title Look into adding native python bindings for the rust binaries Add support for native query engine bindings Jan 23, 2022
@RobertCraigie
Copy link
Owner Author

Maybe worth looking into: https://github.com/axodotdev/cargo-dist for building binaries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/improvement An improvement to existing feature and code. level/advanced priority/medium topic: internal Improvement or addition to non user facing code topic: perf Improvement or regression with performance
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

1 participant