I'd really like to understand why they didn't just also have a small container for this running. The only reasoning given in the article is "another container to run and manage" which Docker compose, TestContainers, etc will make trivial.
If a dev came to me and suggested we go this route I would need to seriously be convinced. They even explicitly call out this is only for local development meaning it's not like this was piggy-backing off of a secondary need for a Rust redis anyways. Insanity.
No, they don’t. They exercise an alternative in-process implementation that is supposed to behave like a real Redis, but will not.
> In production Encore provisions a real, managed Redis, because the embedded server is a development fixture and is not built to scale.
Ah! So you do see how it does not behave identically to a real Redis.
This sounds like a terrible idea. Now they’re stuck forever maintaining an alternative Redis implementation, and it isn’t even useful in production.
const cache = {}
Look I made a redis serverMaintaining byte-for-byte parity with newer versions of Redis sounds like being in debt; why not rely on your fork instead?
> or to replace it with a mock, which only behaves like Redis until your code relies on something the mock implements differently.
But, then, what they built did apparently behave differently:
> To guard against that, we test the Rust server against the implementation we ported from.
> Running the reference suite this way surfaced differences that would be easy to miss otherwise.
Reddit is from 2009 so must have lots of technical debt over the years? and could have been an opportunity to start afresh? They may have have ended up with a better product!!