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

Use async drivers for database operations #456

Open
pramos84 opened this issue Mar 9, 2023 · 1 comment
Open

Use async drivers for database operations #456

pramos84 opened this issue Mar 9, 2023 · 1 comment

Comments

@pramos84
Copy link

pramos84 commented Mar 9, 2023

Considering that Emmett is an async framework, making use of the new async/await features of Python and Uvicorn, it would be desirable to prioritize the use of async drivers in database access. I believe it doesn't take much effort to replace pymysql with aiomysql, for example, or pyodbc with aioodbc. I don't know how mature are these modules, I admit, but they tend to increase the performance of database operations, mostly at intensive load applications.

By the way, there's no other framework with the elegance and objectivity of Emmett. It has at same time only and all features required by vast majority of modern web applications, dispensing with the need of third-party modules for common operations, like database access, session management or templating, yet still maintaining lightweight and simplicity in code structure. Congratulations!

Thanks for all work.

@gi0baro
Copy link
Member

gi0baro commented Mar 10, 2023

Thank you for the nice words @pramos84

Actually the hard thing of making Emmett's ORM async is not regarding drivers, but on Model interfaces.
This is quite hard, and tracked on emmett-framework/firestorm#3, but first we need to complete #309 (this is why there's an empty repo for the ORM right now).

Also mind that async won't make your code more performant, it will just increase the concurrency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants