-
Notifications
You must be signed in to change notification settings - Fork 16
Ripple SDK
Vinod Sathyaseelan edited this page Aug 15, 2025
·
2 revisions
The Ripple SDK provides tools and libraries for developing services and integrating with the Ripple Firebolt Gateway. It enables developers to create custom functionality using internal RPC calls and service brokers.
The ServiceController manages the lifecycle and communication of services:
use ripple_sdk::service::{ServiceController, ServiceConfig};
pub struct MyService {
controller: ServiceController
}
impl MyService {
pub fn new(config: ServiceConfig) -> Self {
Self {
controller: ServiceController::new(config)
}
}
}Handles service discovery and registration:
use ripple_sdk::service::{ServiceRegistry, ServiceInfo};
// Register a new service
registry.register(ServiceInfo {
name: "my_service",
version: "1.0",
methods: vec!["method1", "method2"]
});Enables communication between services:
use ripple_sdk::service::ServiceClient;
// Create a client to interact with other services
let client = ServiceClient::connect("other_service").await?;
let response = client.call("method_name", params).await?;Services communicate using internal RPC calls through brokers:
// Service implementation
async fn handle_request(&self, method: &str, params: Value) -> Result<Value> {
match method {
"get_data" => {
// Handle the request
Ok(json!({ "data": "response" }))
}
_ => Err(Error::MethodNotFound)
}
}// Broadcast events to subscribers
controller.broadcast_event("status_changed", payload).await?;Brokers handle communication routing between services:
- WebSocket Broker: For web-based services
- HTTP Broker: RESTful service communication
- Internal Broker: Direct in-process communication
- Use strongly-typed message structures
- Implement proper error handling
- Follow the service lifecycle patterns
- Document API endpoints
- Handle service discovery gracefully
See our API Documentation for:
- Service interfaces
- RPC protocol details
- Broker configurations
- Message formats
Check our examples directory for:
- Basic service setup
- RPC communication
- Broker configuration
- Event handling
© 2025 RDK Management, LLC (and contributors). Firebolt® is a registered mark of its owner.