oban-bg/oban

Support for MySQL

Closed this issue ยท 8 comments

Is your feature request related to a problem? Please describe.

I'm trying to use Oban in a Phoenix app that's setup to use MySQL the database solution. However, it doesn't work because the only two adapters provided are for SQLite and Postgres

Describe the Solution You'd Like

It'd be great if MySQL was supported to. I'd be happy to contribute this feature myself with some guidance from the maintainers of the repository. Is there any technical limitation that would prevent this feature's existence?

Describe Alternatives You've Considered

I considered using Postgres. However, I'd like to continue using MySQL because I'm using PlanetScale to run and scale the database in production.

@pepicrft SQLite was just added in the previous release, and that release isn't a week old yet. After the dust settles and we have reports of SQLite usage in the wild we can explore supporting MySQL.

Thanks a lot @sorentwo for your answer. That makes a lot of sense. I didn't know that the support of SQLite has just been released.

After some deliberation, we won't be adding MySQL support to Oban core. Adding MySQL through a separate package that defines an engine, peer, notifier, and migrations is possible if anybody is up to the challenge ๐Ÿ™‚

jclem commented

@sorentwo Makes sense! Keeping the core of Oban focused is a good thing. Is there anything from your deliberations you can share that may help folks looking to implement an Oban engine etc. for MySQL in the future? (Apologies for my random appearance in this issue, I've been watching it for a few months ๐Ÿ˜„)

Is there anything from your deliberations you can share that may help folks looking to implement an Oban engine etc. for MySQL in the future?

Implementing a new engine, peer, and migrations should be straightforward if you follow the Lite engine's pattern. My deliberation was about time core competency, time commitments, and supporting Oban's existing users/customers.

To reanimate this question, @sorentwo , the "straightforward" part would be making an engine for Oban and not Oban Pro, right? I think supporting all the Oban Pro features would require more work and I don't think it has abstractions to do it cleanly now, would have to modify oban pro itself which is obviously not open source

@hubertlepicki That's correct. Making a "basic" engine for MySQL, like the existing ones for Postgres and SQLite should be straightforward. That would not work with most existing Pro features, much like SQLite doesn't either.