Glossary
Each term Luna uses in its code, CLI and Console, in one line, with a link to the page that covers it.
Each term below has one meaning across the docs, the CLI, the SDK and the Console. Follow a term’s link for the page that explains it in full.
Accounts and apps
| Term | Meaning |
|---|---|
| Account | You, as you sign in to Luna. An account can belong to up to 20 organisations. |
| Organisation | A group of members that holds projects, roles, billing and the audit log. |
| Project | One app, with its environments. |
| Environment | One running copy of a project, with its own URL, code, lunas, data, keys and secrets. Every project starts with production. |
| Tenant | A space with data of its own inside an environment. Every environment has a default tenant, and platforms add more. |
| Deploy | Sending your app’s code to an environment with luna deploy. |
| Version | What one deploy made. Each call runs on one version, held in ctx.version. |
Lunas
| Term | Meaning |
|---|---|
| Luna type | A kind of luna, defined with defineLuna: its key, tables and handlers. |
| Luna | One instance of a luna type, named by its key, with its own data. |
| Key | The fields that name one luna of a type, such as { id: "groceries" }. |
| Handler | A function of a luna type that apps and other lunas call. |
| Query | A handler given query: true, which reads and never writes. Apps can subscribe to one. |
| Hook | Code that runs at a point in a luna’s life, such as onCreate or onWake. |
| Message | A one-way call sent with ctx.send. The sender does not wait, and Luna tries it again when it fails. |
Background work
| Term | Meaning |
|---|---|
| Schedule | A handler set to run later, at a set time or on a cron. |
| Durable run | A run of a durable handler, which carries on after a crash, a restart or a long wait. |
| Step | One part of a durable run, which runs once and keeps its result. |
Events and data
| Term | Meaning |
|---|---|
| Event | A declared fact a handler emits, kept with the handler’s writes for listeners. |
| Listener | A handler that runs in a luna for each event it listens to. |
| Index | Rows gathered from many lunas’ tables or events, defined with defineIndex. |
| Stream | A log of entries in a luna, read by offset and kept for as long as you choose. |
| Rollup | Counts, sums and other totals of a stream, kept per hour or day. |
Realtime
| Term | Meaning |
|---|---|
| Connection | A WebSocket held open between an app and a luna. |
| Push | A typed message a luna sends to its connected apps. |
Files and code
| Term | Meaning |
|---|---|
| Bucket | A named place for a luna’s files, declared on its luna type. |
| Isolate | A separate place to run JavaScript you did not write, with its own memory, CPU and time limits. |
| Sandbox | A Linux machine of a luna’s own, for commands and processes. |
Keys and tokens
| Term | Meaning |
|---|---|
| Publishable key | A key starting pk_ that reaches the public luna types of one environment. It is safe to put in an app. |
| Secret token | A token starting sk_ that reaches every luna type of one environment. Keep it on a server. |
| API token | A token starting lt_ for the control API, limited to the scopes you give it. |
| Account key | A key starting la_ that can do everything your account can. luna login makes one. |