Skip to content
Brendan O'Bra edited this page Aug 17, 2025 · 10 revisions

Bring Your Own Service (BYOS)

BYOS is a key feature of Ripple that enables operators to extend the platform's functionality by integrating their own services. This architecture provides flexibility while maintaining security and standardization. BYOS integrations are via websocket and facilitate language agnostic integration with low coupling.

Overview

BYOS allows third-party services to:

  • Register with Ripple dynamically
  • Provide custom functionality
  • Define their own transformation rules
  • Integrate with existing Firebolt APIs
  • Handle custom events and subscriptions

Service Integration Flow

1. Connection Phase

URL

ws://127.0.0.1:3474/?service_handshake=ripple:service:gateway:some_service_id

2. Registration Phase (optional)

sequenceDiagram
    participant S as Service
    participant R as Ripple
    participant RM as RuleEngine
    
    S->>R: Register(capabilities)
    R->>S: Challenge
    S->>R: AuthResponse
    R->>RM: Validate Rules
    RM->>R: Validation Result
    R->>S: Registration Complete
Loading

Service Registration / Unregistration process.

  • Service announces presence to Ripple
  • Provides capabilities manifest (Optional)
  • Establishes communication channel
  • Negotiates protocol version (Optional)
  • Completes authentication (Optional)

Register Request

{
 "jsonrpc": "2.0",
 "id": 1,
 "method": "Service.register",
 "params": {
   "serviceId": "ripple:service:gateway:some_service_id"
 }
}

UnRegister Request

{
 "jsonrpc": "2.0",
 "id": 2,
 "method": "Service.unregister",
 "params": {
   "serviceId": "ripple:service:gateway:some_service_id"
 }
}

The format of the serviceId URN is :::<service_id>

Response

{
 "jsonrpc": "2.0",
 "id": 1,
 "result": {
   "status": "success"
 }
}

3. Handshake Protocol (Optional)

  • Initial Contact

    • Protocol version negotiation
    • Capability exchange
    • Authentication method agreement
  • Rule Exchange (Optional)

    {
      "rules": {
        "custom.method": {
          "endpoint": "customService",
          "transform": {
            "request": "transformation_rule",
            "response": "transformation_rule"
          }
        }
      }
    }

API Access Methods

1. Public Firebolt APIs

  • Integration with existing APIs
  • Standard method calls
  • Event subscription
  • Error handling

2. Extension APIs

  • Custom API definitions
  • Specialized functionality
  • Private methods
  • Custom events

3. Dynamic Method Routing

  • Runtime route configuration
  • Method overloading
  • Fallback handling
  • Transform chains

See also: Architecture, Brokers and Rules System

Clone this wiki locally