Having specific protobuf types for different game systems using the
same rule set (e.g. all the Chronicles of Darkness games) is untenable
because protobuf does not have inheritance or mixins.
Instead, we have one generic character sheet type, with a oneof field
for the game specifics. This will be used in conjunction with the
character's game system (stored in db) to render different stuff on
the character templates.
Without this, we'd wind up having duplicate templates, a lot more code
for handling specifics of each game system, and so on.
The primary benefit of this is to avoid Rocket's database integration,
which has become problematic in this codebase with the update to the
new async style. Because the async database API is actually
synchronous under the hood, this introduces some annoying lifetime
requirements that basically force us to use owned data everywhere.
The original pattern was to have a separate data layer that could
invoke queries from `self` (the db connection). By using a true async
database driver, we can get this back, because the lifetimes are once
again flexible instead of the ones forced by Rocket.
Rocket 0.5 is a major uprade, rewriting most of Rocket to be async.
Required many changes through the code, especially the database layer.
The new Rocket async database calls require Futures with 'static
lifetimes.
General:
- Move to stable rust.
- Most of codebase is now async.
- Rocket migrations (e.g. Cookies to CookieJar).
Database:
- Switched to owned data (&str -> String) for inserts because of the
'static lifetime requirement on Rocket's DB future.
- All database methods now asynchronous.
Pages:
- Changed various routes to async.
- Needed to add clone calls to some places because we need to use
owned data multiple times (registration).