yandex / odyssey

Scalable PostgreSQL connection pooler
BSD 3-Clause "New" or "Revised" License
3.21k stars 162 forks source link

Reusing components to support different RDBMS #292

Open jmolinap opened 3 years ago

jmolinap commented 3 years ago

Is it possible to reuse parts of this project in order to support a different DBMS?

If so what components should be looked at and what things should be taken into account?

Thanks.

x4m commented 3 years ago

Hi! Thanks for the inquiry and sorry for the delay. You can reuse Machinarium, it's a coroutine engine designed to ease state-machine implementation of the protocol. Normally you have to implement the protocol in a state machine to have async network usage, but with Machinarium, you can describe interaction as consecutive function calls. Machinarium will take care to seamlessly pass execution context to other coroutines, when you wait for network IO. This will be done without syscalls.