Repository navigation
Firebolt CPP 2.0
The Firebolt native application ecosystem currently relies on two independent repositories that collectively provide Firebolt API access to C++ applications:
- Firebolt C++ Client
- Firebolt C++ Transport While this separation originally provided clear ownership boundaries between API consumption and transport functionality, the implementation has gradually evolved such that both repositories now contain overlapping responsibilities, resulting in tighter coupling, duplicated logic, and increased maintenance costs.
As adoption of Firebolt native applications expands across RDK platforms, a reassessment of repository boundaries and responsibilities is necessary to improve maintainability, enable architectural evolution, and reduce long-term operational overhead.
Firebolt CPP 2.0 defines the proposed refactoring of the Firebolt native C++ client ecosystem.
The goal is to separate responsibilities across three primary layers:
- Firebolt Model
- Firebolt Transport
- Firebolt Client
This structure reduces coupling between generated API models, runtime client behavior, and transport implementation details.
- Clarify ownership between client, model, and transport layers
- Remove dependency on a globally shared singleton model
- Enable explicit transport ownership
- Support custom transport implementations
- Improve scalability and testability
- Preserve strong typing for generated Firebolt APIs
- Support public and private API surfaces
Firebolt CPP 2.0 separates Firebolt responsibilities into three distinct layers:
- The Model layer defines what Firebolt data looks like.
- The Transport layer defines how messages move.
- The Client layer binds models and transport together by managing runtime execution.
This separation creates a transport-agnostic, scalable, and extensible Firebolt programming model while maintaining strong type safety and minimizing framework overhead.
Applications construct and own a FireboltClient instance. This replaces implicit access through a global singleton.
The client depends on IFireboltTransport, allowing the default Firebolt transport or a custom application-provided transport to be used.
Generated Firebolt request, response, event, primitive, enum, and object models share a common model contract.
Generated models use CRTP-based compile-time polymorphism to avoid unnecessary virtual interface overhead.
Transport implementations use runtime polymorphism because transport selection is application-defined and may vary at runtime.
Firebolt CPP 2.0 gives applications a clearer and more flexible integration model while preserving generated API usability and type-safe Firebolt data access.
Firebolt CPP 2.0 is organized around three primary layers:
+------------------------------------------------------+
| Firebolt Interfaces |
| Public Headers Private Headers |
+------------------------+-----------------------------+
|
v
+------------------------------------------------------+
| Firebolt Client |
| - Interface Access |
| - Request Correlation |
| - Callback Dispatch |
| - Event Dispatch |
| - Uses IFireboltTransport |
+------------------------------------------------------+
|
v
+------------------------------------------------------+
| Transport Implementation |
| - Firebolt Default Transport |
| - Custom User Transport |
+------------------------------------------------------+
|
v
+------------------------------------------------------+
| App Gateway |
+------------------------------------------------------+
#include <firebolt/lifecycle.h>
std::shared_ptr<IFireboltTransport> transport =
/* transport implementation */;
FireboltClient firebolt(transport);
auto& lifecycle =
LifecycleInterface(firebolt);lifecycle.GetLifecycleState().Then(
const FireboltResult<LifecycleState>& result
{
if (!result)
{
return;
}
const LifecycleState& state =
result.Value();
std::cout
<< state.state.value
<< std::endl;
});auto result =
lifecycle.GetLifecycleState()
.Get(std::chrono::seconds(5));
if (result)
{
const LifecycleState& state =
result.Value();
std::cout
<< state.state.value
<< std::endl;
}auto subscription =
lifecycle.OnStateChanged(
const LifecycleState& state
{
std::cout
<< state.state.value
<< std::endl;
});subscription.Unsubscribe()Defines generated Firebolt data contracts and conversion behavior. More details below. Firebolt CPP 2.0 Model
Defines the transport contract and provides communication abstraction. More details below. Firebolt CPP 2.0 Transport
Binds generated interfaces and models to a specific transport context. More details below. Firebolt CPP 2.0 Client
- Public headers
- Private headers
- Firebolt models
- libfirebolt-client.so
- libfirebolt-transport-default.so
More details below. Firebolt CPP 2.0 API Headers