Skip to content

17neverends/messagein

Repository files navigation

Message-In Server

A simple yet powerful TCP server for message storage and processing with support for transactions, metrics, and fault tolerance.

Features

  • Data storage with support for multiple data types:
    • Strings
    • JSON
    • Lists
    • Integers
    • Boolean values
  • Transactional processing of commands:
    • SET
    • HSET
    • LSET
    • DEL
  • Performance and usage metrics
  • Fault tolerance through:
    • Operation logging
    • State snapshots
    • Crash recovery
  • Scalability via data sharding
  • Client authentication

Core Commands

Command Description
SET <key> <value> FROM <namespace> [TTL <duration>] Store a value
HSET <key> {json} FROM <namespace> [TTL <duration>] Store JSON
LSET <key> [list] FROM <namespace> [TTL <duration>] Store a list
GET <key> FROM <namespace> Retrieve a value
DEL <key> FROM <namespace> Delete a value

Architecture Components

Core Modules

  • TCP Server
    Handles incoming connections and commands
    Features: Connection pooling, request parsing, rate limiting

  • Queue Manager
    Manages queues/namespaces
    Features: Namespace isolation, priority queues, TTL enforcement

  • GRQ (Global Reliable Queue)
    Sharded data storage layer
    Features: Consistent hashing, data replication

  • Storage Shard
    Individual storage node with priority queue
    Features: atomic operations

  • Reliability
    Data durability mechanisms
    Components: Journaling, snapshotting, CRC checks

  • Transactions
    ACID-compliant operation support
    Features: Optimistic locking, rollback capabilities, isolation levels

Data Flow

flowchart LR
    A[TCP Client] --> B[TCP Server]
    B --> C[Queue Manager]
    C --> D[GRQ]
    D --> E[Storage Shard]
    C --> F[Reliability]
    C --> G[Transactions]
Loading

Project Launch

📦 Native Build

# Build the binary
go build -o bin/message-in.exe ./cmd

# Run the application
./bin/message-in start --config configs/config.yaml

🐳 Docker Deployment

# Build and start containers
docker compose up --build

# To run in detached mode:
docker compose up --build -d

About

Golang TCP server based resident Db for delayed message with API intergartion

Resources

License

Stars

Watchers

Forks

Packages

No packages published