mountebank icon indicating copy to clipboard operation
mountebank copied to clipboard

Support custom database options in addition to --datadir

Open bbyars opened this issue 4 years ago • 7 comments

The --datadir CLI flag introduced a file-based database, but it runs into file locking issues at load. Rather than coupling to a specific database technology, it would be better to add custom support (analagous to the --formatter flag). The impostersRepository has now defined a JavaScript interface (even if it's quite clunky), allowing module inclusion.

bbyars avatar Dec 30 '20 03:12 bbyars

Hi, can you assign me to the issue?

gePower avatar Jan 13 '22 05:01 gePower

Before you spend time on it, let me check on a parallel initiative first. I'd talked to someone else about this using a plugin model.

bbyars avatar Jan 14 '22 16:01 bbyars

Perfect !

gePower avatar Jan 15 '22 02:01 gePower

what about something like https://knexjs.org/?

jbadeau avatar Jan 20 '22 10:01 jbadeau

Intressting, there is https://sequelize.org/ too or mongoose !

gePower avatar Mar 29 '22 13:03 gePower

I'll note that in extreme cases, --datadir will exhaust the filesystem it's running on when request-recording is enabled and a high number of requests are made in load-testing scenarios. A less incompressible backend for imposters could be useful independently of a generative imposter.

TetsujinOni avatar Oct 10 '22 20:10 TetsujinOni

Yep. There's a mongo db implementation in the works that should be a much more robust solution. The --datadir did at least force creating the right interface (and a painful refactoring from sync operations to async), but having a pluggable persistence mechanism is the next step. -Brandon

On Mon, Oct 10, 2022 at 3:05 PM Jonathan Choy @.***> wrote:

I'll note that in extreme cases, --datadir will exhaust the filesystem it's running on when request-recording is enabled and a high number of requests are made in load-testing scenarios. A less incompressible backend for imposters could be useful independently of a generative imposter.

— Reply to this email directly, view it on GitHub https://github.com/bbyars/mountebank/issues/591#issuecomment-1273756307, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAARFP473WKGG5EEFGW33BLWCRZI3ANCNFSM4VN4MQBQ . You are receiving this because you authored the thread.Message ID: @.***>

bbyars avatar Oct 16 '22 20:10 bbyars