-
Notifications
You must be signed in to change notification settings - Fork 5
Backend High‐level Architecture
The backend architecture relies on a couple of key components to make the front# end happy. Below is a picture of how I envision this structure looking like. Boxes under other boxes are dependencies; so in this example, the world relies on the ingestion, and the database generation relies on the components and world; components only relies on the world.
Ingestion is responsible for transforming arbitrary data (JSON, TOML, etc.) into Rust friendly data containers.
The world is the collection of rust friendly data containers generated from ingestion, all under one umbrella.
Components are the meat and potatoes of VTT. This is how we will swiftly integrate multiple RPGs, query data quickly, and find commonality between different systems. Components rely on the world; if the world has new information not expressed by an existing component, we'll have to add that component. The idea is that we will create a repository of components to span multiple RPG systems over time.
Database generation converts the world data into entities with components and then stores this information in a database.
Queries are search parameters to abide by. They describe a collection of components as a query and request data that fits that query. They interact with the generated database to get information.
The client will ask the backend for something and the backend will create a query that asks the database; the queried data will then be returned to the frontend.