Skip to Content
Quickstart

Quickstart

Diom is composed of a set of well integrated infrastructure primitives for backend and data engineers. For more information on each component, please refer to their respective documentation section.

The focus of this page is to help you get started with using the Diom API.

Components

The main concept you need to know when using Diom is component, which is how we call the types of infrastructure primitives in Diom such as cache, kv-store, rate-limiting, and stream.

All components support having multiple entities under them, each addressed with its own key. For example the cache component may have multiple items, the rate-limiter may have multiple different rate-limiters, and the queue component may have many different queues; each with their own key identifying the specific resource.

Diom also supports namespaces, which is a way of having different configurations (such as persistence) for a group of keys within the same component. So you can, for example, have one cache store with a maximum size of 50 GB that is persisted to disk, and a different cache store with a maximum size of 1 GB that is ephemeral. If not set explicitly, the default namespace is used.

Using the SDKs

You can install the SDKs as follows:

npm install diom // Or yarn add diom

Example usage (setting a KV key):

import { Diom } from "diom"; const diom = new Diom("AUTH_TOKEN", { serverUrl: "https://your-server.example.com" }); const app = await diom.kv.set("key", "value");

Please refer to each component’s documentation for more information on how to use each one.

Trying it out

To try Diom out either run it locally by following the instructions in the self-hosting section, or try the hosted Diom playground .

Self-hosting

As mentioned above, this page is focused on using Diom, for information on running it, please refer to the self-hosting section of the docs.

Closing words

That’s really all there is to it. All you need is to get an API key, install an SDK, and you can start using Diom!

Last updated on