A monotheist who interests in Machine Learning, Software Engineering, and Islamic Education as well. Actively contributing as a tech speaker in several events such as seminar, workshop, and conference from local to international level (previously in PyCon Indonesia 2019 & PyCon Asia Pacific 2020). Skilled in Linux & Python for research, engineering, and production purposes. Currently living in the Special Region of Yogyakarta, Indonesia!
The bottleneck of a program can be caused by many reasons like bad data structure/logic/algorithm implementation, network connection, I/O bound operations, processor, etc. Database operations is kind of I/O bound operation which means, when it comes to the DB query program will waiting the result from another separate process. If the bottleneck is from the DB operations then you should try asynchronous processing :)
In Python, asynchronous support first introduced in version 3.4. Now the asynchronous Python is getting better by increasing third party packages. In this talk I'll cover the explanation about asynchronous DB operations in Python and then hands-off to show the results of using the asynchronous code compare with the synchronous one.
Postscript : Since I work day to day using the ORM (like SQLAlchemy) and PostgreSQL is our main DBMS (for product development), so the async in DB ops will be covered with SQLAlchemy and PsycoPG/AsyncPG as well.
Anyone who work with database operations (data scientists, back-end engineers, students/researchers, etc.)
What will they get out of it:
- Clear concept and application of asynchronous DB operations that can be applied in production environment, as well.
- A modern way to optimize query DB time with a minimum resource.