sop

Scalable Objects Persistence


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

SOP Go Examples

This directory contains example applications demonstrating various features of Scalable Objects Persistence (SOP) in Go.

🌍 Interoperability & Polyglot Usage

SOP is designed to be a polyglot database. To ensure data written in Go can be read by Python, C#, Java, or Rust (and vice versa), you should use the jsondb package. This provides symmetry across all language bindings.

1. Basic Interop (interop_jsondb)

Demonstrates how to store Go structs so they are automatically serialized to the “Universal” JSON format.

2. Secondary Indexes (interop_secondary_indexes)

Demonstrates “Schema-less” storage with composite secondary indexes.


🚀 High-Performance Native Go

For pure Go microservices where you don’t need to share data with other languages, you can use the native generic API.

3. Swarm Computing (swarm_standalone & swarm_clustered)

Demonstrates SOP’s ability to handle concurrent transactions from multiple threads (or processes) without external locks.


🏢 Multi-Tenancy & Configuration

4. Multi-Redis (multi_redis_url)

Demonstrates connecting to multiple Redis databases (e.g., DB 0 and DB 1) in the same application using the standard URL format.


▶️ Running the Examples

You can run all examples in sequence using the suite script in the root directory:

./run_go_suite.sh

Or run individual examples:

go run examples/interop_jsondb/main.go