SANDBOX – Prometheus-X Components & Services

SANDBOX

The sandbox is no more maintained, please see this project to test some connector exchanges

The sandbox is a docker compose file whichs allows to test the interaction with multiple connectors locally.

Architecture

The sandbox environment consists of several interconnected services:

%%{init: {'theme': 'base', 'themeVariables': { 'lineColor': '#666666' }}}%%
graph LR
    subgraph sandbox[Sandbox Network]
        direction LR
        subgraph shared[Services]
            mongo["mongodb-sandbox<br/>(27020:27017)"]
            catalog["catalog<br/>(3002:8082)"]
            contract["contract<br/>(3001:8081)"]
            consent["consent<br/>(3003:8083)"]
        end
        
        subgraph pdcs[PDC Connectors]
            pdc_p["provider<br/>(3010:3000)"]
            pdc_i["infrastructure<br/>(3020:3002)"]
            pdc_c["consumer<br/>(3030:3001)"]
        end
    end

    subgraph provider[Provider Network]
        direction LR
        papi["provider-api<br/>(3011:8011)"]
    end

    subgraph infrastructure[Infrastructure Network]
        direction LR
        iapi["infrastructure-api<br/>(3021:8021)"]
    end

    subgraph consumer[Consumer Network]
        direction LR
        capi["consumer-api<br/>(3031:8031)"]
    end

    %% Group shared services connections
    shared --> pdcs

    %% PDC to API connections
    pdc_p --> papi
    pdc_c --> capi
    pdc_i --> iapi

    classDef default fill:#f8f9fa,stroke:#dee2e6,stroke-width:2px,color:#000;
    classDef network fill:#e3f2fd,stroke:#bbdefb,stroke-width:2px,color:#000;
    classDef service fill:#fff3e0,stroke:#ffe0b2,stroke-width:2px,color:#000;
    classDef pdcNode fill:#e8f5e9,stroke:#c8e6c9,stroke-width:2px,color:#000;
    classDef apiNode fill:#fce4ec,stroke:#f8bbd0,stroke-width:2px,color:#000;
    
    class sandbox,provider,consumer,infrastructure network;
    class mongo,catalog,contract,consent service;
    class pdc_p,pdc_c,pdc_i pdcNode;
    class papi,capi,iapi apiNode;

    linkStyle default stroke:#666666,stroke-width:1px;

Each service runs in its own container and communicates through defined networks.

Network Architecture

The sandbox uses four distinct networks:

This network separation ensures proper isolation and security between components.

How to use

  1. Make sure you have Docker and Docker Compose installed
  2. Navigate to the sandbox/infrastructure directory
  3. Run docker-compose up to start all services
  4. Wait for all services to be healthy (you can check with docker ps)

Database Setup

MongoDB

PDCs

The sandbox includes three Connector (PDC) instances:

Provider

Consumer

Infrastructure

Mocks

The sandbox includes several mock services to simulate external BB:

Contract

Catalog

APIs

Mock API services are provided for each PDC:

Available tests

The sandbox environment allows testing of:

  1. Provider to Consumer exchange inside a project
  2. Data Processing Chain Protocol Exchange inside a project
  3. Data Processing Chain Protocol Exchange based on a consent

To run tests, ensure all services are up and running, then execute the test suite from your development environment.

Troubleshooting

Common issues and solutions:

  1. Service won't start

    • Check logs with docker logs <container_name>
    • Verify all required environment variables are set
    • Ensure no port conflicts on your host machine
  2. Network connectivity issues

    • Verify the service is connected to the correct networks
    • Check network isolation is working as expected
    • Use docker network inspect <network_name> to debug
  3. Database connection issues

    • Ensure MongoDB is running and healthy
    • Verify the mongo-seed service has completed successfully
    • Check database connection strings in environment files

Maintenance

To maintain the sandbox:

  1. Cleaning up

    docker-compose down -v  # Remove containers and volumes
    docker-compose down --rmi all  # Remove containers and images
    
  2. Updating services

    • Rebuild specific service: docker-compose build <service_name>
    • Rebuild all: docker-compose build
  3. Logs

    • View logs: docker-compose logs -f [service_name]
    • Check container status: docker-compose ps

Important Note

⚠️ Current Limitations and Future Expansion

The current sandbox environment is restricted to testing basic interactions within a single project context. Future updates will expand the testing capabilities to include:

These limitations are temporary, and the sandbox environment will be continuously updated to support more comprehensive testing scenarios. Please check for updates regularly as new test cases are added.