Playground
Play around with your own Diom instance
What is this?
Diom is the backend components platform for building robust services. It's a set of well integrated infrastructure primitives for backend and data engineers such as caching, kv-store, rate-limiting, idempotency, queue, and stream.
This playground lets you try these primitives straight from your browser in the simulated terminal above, or directly using the native CLI and SDKs.
The playground supports all of the Diom components, so you can use any of the CLI code examples from the docs.
For example, you can use the key-value component:
# Set key my-key
diom kv set my-key "some value"
# Get the key
diom kv get my-key
# Fail if key already exists
diom kv set my-key "new value" '{"behavior": "insert"}'Or the rate-limit component:
diom rate-limit limit '{
"key": "user:42:api",
"config": {
"capacity": 10,
"refill_amount": 0,
"refill_interval_ms": 1000
}
}'Using the SDKs
This playground is backed by a real Diom server which you can use with the CLI and SDKs directly from your machine. Not only through the simulated browser environment.
You first need to install your SDK of choice by following the instructions in the quickstart docs. Once done, you can copy your authentication token and server URL from above, and use the SDK like you would use any other Diom server.
import { Diom } from "diom";
const client = new Diom("AUTH_TOKEN");
await client.kv.set(
"my-key",
new Uint8Array([10, 20, 30, 40]),
);Running your own server
Once you're done playing with the playground you can run your own Diom instance locally! Here is an example using Docker:
export DIOM_ADMIN_TOKEN="zFPLw9x5T3Kpjyc9ODP8is"
docker run -p 8624:8624 \
--ulimit memlock=-1 \
--mount type=volume,src=diom-storage,dst=/storage \
-e DIOM_ADMIN_TOKEN=${DIOM_ADMIN_TOKEN} \
svix/diomPlease refer to the running Diom docs for more examples and documentation.