Arx-Game / arxcode

A text-based/web game using Evennia.
MIT License
47 stars 42 forks source link

Postgres Cutover #58

Open emonical opened 5 years ago

emonical commented 5 years ago

In relation to #36, switching over to Postgres would provide substantial improvements, both in general performance, as well as in reduction of database locking.

Given the scope and complexity of the problem set, along with developing a solid cutover script, my recommendation is to do the following:

1) Take a snapshot of the database at a point in time, 2) Run the cutover script, 3) Do initial testing to get it to working, 4) Run it as a live/live with a staging-esque environment.

Ideally, at that point, have a group of people just go in and mess around with the data sets / commands, trying to break things / determine if things have broken.

TehomCD commented 5 years ago

Just making a quick note here that using the staging environment for testing getting TLS working for #13 makes a lot of sense, so we'll probably do that at the same time.

TehomCD commented 5 years ago

A few test cases you'll wanna cover with the postgres cutover is different ways the pickled fields of Attributes can hold data:

skills are dicts of skill names to integer values, followers_list is a list of Character objects, things like that. I don't think there's anything very deeply nested, but you could have one that's something like a list of dicts just to be sure. The representation of pickled evennia objects is particularly important though, since otherwise a huge number of attributes that are just like self.db.target = some_character_object would break if they can no longer deserialize them.

emonical commented 5 years ago

This has code ready to go (on: https://github.com/tellg/arxcode/tree/postgres_cutover).

Just need to test it.

dreamsofgold commented 5 years ago

Repost from issue 50, because this might be more visible:

I originally sent this as a +request in-game, but Apostate asked me to post it to the github for posterity's sake for the postgres cutover, so here it is:

"So, this is likely not something you want to deal with right now, but in light of the work you guys are gonna have to do for the postgres cutover, I figured this is as good an opportunity as any.

As you may have noticed, both through my goals and my rfrs, I spun Amund's entire story around training and becoming a blademaster of note. Part of this is attaining a combat legendary, medium wpn 6, and then starting to work on teaching and capping a few skills at five in order to achieve the overarching goal.

The problem is, I'm running up a very, very steep hill. And that hill is the double-cost for combat legendaries. See, with the base XP changes, plus the refactor of the multiplier for combat legendaries, instead of the nominal XP cost of 1000 as is written in the code, it costs me three thousand XP to get there. I am currently sitting on a pile of 1800 XP.

It's been said before that the order of spends don't matter, and that legendaries need to be end-game... but they do. Especially now that legendaries add to XP tax, which means that you can't really just do them last if you want. You have to do them first, and rely on either gear or your lucky stars to survive long enough for three thousand XP.

And the problem is that anyone who can only dedicate maybe 10 hours a week or less to the game cannot attain that goal in less than 3 years. Let's assume a person earns 20 XP a week through any combination. You still need 150 weeks in order to achieve your goal. 150 weeks split by four equals 37 and a half months.

That is roughly three years, one month, fifteen days to achieve the legendary. Understand, then, that that is a lot of time to dedicate to a single purchase in the game, and while I understand the design in making legendaries harder to attain, this has made them inconvenient unless you can somehow pull 40 or 60 XP a week. As a frame of reference, the top 20 earners only get around 25 to a maximum of 35 a week, tops.

It isn't a deal breaker, and it can be quite an exercise in cunning to use only a character's starter sheet to overcome challenges, but there comes a time where even that hits a plateau. It is hard to see other people's characters progressing and seeing yours encased in ice until that fateful day it dies or it vaults over the peak and finally makes the goal.

So, as a tl;dr, what I'm asking is to reconsider the refactoring of combat legendaries to something like 1.25 or 1.30 instead of 2.00 because this would make the goal much less of a sacrifice on the player."

rozzingit commented 5 years ago

@dreamsofgold This might best exist as its own feature request thread?

dreamsofgold commented 5 years ago

@dreamsofgold This might best exist as its own feature request thread?

Fair enough. I'll paste it into a feature request.