pokemon-showdown icon indicating copy to clipboard operation
pokemon-showdown copied to clipboard

Redis!

Open Zarel opened this issue 7 years ago • 14 comments

Redis is definitely the right in-memory database for our purposes. The problem is that we can't install Redis through npm. So... One of us should write a script to install Redis.

Or I guess we could make users install it themselves. But I like the script idea.

Zarel avatar Mar 06 '17 04:03 Zarel

What about windows support? Would we write a bash script and a batch script to support both?

panpawn avatar Mar 06 '17 04:03 panpawn

Yes, I'm pestering Morf about it in Dev as we speak.

Zarel avatar Mar 06 '17 05:03 Zarel

I'd rather there be an install script out of convenience rather than making users have to install Redis themselves. I'll write the install script once I finish setting up bhyve+qemu, since Virtualbox is rather slow on my machine

Morfent avatar Mar 06 '17 05:03 Morfent

Will Redis be a mandatory dependency? I was thinking of making the install script run on npm post-install so users don't have to remember to run it themselves

Morfent avatar Mar 15 '17 19:03 Morfent

Yes, the only way we can really use it is as a mandatory dependency.

Zarel avatar Mar 15 '17 19:03 Zarel

Perfect

Morfent avatar Mar 15 '17 20:03 Morfent

On second thought, I was thinking of probably adding a regular RAM store for other servers... Kind of like what we do for ladders. Would be easier than installing a true database on literally everyone.

Zarel avatar Mar 15 '17 22:03 Zarel

What would that entail?

Morfent avatar Mar 15 '17 22:03 Morfent

Mostly work on my end.

Zarel avatar Mar 15 '17 23:03 Zarel

I'll keep what I had written in case it ends up becoming relevant again.

Morfent avatar Mar 15 '17 23:03 Morfent

Don't know if this is still being considered, but how viable would it be to suggest users run Redis through Docker?

DylanSp avatar Jan 24 '21 22:01 DylanSp

Don't know if this is still being considered, but how viable would it be to suggest users run Redis through Docker?

I don't really think we're planning to use Redis for anything anymore - sqlite / postgres are the planned backends.

mia-pi-git avatar Jan 24 '21 22:01 mia-pi-git

Yeah. I'd still prefer Redis to SQLite for performance reasons, but Redis apparently can't be included with npm install and I don't want to maintain too many separate database backends anyway, so we're not going to do this.

We do still need to add persistent storage for battle logs though, to retain battles through restarts, and also to relieve some RAM pressure.

Zarel avatar Jan 25 '21 21:01 Zarel

We do still need to add persistent storage for battle logs though, to retain battles through restarts, and also to relieve some RAM pressure.

Coughs in #7874

mia-pi-git avatar Jan 25 '21 21:01 mia-pi-git