in reply to Database access and async web framework (like Mojolicious)

I follow very much the same strategy, using DBD::SQLite and potentially later switching to a different database.

The main change I expect is switching the connection string to the next database, and that should be more a configuration change than a program change.

I recently thought I needed (and added) a "reconnect" feature to release/refresh database handles after hibernation (in MooX::Role::DBIConnection). But overall, I try to keep little abstraction between me and DBI.

As long as you stay away from session-specific changes, having a pool of database handles is fair game and is the approach I would always try to use.

  • Comment on Re: Database access and async web framework (like Mojolicious)