Architecture
This page is meant to give new administrators an understanding of the components of a Liteset deployment.
Liteset is a drop-in async replacement for Apache Superset 6.0.0. The high-level component diagram below applies to both — only the web-server process changes (Litestar/Uvicorn instead of Flask/Gunicorn).
Components
A Liteset installation is made up of these components:
- The Liteset application itself (Litestar/ASGI on Uvicorn)
- A metadata database (schema inherited 1:1 from Apache Superset 6.0.0)
- A caching layer (optional, but necessary for some features)
- A worker & beat (Celery, optional but necessary for some features)
Optional components and associated features
The optional components above are necessary to enable these features:
If you install with Kubernetes or Docker Compose, all of these components will be created.
However, installing from PyPI only creates the application itself. Users installing from PyPI will need to configure a caching layer, worker, and beat on their own if they wish to enable the above features. Configuration of those components for a PyPI install is not currently covered in this documentation.
Here are further details on each component.
The Liteset Application
This is the core application. Liteset operates like this:
- A user visits a chart or dashboard
- That triggers a SQL query to the data warehouse holding the underlying dataset
- The resulting data is served up in a data visualization
- The Liteset application is comprised of the Python (Litestar/ASGI) backend application (server) running under Uvicorn, an API layer, and the React frontend (built via Webpack) plus static assets needed for the application to work
Metadata Database
This is where chart and dashboard definitions, user information, logs, etc. are stored. Liteset is tested to work with PostgreSQL and MySQL databases as the metadata database (not to be confused with a data source like your data warehouse, which could be a much greater variety of options like Snowflake, Redshift, etc.).
Some installation methods like our Quickstart and PyPI come configured by default to use a SQLite on-disk database. And in a Docker Compose installation, the data would be stored in a PostgreSQL container volume. Neither of these cases are recommended for production instances of Liteset.
For production, a properly-configured, managed, standalone database is recommended. No matter what database you use, you should plan to back it up regularly.
Caching Layer
The caching layer serves two main functions:
- Store the results of queries to your data warehouse so that when a chart is loaded twice, it pulls from the cache the second time, speeding up the application and reducing load on your data warehouse.
- Act as a message broker for the worker, enabling the Alerts & Reports, async queries, and thumbnail caching features.
Most people use Redis for their cache, but Liteset supports other options too. See the cache docs for more.
Worker and Beat
This is one or more workers who execute tasks like run async queries or take snapshots of reports and send emails, and a "beat" that acts as the scheduler and tells workers when to perform their tasks. Most installations use Celery for these components.
Other components
Other components can be incorporated into Liteset. The best place to learn about additional configurations is the Configuration page. For instance, you could set up a load balancer or reverse proxy to implement HTTPS in front of your Liteset application, or specify a Mapbox URL to enable geospatial charts, etc.
Liteset won't even start without certain configuration settings established, so it's essential to review that page.