In computer programming, persistence refers to data/state that survives beyond the current session/program termination. In MMOs, all kinds of data associated with character state is maintained by an engine's "persistence layer" allowing users to follow some kind of progression path from one session to another (whether that is advancing to new levels, collecting stuff or otherwise tracking some kind of goals or score). HeroEngine supports two different persistence layers, one on the client and one on the server.
- the Database (server)
- the Local Repository Cache (LRC)
HeroEngine's default datastore on the server is an Oracle database which is typically shared by multiple worlds (shards). The database layer is encapsulated in a single interface called Javelin which can be modified to utilize alternative database solutions. Technically, there are three major schemas involved in persistence of game data in the database.
- <WorldName>_SERVER_GOM - storing the server's Data Object Model (DOM)/Game Object Model (GOM)
- <WorldName>_CLIENT_GOM - storing the client Data Object Model (DOM)
- <WorldName>_REPOSITORY - storing all content placed in the Repository including files such as textures, models and animations
How and when changes are persisted to the database depends on the type of the change:
- modifications to the DOM (client/server) are persisted immediately, though they may be rolled back by the system should DOM Coordination fail
- modifications to the server GOM are persisted based on the Write Strategy of the field(s) dirtied. While "dirtyness" is on a per-field basis, persisted nodes write out all dirty fields at the same time.
- modifications to the client GOM are not persisted at all and consequently do not survive beyond the current session (see LRC for options to persist client data)
- modifications to the repository are persisted immediately and notification is sent out to connected clients that a new version exists