Skip to content

Latest commit

 

History

History

README.md

OOO Samples

This directory contains example code demonstrating various features of the ooo library.

Core Samples

Sample Description
basic_server Minimal server setup
static_routes_filters_audit Static mode, filters, and API key authentication
storage_api Direct storage read/write operations
io_operations Typed I/O helpers (Get, Set, Push, GetList)
websocket_subscribe_list Real-time subscription to list paths
websocket_subscribe_single Real-time subscription to single items
remote_io_operations Remote HTTP operations with retry support
custom_endpoints Custom HTTP endpoints with typed schemas for UI

Advanced Features

Sample Description Requires
persistent_storage_ko Persistent storage with LevelDB go get github.com/benitogf/ko
jwt_auth JWT authentication go get github.com/benitogf/auth github.com/benitogf/ko
limit_filter Capped collections with auto-cleanup (none)
limit_filter_with_validation LimitFilter with strict schema validation (none)

Ecosystem Integration Samples

These samples demonstrate integration with other packages in the ecosystem.

Sample Description Requires
custom_endpoints_nopog Custom endpoints with PostgreSQL storage go get github.com/benitogf/nopog
pivot_synchronization Multi-instance synchronization go get github.com/benitogf/pivot
proxy Proxy routes to remote ooo servers (none)

Running Samples

Each sample is a standalone Go program. To run a sample:

cd samples/basic_server
go run main.go

For ecosystem samples, install dependencies first:

# For persistent storage
go get github.com/benitogf/ko

# For JWT auth
go get github.com/benitogf/auth github.com/benitogf/ko

Related Projects

  • ooo - Core server (in-memory state with WebSocket/REST)
  • ko - Persistent storage adapter (LevelDB)
  • ooo-client - JavaScript client
  • auth - JWT authentication middleware
  • mono - Full-stack boilerplate (Go + React)
  • nopog - PostgreSQL adapter for large-scale storage
  • pivot - Multi-instance synchronization