[CONPY-104] Python connector doesn't support gevent. Created: 2020-08-12  Updated: 2020-08-13

Status: Open
Project: MariaDB Connector/Python
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Trivial
Reporter: Himanshu Mishra Assignee: Georg Richter
Resolution: Unresolved Votes: 0
Labels: Question
Environment:

Any



 Description   

Since python connector is wrapped over C apis, python sockets are not used, hence gevent monkeypatching isn't able to yeild to other co-routines.

Wanted to confirm if this is by standard and co-operative concurrent programming in python will not be supported on mariadb connector, or do we have goals to use pure python sockets eventually.

Concurrency can be achieved using threading, however it adds notorious overhead of context switching.



 Comments   
Comment by Georg Richter [ 2020-08-13 ]

Hi Himanshu,

thank you for the feature request (I reclassified it from bug to feature).
We are currently thinking about several ways to add asynchronous support but also support for gevent.

MariaDB Connector/Python uses MariaDB Connector/C which supports IO plugins (currently there are plugins for socket, sharedmem and named pipe available), it shouldn't be a big deal to write another plugin which uses gevent sockets directly.

/Georg

Generated at Thu Feb 08 03:30:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.