o
odin.langpkg.dev
packages / library / odin-kvpubsub

odin-kvpubsub

cde1aedlibrary

No description provided.

MIT · updated 9 months ago

License: MIT

Odin PubSub & KVStore Example

This project demonstrates a simple PubSub system and a Key-Value Store implemented in Odin. The main.odin program shows how to use both together, including multi-threaded message delivery and safe memory management.

Structure

  • main.odin: Example usage, PubSub and KVStore implementation

Features

  • Simple in-memory key-value store
  • Publish/subscribe system with multiple subscribers per topic
  • Threaded message delivery to subscribers
  • Demonstrates safe memory management for dynamic allocations

Requirements

Running

Clone this repo and run:

odin run .

You should see output similar to:

Sub1 got: Welcome to dayvster.com
Sub2 got: Welcome to dayvster.com
Sub3 got: Welcome to dayvster.com
Sub1 got: Here's another message after 2 seconds
Sub2 got: Here's another message after 2 seconds
Sub3 got: Here's another message after 2 seconds
Last in kvstore: Here's another message after 2 seconds

License

MIT