API Maker

The backend engine for the AI era

Performance

SQLite Store

API Maker keeps its own data in SQLite, inside itself. No MongoDB to install, and less memory on a small server.

API Maker keeps its own data in a store: accounts, schemas, code, settings, secrets and logs. The SQLite store runs inside API Maker, so there is no database to install and no memory to give to one. Every API, every page and every transaction works the same. MongoDB stays for several API Maker servers, and the data moves from one store to the other in one operation.

How it works

  1. Choose at install

    Launchpad and install.sh ask where API Maker keeps its data. Keep SQLite, the choice we recommend for one server.

  2. A file, inside API Maker

    The data is a file next to API Maker, and the logs have a file of their own, so a busy log never slows a save.

  3. Work as before

    Every page, every API and every feature works the same as on MongoDB. Your own databases are not touched.

  4. Grow when you need

    Add a second API Maker server and Launchpad moves the data to MongoDB in one operation, and checks the copy.

What you get

Nothing to install

No MongoDB container, no replica set, and no password to keep for it. The data is a file next to API Maker.

More room on small servers

The memory MongoDB took is free for your APIs and sandboxes: about 266 MB, even when it is almost empty.

The same answers

The store answers filters, updates, sorts and pipelines as MongoDB 8.0 does. It is tested against a real MongoDB, case by case.

The free shape of the data

Every document is kept whole. There is no table per field, and no migration of your data.

Transactions and indexes

Unique, TTL and partial indexes are kept and checked, and saves of many documents are all or nothing.

Commands of the store

api_maker_be store shows, copies, compares, backs up, checks and compacts the data, and reads and writes the layout of mongodump.

Move with a way back

Launchpad stops API Maker, copies the data, checks the copy and starts it again on the new store. If a step fails, API Maker starts again on the old one.

Upgrades keep a copy

A newer API Maker upgrades the format of the file at its start, after a copy of it. Going back restores the copy.

An example

One small server for a client

An agency runs each client on a server of 1 GB of memory. With the SQLite store, the server runs API Maker and Redis only, and the memory MongoDB took goes to the sandboxes. When one client grows and needs a second API Maker server behind a load balancer, Launchpad moves its data to MongoDB in one operation.

The store of a server, in its .env file.env
# SQLite : a file. A relative path is relative to the folder of API Maker.am__dataStore=sqlite:data/api_maker.db# Or MongoDB : a replica set, the database in the path.am__dataStore=mongodb://user:password@db-host:27017/api_maker?replicaSet=rs0

An installation made before keeps MongoDB, and works as it did.

Good to know

  • SQLite is for one API Maker server. Several API Maker servers, a load balancer or automatic failover need MongoDB.
  • A few pipeline stages and index kinds run only on MongoDB, such as $graphLookup, $vectorSearch and text indexes. API Maker's own pages never use them.
  • This is API Maker's own data. Your databases, the instances, stay where they are.

Questions

Do I still need MongoDB?

Not for one API Maker server. You need it for several API Maker servers, for API Maker's data on a server of its own or on Atlas, or for automatic failover.

Does my installation of today change?

No. It keeps MongoDB and works as it did. Launchpad, or install.sh with --store=embedded, moves its data to SQLite when you choose.

Are my own tables in it?

No. The store holds API Maker's own data: accounts, schemas, code, settings, secrets and logs. Your databases stay where they are.

How do I back it up?

api_maker_be store backup copies the file while API Maker runs and gives its SHA-256. Launchpad keeps a copy before each upgrade too.