Siesta is a Spark-based process mining and querying framework for event logs. It can run as:
- an API server (FastAPI), or
- module-oriented CLI jobs (Index, mining, query).
Core data assumptions:
trace_idis a stringactivityis a stringpositioninside a trace is 0-indexed integer (derived from timestamp)
Index: ingests batch/stream events and builds storage indexes/tables.mining: discovers constraints from stored traces.query: executes statistics/detection/exploration queries over indexed logs.
main.py: top-level entrypoint.siesta/core: framework bootstrapping (config, Spark, storage factory, interfaces).siesta/model: shared schemas and typed config/data models (system, storage, mining/event structures).siesta/modules: feature modules (Index,Mining,Querying).siesta/storage: storage implementations (currently S3/MinIO-based).config: sample runtime and module config JSON files.docker-compose.yml+siesta/dockerbase: API + Spark + MinIO + Kafka stack.tests: integration/unit tests and test utilities.
Requirements are split per submodule (**/requirements.txt).
Install all framework dependencies:
python3 siesta/install_dependencies.pyInstall test dependencies:
python3 tests/install_dependencies.pyDefault config (from siesta/model/SystemModel/DEFAULT_SYSTEM_CONFIG):
python3 main.pySpecific system config:
python3 main.py --config config/siesta.config.jsonAPI routes are auto-registered from modules and exposed as:
POST /indexing/runPOST /mining/runPOST /querying/run
General pattern:
python3 main.py --config <system_config.json> <module> <module_args>Examples:
# Index (batch/stream setup)
python3 main.py --config config/siesta.config.json Index --index_config config/Index.config.json
# Mining
python3 main.py --config config/siesta.config.json mining --mining_config config/mining.config.json
# Querying
python3 main.py --config config/siesta.config.json query --query_config config/query.config.jsonconfig/siesta.config.json: local host-oriented system config.config/siesta.docker.config.json: container-network hostnames (minio,kafka,spark-master).config/Index.config.json: ingestion and field mappings.config/mining.config.json: mining categories, thresholds, output path.config/query.config.json: method and query payload.
Start API and dependencies:
docker compose up --build siesta-apiUse Docker-aware config explicitly (service-to-service hostnames):
SIESTA_CONFIG=/workspace/config/siesta.docker.config.json docker compose up --build siesta-apiThis starts:
siesta-apispark-master,spark-worker,spark-worker2miniokafka,zookeeper
siesta/dockerbase contains image definitions and entrypoints used by compose:
API/: API container image and startup script.Spark/: Spark image and logging config.Kafka/: Kafka image and startup script.
- Create
siesta/modules/<YourModule>/main.py. - Implement a class that extends
SiestaModule:- set
nameandversion - implement
startup() - implement
cli_run(args, **kwargs) - optionally implement
register_routes()for API endpoints
- set
- Add module-specific dependencies in
siesta/modules/<YourModule>/requirements.txt.
Module discovery is automatic from siesta.modules.*.main.
- Implement a new class extending
StorageManager(seesiesta/core/interfaces.py). - Add it under
siesta/storage/<Backend>/. - Register it in
StorageManagerFactory._registry(insiesta/core/storageFactory.py). - Set
storage_typein system/module config to your backend key.
- Run Index on a log.
- Run mining/query on the same
log_nameandstorage_namespace. - Check outputs under
output/(and persisted data in configured storage).