GiocciPlatform is a computational resource permeating wide-area distributed system towards the B5G era.
This repository contains the GiocciPlatform, which enables distributed code execution across wide-area networks. The platform consists of three main components and an integration test suite:
- Giocci - Client library for sending modules and executing functions on remote engines
- GiocciRelay - Relay component that manages client/engine registration and routes requests
- GiocciEngine - Execution engine that loads modules and executes functions
- GiocciIntegrationTest - Integration test suite that verifies end-to-end functionality across all components
All components communicate over Zenoh, a pub/sub/query protocol for distributed systems.
An Elixir library that allows applications to:
- Register with a relay
- Save Elixir modules to remote engines
- Execute functions synchronously or asynchronously
Installation and usage: See apps/giocci/README.md
Hex package: giocci
A relay service that:
- Manages client and engine registrations
- Stores and distributes modules to engines
- Routes execution requests between clients and engines
Deployment guide: See apps/giocci_relay/README.md
An execution engine that:
- Receives and loads modules dynamically
- Executes functions on behalf of clients
- Returns results synchronously or asynchronously
Deployment guide: See apps/giocci_engine/README.md
An integration test suite that:
- Verifies end-to-end functionality across all components
- Tests client registration, module distribution, and remote execution
- Validates error handling when components are unavailable
- Includes both synchronous and asynchronous execution scenarios
Test guide: See apps/giocci_integration_test/README.md
All components require:
- Zenoh daemon (zenohd) running and accessible
-
Deploy GiocciRelay: Follow apps/giocci_relay/README.md
-
Deploy GiocciEngine: Follow apps/giocci_engine/README.md
-
Try it out: Follow the "Running with Docker" section in apps/giocci/README.md to test the platform
-
Use in your application: Once you're familiar with the platform, integrate Giocci into your Elixir application. See the Installation and Usage sections in the Giocci README
- Client:
apps/giocci - Relay:
apps/giocci_relay - Engine:
apps/giocci_engine - Transport: Zenohex (Zenoh) session
This platform communicates over Zenohex (Zenoh) using Query/Reply and Pub/Sub patterns.
- Client registration:
giocci/register/client/{relay_name} - Engine registration:
giocci/register/engine/{relay_name} - Save module (Client -> Relay):
giocci/save_module/client/{relay_name} - Distribute module (Relay -> Engine):
giocci/save_module/relay/{engine_name} - Engine inquiry:
giocci/inquiry_engine/client/{relay_name} - Sync exec request:
giocci/exec_func/client/{engine_name} - Async exec request (Engine subscribes):
giocci/exec_func_async/client/{engine_name} - Async exec result (Client subscribes):
giocci/exec_func_async/engine/{client_name} - If
key_prefixis set, it is prepended (e.g.,prefix/giocci/...).
sequenceDiagram
participant Client
participant Relay
participant Engine
Client->>Relay: Query giocci/register/client/{relay}
Relay->>Relay: register client
Relay->>Client: Reply :ok
sequenceDiagram
participant Client
participant Relay
participant Engine
Engine->>Relay: Query giocci/register/engine/{relay}
Relay->>Relay: fetch existing modules from ModuleStore
Relay->>Engine: Query giocci/save_module/relay/{engine}
Engine->>Engine: :code.load_binary
Engine->>Relay: Reply :ok
Relay->>Engine: Reply :ok (registration complete)
sequenceDiagram
participant Client
participant Relay
participant Engine
Client->>Relay: Query giocci/save_module/client/{relay}
Relay->>Relay: validate client + ModuleStore.put
Relay->>Engine: Query giocci/save_module/relay/{engine}
Engine->>Engine: :code.load_binary
Engine->>Relay: Reply :ok
Relay->>Client: Reply :ok
sequenceDiagram
participant Client
participant Relay
participant Engine
Client->>Relay: Query giocci/inquiry_engine/client/{relay}
Relay->>Relay: select engine
Relay->>Client: Reply {engine_name}
Client->>Engine: Query giocci/exec_func/client/{engine}
Engine->>Engine: validate module + exec
Engine->>Client: Reply result
sequenceDiagram
participant Client
participant Relay
participant Engine
Client->>Relay: Query giocci/inquiry_engine/client/{relay}
Relay->>Relay: select engine
Relay->>Client: Reply {engine_name}
Client->>Engine: Put giocci/exec_func_async/client/{engine}
Engine->>Engine: exec and build result
Engine->>Client: Put giocci/exec_func_async/engine/{client}
Client->>Client: send {:giocci, result}
- Client <-> Relay uses Query/Reply; Engine uses Queryable for sync and Subscriber/Publisher for async.
- All communication is via Zenohex key space;
key_prefixmay be prepended. - Engine selection is currently first-registered in
GiocciRelay.EngineRegistrar.select_engine/0.
See FOR_DEVELOPERS.md for development instructions, testing, and release procedures.