| Did you know ... | Search Documentation: |
| Packs (add-ons) for SWI-Prolog |
| Title: | AsaDB local SQL database engine |
|---|---|
| Rating: | Not rated. Create the first rating! |
| Latest version: | 1.5.0 |
| SHA1 sum: | de0cd089cce3e5c5e308f6f3a5ab629f9ffd758e |
| Author: | Kocoy Group https://github.com/kocoygroup-id |
| Maintainer: | Kocoy Group https://github.com/kocoygroup-id |
| Packager: | Kocoy Group https://github.com/kocoygroup-id |
| Home page: | https://github.com/kocoygroup-id/AsaDB |
| Download URL: | https://github.com/kocoygroup-id/AsaDB.git |
| Requires: | prolog>=9.1.18 |
| Provides: | asadb_sql |
No reviews. Create the first review!.
| Version | SHA1 | #Downloads | URL |
|---|---|---|---|
| 1.5.0 | b2e4d3ad553f954fc4a28293b1c673b4a158b2f3 | 3 | https://github.com/kocoygroup-id/AsaDB.git |
| 8729982aa82d3a735278a9ef2f81f4134653ed6b | 1 | https://github.com/kocoygroup-id/AsaDB.git | |
| 0ad72ebcef9ed6581c734a38d77df20c1f2e7a5e | 1 | https://github.com/kocoygroup-id/AsaDB.git | |
| de0cd089cce3e5c5e308f6f3a5ab629f9ffd758e | 1 | https://github.com/kocoygroup-id/AsaDB.git | |
| 7eef149b327619f7f2b282df1258ee8dacf2dc49 | 1 | https://github.com/kocoygroup-id/AsaDB.git | |
| ae117a465afdddc10fc4c622ced6955777f538c1 | 3 | https://github.com/kocoygroup-id/AsaDB.git | |
| d88b7e92dd41158d6173e3fa8242a77e80412566 | 1 | https://github.com/kocoygroup-id/AsaDB.git |
  
AsaDB is a local-first SQL database runtime powered by SWI-Prolog. It ships with AsAPanel, a login-first web workspace for creating databases, running SQL, importing/exporting data, and inspecting tables without a cloud dependency.
Current release: v1.5.0 Stable. The publication artifact
AsaDB-1.5.0-linux-x86_64.tar.Z is a complete open-source distribution
validated for Linux x86_64. It does not bundle SWI-Prolog; see
RELEASE.md and COMPATIBILITY.md.
| Version | Status | Main focus |
|---|---|---|
| 1.5.0 | Current Stable | Local TVCC reader snapshots, view-aware interchange, bounded ordering, and release-integrity checks. |
| 1.4.0 | Superseded Stable | Backend-owned, integrity-checked `.asb` backup and restore. |
| 1.3.1 | Superseded Release Candidate | SQL completion/coloring and Windows source-launcher delivery. |
| 1.3.0 | Historical Stable | Reservoir, paged results, and indexed equality joins. |
The table is newest-first. Detailed release scope, validation, and limits are kept in RELEASE_NOTES.md; only 1.5.0 describes the current supported release contract.
AsaDB has a first-class asadb pack manifest and an embeddable
library(asadb) API. One Pack, Two Modes contains the complete CLI, panel
backend, frontend assets, engine, Flask Server source, offline Python
wheelhouse, launchers, examples, documentation, and tests. After publication
to the SWI-Prolog pack server, the normal cross-platform commands are:
swipl pack install asadb swipl pack install --upgrade asadb swipl pack info asadb swipl pack remove asadb
Before publication, an extracted release or checkout includes the portable
repository helper: `swipl -q -s tools/asadb_pack.pl -- install`. It follows
the official repository and retains the canonical asadb pack name on both
Linux and Windows. `swipl install asadb` is not a stock SWI-Prolog command;
use the documented `swipl pack ...` form instead. See
[docs/swi-prolog-pack.md](docs/swi-prolog-pack.md) for repository, stable,
upgrade, remove, API, and publishing commands.
The command semantics are based on SWI-Prolog's official
library(prolog_pack) guide
and its pack application mechanism.
After installation, start AsaDB on Linux or Windows with exactly one command:
swipl asadb
The first run builds the bundled offline Python gateway in a per-user location,
asks for the first administrator once, registers data.asa, then opens
`http://127.0.0.1:2026/login`. Login always comes before selecting Local
Workspace (loopback only) or Server Workspace. Flask only hosts and protects
the web/API boundary: the SWI-Prolog backend remains the sole SQL parser,
executor, transaction manager, and `.asa` storage engine. No `pip install` or
manual virtual environment is required.
Use `swipl asadb --help` for the explicit local CLI, maintenance, or remote commands. `swipl asadb` requires SWI-Prolog 9.1.18 or newer; this is the version where pack applications became available. See [the pack guide](docs/swi-prolog-pack.md) for offline/repository installation and upgrade/removal commands.
Server Mode turns one local AsaDB installation into an authenticated web workspace without adding a second SQL engine. The bundled Python component handles HTTP, login sessions, role checks, registered physical database files, and operational endpoints; it starts and proxies the official Prolog web backend. Prolog remains the authority for SQL parsing, query execution, transactions, TVCC, Reservoir jobs, backup/restore, import/export, and `.asa` storage.
Start the normal local portal:
swipl asadb
On first use it asks for an administrator and opens `http://127.0.0.1:2026/login`. Sign in, choose Local Workspace or Server Workspace, then use Admin for users, database registration, jobs, health, and safe mutable settings. Useful operational commands are:
swipl asadb doctor --json swipl asadb start --host 127.0.0.1 --port 2026 swipl asadb server --host 127.0.0.1 --port 2026
start performs first-run setup when necessary; server is for an already
initialized service. Keep the service bound to loopback and place TLS/public
exposure behind a reverse proxy. Never expose the raw panel or its private
Prolog backend directly to an untrusted network.
Current server mode is one control-plane process around local Prolog-backed `.asa` files, with one writer per physical file and asynchronous snapshot-based replication where enabled. See SiriDB's database administration overview and server/pool/replica model for the architectural references; see AsaDB's server feature matrix and boundaries for the implemented scope.
AsaDB is developed in the open under GNU GPL v3.0 only. Bug reports, test cases, documentation, storage-engine review, and code contributions are welcome. Start with CONTRIBUTING.md and the project governance guide.
127.0.0.1 and auto-selects a free port.v1.5.0 keeps the 1.4.0 backend-owned backup design and adds local snapshot reads, view-aware interchange, and faster bounded ordering:
Use Export → AsaDB Backup while the local backend is online. The browser downloads a complete `.asb` file directly from the backend; it is suitable for moving or retaining a database backup, unlike a partial browser-side export. Importing an `.asb` verifies its format, payload and integrity manifest before the restore transaction can commit. Keep the resulting file with the same care as the database because it contains the database's logical contents.
For a consistent snapshot, the backend serializes the database while it scans the record store. On a busy production panel, schedule large backups so normal write traffic can wait for the snapshot, and leave sufficient local temporary disk space for the generated artifact.
For selected-table exchange, choose MySQL, PostgreSQL, CSV, or XLSX in the same Export page. These are portable interchange artifacts rather than authenticated backups. See docs/interchange.md for format behavior, input limits, and regression commands.
Every 1.5.0 source package includes the SQL engine, page storage, B+Tree and
metadata layers, Reservoir bridge, AsAPanel modern and compatibility bundles,
ID/JP/EN assets, tests, build scripts, SWI-Prolog app/asadb.pl, Linux/POSIX
launchers, Windows batch launchers, operational guardian, and GPL notices. The
Linux and main-source archives are gzip-compressed tar streams under `.tar.Z`;
the Windows source-launcher is a ZIP with its own SHA-256 file.
The Windows ZIP is a source/runtime-launcher package, not a relabelled native executable: install SWI-Prolog first. The portable executable remains a separate Windows-native build target.
1.4.0 established the backend-produced `.asb` backup and verified restore path. The current 1.5.0 line preserves that production-backup contract while adding local reader snapshots, view-aware interchange, and bounded ordering. See the ordered comparison in RELEASE_NOTES.md.
v1.3.0 fixes the aliased JOIN path and makes the source release practical on Linux systems with minimal shells:
and zone z` now resolve m.No and
z.No correctly, including case-insensitive table and column identifiers.alias.column = alias.column conditions; complex predicates retain the
compatible nested-loop fallback.indexed_joins and nested_loop_joins counters. / zone z` case,
verifies the alias result, validates all 15,000 matches, and enforces a
bounded join execution time.dash; the same syntax is suitable for BusyBox sh used by minimalist
distributions such as 4MLinux.NodeList.forEach and Element.append),
so an older DOM cannot leave a static panel with dead buttons.The source distribution requires a feature-complete SWI-Prolog on PATH. 4MLinux does not ship a general package manager, so its SWI-Prolog runtime must be provided separately; this support is conditional until the included runtime and regression checks pass on the target machine. See INSTALL.md.
The v1.3.0 source tree includes src/bridge/reservoir.pl, a bounded and durable
adapter between AsAPanel and the SQL executor. It is not another database and
does not replace the page manager, buffer pool, transaction manager, or WAL.
It controls pressure at the JavaScript-to-Prolog boundary:
Historical changes and benchmark context are retained in RELEASE_NOTES.md and BENCHMARK_RESULTS.md. The v1.3.0 root causes, exact fixes, validation, and remaining optimizer limits are summarized in BUGFIX_REPORT.txt.
Stable core:
with COUNT`, SUM, AVG, MIN, MAX
Runtime limits are configured in asadb.conf. Keep each `.asa` catalog together
with its matching `.asa.store` directory when moving a database.
Verify and extract the publication files:
sha256sum -c AsaDB-1.5.0-linux-x86_64.tar.Z.sha256 tar -xzf AsaDB-1.5.0-linux-x86_64.tar.Z cd AsaDB-1.5.0-linux-x86_64 ./scripts/check_linux_runtime.sh swipl pack install . swipl asadb
On first run the command asks for administrator credentials, then opens the
login page at `http://127.0.0.1:2026/login`. After login, Server Workspace
uses the supervised Prolog backend by default; Local Workspace remains an
explicit authenticated switch. The `.tar.Z file is
gzip-compressed. swipl` is a separate runtime dependency.
Extract the release zip and run:
AsaDB.exe
Optional:
AsaDB.exe panel data\mydb.asa 8088 AsaDB.exe cli data\mydb.asa web\samples\feature-tour.sql
The panel URL is written to asadb.port.
Install SWI-Prolog and make sure swipl is on PATH.
swipl -q -s src\asadb_web.pl -- data.asa 8088
CLI:
swipl -q -s src\asadb.pl -- data.asa examples\demo.sql
Tests:
swipl -q -s tests\run_tests.pl swipl -q -s tests\reservoir_tests.pl swipl -q -s tests\join_15000_regression.pl swipl -q -s tests\interchange_regression.pl node tests\ui_regression.js
Storage benchmarks (10k, 50k, and 100k rows):
powershell -NoProfile -ExecutionPolicy Bypass -File tests\run_storage_benchmarks.ps1
Build Windows portable folder:
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\build_windows_exe.ps1
src/ bridge/reservoir.pl Durable bounded panel-to-engine job bridge asadb_core.pl SQL executor, planner, catalog, and storage orchestration asadb_sql_frontend.pl SQL lexer, parser, AST construction, and diagnostics asadb_prolog_jit.pl Bounded SQL-plan cache and safe Prolog VM filter specialization asadb_interchange.pl Backend MySQL/PostgreSQL/CSV/XLSX import and export asadb_page_manager.pl 4 KB slotted-page format asadb_pager.pl Disk page I/O kocoy.pl Native stream-batched cold page scans asadb_buffer_pool.pl Bounded page cache asadb_record_manager.pl Heap records and mutation recovery asadb_tvcc.pl Local immutable reader-generation coordinator asadb_btree.pl In-memory compatibility tree and persistent B+Tree asadb_config.pl Runtime storage configuration asadb_metadata.pl Atomic persistent database identity and runtime metadata asadb_web.pl Local HTTP API for AsAPanel asa_portable.pl Portable EXE entrypoint web/ index.html assets/app.js assets/style.css samples/ tests/ run_tests.pl reservoir_tests.pl join_15000_regression.pl interchange_regression.pl interchange_http_regression.sh interchange_stress.pl prolog_module_audit.sh ui_regression.js launcher_regression.sh release_package_regression.sh *.sql stress tests/ public_safety_archive_5500.sql scripts/ build_windows_exe.ps1 build_linux_release.sh build_source_release.sh check_linux_runtime.sh
AsAPanel binds to localhost only and protects API calls with a per-run local token cookie/header. It is meant for local development, not public hosting.
Please report security-sensitive findings through the private process in SECURITY.md, not through a public issue.
Contributions are accepted under GPL-3.0-only and require a Developer Certificate of Origin sign-off. The sign-off confirms that you have the right to submit the contribution; it does not transfer your copyright. See CONTRIBUTING.md for the complete workflow.
Good contribution areas include:
AsaDB source code and project-owned assets in this repository are licensed
under the GNU General Public License version 3 only (GPL-3.0-only). See
[LICENSE](LICENSE).
Distributing an AsaDB binary or a modified build requires making the complete corresponding source available under the same license. The license does not grant rights to present a modified build as an official AsaDB release. See TRADEMARKS.md, THIRD_PARTY_NOTICES.md, and LICENSE_HISTORY.md.
Pack contains 267 files holding a total of 48.0M bytes.