Skip to content
Germán Luis Aracil Boned edited this page Apr 6, 2026 · 1 revision

Top Level System

A universal modular C microkernel that connects hot-loadable modules through path-based message routing. Everything is a path. Every interaction is a message.

The main program is named portal because it is the entry point — the door through which you access this universe. You don't interact with modules directly, you don't call languages directly, you don't touch devices directly. You go through the portal, and the portal routes you to wherever you need to be.

At a Glance

Metric Value
Lines of C ~28,000
Modules 50 hot-loadable .so
Scripting Languages 4 (Lua, Python, C, Pascal)
Interfaces 6 (CLI, HTTP, HTTPS, TCP, UDP, SSH)
Storage Backends 3 (File, SQLite, PostgreSQL)
License GPL-2.0

Architecture

         Top Level System
    ┌────────────────────────────────────┐
    │   portal (the entry point)         │
    │                                    │
    │   ┌──────────────────────────┐     │
    │   │      Core Engine         │     │
    │   │  ┌────────┐ ┌────────┐  │     │
    │   │  │ Router  │ │  ACL   │  │     │
    │   │  │ (FNV1a) │ │(labels)│  │     │
    │   │  └────────┘ └────────┘  │     │
    │   │  ┌────────┐ ┌────────┐  │     │
    │   │  │Events  │ │Storage │  │     │
    │   │  │Pub/Sub │ │ 3-way  │  │     │
    │   │  └────────┘ └────────┘  │     │
    │   └──────────────────────────┘     │
    │                                    │
    │   ┌──┐ ┌──┐ ┌──┐ ┌──┐ ┌──┐       │
    │   │M1│ │M2│ │M3│ │..│ │50│       │
    │   └──┘ └──┘ └──┘ └──┘ └──┘       │
    │   Hot-loadable modules (.so)       │
    └────────────────────────────────────┘

Core Provides

  • Path-based routing — O(1) FNV-1a hash table lookup with wildcard fallback
  • Universal message system — one portal_msg_t structure for all communication
  • Label-based ACL — groups on users, labels on paths, intersection = access
  • Hot-loadable modules — load, unload, reload at runtime with reference counting
  • Cross-platform event loop — embedded libev (epoll/kqueue/select)
  • Module crash isolation — setjmp/longjmp, the core survives module segfaults
  • Message tracing — trace_id, timestamp, hop count on every message
  • Pub/Sub events — ACL-controlled event subscriptions with pattern matching

Quick Start

./configure
make
./portal -c portal.conf

Connect via CLI:

./portal -r                    # local UNIX socket
ssh admin@localhost -p 2222    # remote SSH
curl http://localhost:8080/api/health  # HTTP API

Wiki Pages

Getting Started

Reference

Modules by Category

Developer

Links

Clone this wiki locally