Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- **llmath** - Math primitives: vectors, matrices, quaternions, bounding boxes. Also includes meshoptimizer

**Data/IO layer:**
- **aldb** - SQLite files (`ALDatabase`): each file's writes are jobs a thread of its own commits together, each in a savepoint, so a job that fails is dropped alone and a failure that may pass is tried again; a profile by what losing the last writes would cost (Durable, Journal, Regenerable), tables made by migrations on `user_version`, a check after a crash that moves a damaged file aside and salvages it, and reads on a pool of read-only connections. `ALDbConnection` caches statements and reads a file from someone else with SQLite's defensive settings and limits. Depends on llcommon
- **llfilesystem** - Virtual filesystem and asset cache
- **llxml** - XML parsing utilities (depends on llfilesystem)
- **llimage** - Image decoding/encoding (JPEG, PNG, TGA, J2C via OpenJPEG or KDU)
Expand Down
1 change: 1 addition & 0 deletions indra/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ if(AL_BUILD_TESTS)
message(FATAL_ERROR "AL_REQUIRE_LSCRIPT: LL's LSL compiler and its tests are ${lscript_status}")
endif()
endif()
add_subdirectory(aldb)
add_subdirectory(alrender)
add_subdirectory(llaudio)
add_subdirectory(llappearance)
Expand Down
35 changes: 35 additions & 0 deletions indra/aldb/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# -*- cmake -*-

# SQLite database files, for what the viewer keeps: settings first, then the
# cache's index and the chat logs. One writer thread a file, whose jobs are
# written in batches, each in a savepoint of its own; a pool of readers;
# migrations, with a copy kept before each; backups; and a damaged file moved
# aside and salvaged with SQLite's recover API.

set(aldb_SOURCES aldatabase.cpp aldbconnection.cpp aldbrecovery.cpp aldbwriter.cpp)

set(aldb_HEADERS aldatabase.h aldbconnection.h aldbrecovery.h aldbwriter.h)

add_library(aldb STATIC)
target_sources(aldb PRIVATE ${aldb_SOURCES} PUBLIC FILE_SET HEADERS FILES ${aldb_HEADERS})

target_link_libraries(aldb PRIVATE al::flags PUBLIC llcommon ll::sqlite3)

target_precompile_headers(aldb REUSE_FROM llprecompiled)

if(AL_BUILD_TESTS)
# A VFS over the platform's that fails or holds writes, or offers no shared
# memory, on request: for the tests of what the writer does when the disk
# does.
add_library(aldb_test_support OBJECT tests/aldbfaultvfs.cpp)
target_link_libraries(aldb_test_support PRIVATE al::flags al_test_support aldb)
set_target_properties(aldb_test_support PROPERTIES FOLDER "Tests/aldb")

al_add_test_binary(
aldb_tests
PROJECT aldb
SOURCES tests/aldatabase_test.cpp tests/aldbconnection_test.cpp tests/aldbrecovery_test.cpp
LIBRARIES aldb
SUPPORT aldb_test_support llcommon_test_checks
)
endif()
Loading
Loading