sop

Scalable Objects Persistence


Project maintained by SharedCode Hosted on GitHub Pages — Theme by mattgraham

SOP Data Manager (HTTP Server & UI)

A powerful, web-based management suite for SOP B-Tree repositories. This tool transforms SOP from a library into a full-fledged SOP HTTP Server with a rich User Interface.

Installation

Download Binaries

You can download the latest pre-compiled binaries for macOS, Linux, and Windows from the Releases Page.

Build from Source

go build -o sop-manager ./tools/httpserver

Features

The Power of the SOP Data Manager: From Embedded to Enterprise

The SOP Data Manager is not just a simple admin tool; it is a demonstration of the SOP architecture’s flexibility. Because SOP is a library that turns your application into the database engine, this SOP HTTP Server is effectively a universal database server that can adapt to any scale.

1. Embedded & Single-Node

For local development, IoT devices, or single-user desktop applications, the SOP Data Manager acts as a standalone SOP HTTP Server.

2. Enterprise Swarm (Clustered)

In a large-scale enterprise environment, the SOP Data Manager shines as a stateless management node within your storage swarm.

Usage

Prerequisites

Environment Variables

User Guide

1. Managing Stores

The Data Manager provides a comprehensive interface for managing your B-Tree stores.

2. AI Copilot & Scripts

The built-in AI Copilot allows you to interact with your data using natural language and automate tasks using Scripts.

3. Advanced Queries (SQL Joins & Scripts as Views)

The AI Copilot supports complex queries that mimic SQL operations, even though SOP is a NoSQL Key-Value store. It achieves high performance by leveraging the underlying B-Tree structure.

4. SystemDB

The SystemDB is a special database that holds internal SOP metadata, including Registry information and Scripts.

Running

You can run the SOP HTTP Server in two ways: using command-line flags for a single database, or using a configuration file for multiple databases.

Option 1: Single Database (Quick Start)

From the root of the sop repository:

go run ./tools/httpserver -database /path/to/your/sop/data

Create a JSON configuration file (e.g., config.json) to define your environments:

{
  "port": 8080,
  "root_password": "optional_admin_password",
  "databases": [
    {
      "name": "Local Development",
      "path": "/tmp/sop_data",
      "mode": "standalone"
    },
    {
      "name": "Production Cluster",
      "path": "/mnt/data/prod",
      "mode": "clustered",
      "redis": "redis-prod:6379"
    }
  ]
}

Security Note: For production environments, it is recommended to set the root password using the SOP_ROOT_PASSWORD environment variable instead of storing it in the config file. The environment variable takes precedence over the config file setting.

export SOP_ROOT_PASSWORD="my_secure_password"
go run ./tools/httpserver -config config.json

Run the SOP HTTP Server with the config file:

go run ./tools/httpserver -config config.json

Administrative Features

Store Metadata Override

The Web UI allows administrators to perform advanced maintenance tasks, such as updating the Index Specification and/or CEL Expression of an existing store. These are structural changes that can affect data retrieval and sorting.

Important Note on Concurrency

If database(s) are configured in standalone mode, ensure that the http server is the only process/app running to manage the database(s). Alternatively, you can add its HTTP REST endpoint to your embedded/standalone app so it can continue its function and serve HTTP pages at the same time.

If clustered, no worries, as SOP takes care of Redis-based coordination with other apps and/or SOP HTTP Servers managing databases using SOP in clustered mode.

Accessing

Open your browser and navigate to: http://localhost:8080

Topology and Architecture

SOP is designed to break the traditional database monolith. Unlike conventional RDBMS where a central server process controls all data access, SOP is a library that turns your application cluster into the database engine itself.

Deployment Models

Understanding how to deploy SOP in the enterprise requires distinguishing between Standalone and Clustered modes.

1. Standalone Mode

In Standalone mode, the database is managed with the expectation that the SOP HTTP Server instance (or your application) is the sole manager of the data.

2. Clustered Mode

In Clustered mode, the database is designed to be managed by many SOP HTTP Server instances and application nodes simultaneously.

The “Masterless” Philosophy

The SOP Data Management Suite follows this philosophy:

Performance

SOP is designed for high performance. You can measure the performance on your own hardware using the included benchmark tool.

go run tools/benchmark/main.go --count 10000 --path /tmp/sop_bench

Typical results on a modern laptop (M1/M2/M3 Mac):

Demo & Tutorial

The SOP Data Manager includes a built-in Setup Wizard that can populate your database with a sample E-commerce dataset (Users, Products, Orders).

This dataset is perfect for exploring the AI Copilot capabilities:

  1. Natural Language Queries: “Show me all users from France”
  2. Joins: “Find orders for user ‘James Smith’”
  3. Scripts: Create reusable workflows for complex reporting.

Language Bindings & Downloads

New to SOP? Check out the Getting Started Guide for a step-by-step tutorial.

When you download a release from GitHub, you can choose between:

  1. Platform Bundles (Recommended): A single .zip file containing the sop-manager server AND all language bindings for your specific OS/Architecture.
    • sop-bundle-macos-arm64.zip (Apple Silicon)
    • sop-bundle-macos-amd64.zip (Intel Mac)
    • sop-bundle-linux-amd64.zip (Linux x64)
    • sop-bundle-linux-arm64.zip (Linux ARM64)
    • sop-bundle-windows-amd64.zip (Windows)

    Inside the Bundle:

    • sop-manager: The server executable.
    • libs/: The shared library (.dylib, .so, .dll) for your OS.
    • python/: Python .whl package.
    • java/: Java .jar library.
    • dotnet/: C# .nupkg package.
  2. Individual Artifacts: If you only need a specific language package, you can download them separately:
    • Python: sop-x.y.z-py3-none-any.whl
    • C#: Sop.x.y.z.nupkg
    • Java: sop-java-x.y.z.jar

Installation

1. Start the Server

Unzip your bundle and run the manager: ```bash ./sop-manager

Security & Deployment Modes

For details on how to configure the server for Internal (Open) vs Public (Secure) modes, including how to secure the REST API with Bearer tokens, please see SECURITY.md.