Skip to content

EndpointBroker

Vinod Sathyaseelan edited this page Aug 14, 2025 · 2 revisions

Endpoint Broker

The Endpoint Broker is a critical component in Ripple that manages and routes requests to different endpoints based on configured rules.

Overview

The Endpoint Broker serves as a routing layer that handles communication between Firebolt applications and various backend services. It determines which endpoint should handle each request based on the configured rules in the ripple.common.rules.json file.

Key Features

  • Dynamic endpoint routing based on method patterns
  • Support for multiple endpoint types:
    • Thunder (WebSocket)
    • HTTP
    • WebSocket
    • Workflow
    • Extension (extn)

Endpoint Types

Thunder Endpoint

  • Protocol: WebSocket
  • Default URL: ws://127.0.0.1:9998/jsonrpc
  • Used for communicating with Thunder plugins
  • Handles JSON-RPC 2.0 messages

HTTP Endpoint

  • Protocol: HTTP
  • Supports REST API calls
  • Can be configured with or without JSON-RPC formatting

WebSocket Endpoint

  • Protocol: WebSocket
  • Supports persistent connections
  • Used for event-based communication

Workflow Endpoint

  • Special endpoint type for handling complex workflows
  • Can aggregate multiple method calls into a single response
  • Supports source transformations

Extension (extn) Endpoint

  • Used for Ripple extensions
  • Handles distributor-specific implementations
  • Routes requests to custom extension handlers

Configuration

Endpoints are configured in the ripple.common.rules.json file under the endpoints section. Each endpoint configuration includes:

  • Protocol
  • URL
  • JSON-RPC flag (where applicable)

Example configuration:

{
  "thunder": {
    "protocol": "thunder",
    "url": "ws://127.0.0.1:9998/jsonrpc"
  },
  "asSocket": {
    "protocol": "websocket",
    "url": "ws://127.0.0.1:9005/as",
    "jsonrpc": false
  }
}

Request Flow

  1. Client makes a request with a specific method
  2. Endpoint Broker matches the method against rules
  3. Determines the appropriate endpoint
  4. Applies any necessary transformations
  5. Routes request to the endpoint
  6. Returns response to client (with any response transformations applied)

See also

Clone this wiki locally