Skip to content

Latest commit

 

History

55 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SOFIA: Service-Oriented Federated Interoperability Architecture

SOFIA is a lightweight, Erlang-based framework designed for building scalable, fault-tolerant, and distributed service-oriented systems. Unlike traditional Service-Oriented Architecture (SOA), which relies on centralized Enterprise Service Buses (ESB) and heavy-weight orchestration engines (such as BPMN), SOFIA implements federated peer-to-peer interoperability directly at the actor level.

Core Features

  • Federated Service Registry (sofia_registry): Fully decentralized service registration and discovery using Erlang process groups (pg).
  • Stateful Circuit Breaker (sofia_breaker): Low-latency, Erlang Term Storage (ETS)-backed circuit breaker protecting distributed service calls from cascading failures.
  • Federated Configuration Sync (sofia_config): Decoupled, replicated configuration settings synchronized across nodes via lightweight cluster RPCs.
  • Protocol Gateway (sofia_gateway): Dynamic protocol bridging translating external sensor/web requests (e.g. JSON maps) into native message tuples.
  • QoS-Aware & Content-Based Router (sofia_router): Dynamic, sidecar-less routing that ranks candidate service endpoints lexicographically by stateful circuit breaker states (sofia_breaker), process mailbox queue depths, and historical invocation latencies recorded in Mnesia telemetry spans (sofia_tracer), while supporting caller-defined content-based routing rules.
  • Data Transformer (sofia_transformer): Schema mapping and normalization of message parameters directly in client context.
  • Saga Orchestrator (sofia_saga): Fault-tolerant distributed transaction coordinator executing rollbacks in reverse order on failure.
  • Zero Bloat: No centralized broker, no complex workflow orchestration engines, and no SOAP/XML overhead.

Self-Describing Federated Services

SOFIA supports self-describing services, offering a decentralized alternative to traditional Interface Definition Languages (IDLs) like OpenAPI/Swagger or gRPC protocol buffers. Service providers register metadata contracts detailing schemas directly with sofia_registry. Client stubs retrieve these contracts and validate request payloads locally prior to invocation:

sequenceDiagram
    participant Developer as Service Provider
    participant Registry as sofia_registry
    participant Client as Service Consumer
    
    Developer->>Registry: register_service(calc_service, Pid, ContractMap)
    Note over Registry: Stores Contract in State
    Client->>Registry: get_contract(calc_service)
    Registry-->>Client: returns ContractMap
    Client->>Client: Validate request schema locally
    Client->>Developer: Safe Invocation
Loading

Building and Compiling

To compile the SOFIA application, ensure you have Erlang/OTP 27 and rebar3 installed. Then, run the following command from the root directory:

rebar3 compile

Running Unit Tests

SOFIA utilizes EUnit to validate its core modules. Run the test suite using:

rebar3 eunit

Reproducing Evaluation Results

SOFIA includes a complete quantitative benchmark suite and automated Makefile in usecases/ to evaluate its performance, scalability, and transaction latency against State-of-the-Art (SOTA) middleware layers (Redis, Consul, and HTTP collectors).

For a complete setup guide and convenience runners, see usecases/README.md.

Benchmark Execution Options

  1. Option A: Interactive Erlang Shell

    rebar3 shell
    1> sofia_bench:run().
  2. Option B: Master Reproducibility Suite

    ./usecases/run_reproducibility_suite.sh
  3. Option C: Bare-Metal SOTA Benchmarks (Redis & Consul)

    ./usecases/run_sota_benchmarks.sh
  4. Option D: Convenience Makefile (usecases/Makefile)

    cd usecases
    make check    # Runs unit tests, benchmarks, cluster evaluation, and compiles paper PDF
    make test     # Runs EUnit test suite
    make bench    # Runs subsystem micro-benchmarks
    make cluster  # Runs multi-node clustered deployment benchmarks
    make paper    # Compiles IEEE TSC manuscript PDF

Guides and Documentation

For complete walkthroughs and domain integrations, see:

About

Service-Oriented Federated Interoperability Architecture

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages