For performance results (2.6× faster boot, 45% less RAM), see the ONAP SDN-C overview page. This page covers the technical migration steps.
Goal
ONAP SDN-C is OpenDaylight with added functionality for executing directed graphs. The goal of this migration is to make it more efficient and suitable for microservice deployments — the exact use case lighty.io was designed for.
What We Achieved
- Full ability to execute directed graphs
- Less memory usage (613 MiB vs 1,125 GiB)
- Quicker startup time (147 s vs 388 s)
- Custom Docker image — drop-in replacement for the vanilla SDNC container
Step 1: Initialize the Controller
final LightyControllerBuilder lightyControllerBuilder = new LightyControllerBuilder();
final LightyController lightyController = lightyControllerBuilder
.from(controllerConfiguration)
.build();
lightyController.start().get();
Step 2: Build the SDNC lighty.io Object
Inspect the original SDNC container's blueprint files to identify all beans and their dependencies. The key beans include the Directed Graph executor, the database access layer, and SDNC-specific service providers.
Then build the lighty SDNC object and start it:
final LightySdnc lightySdnc = new LightySdncBuilder()
.from(lightyController.getServices())
.build();
lightySdnc.start().get();
Step 3: Implement initProcedure
In initProcedure(), initialize all beans identified in the blueprints. Dependencies available from lightyController.getServices() include:
getBindingDataBroker()— MD-SAL data brokergetRpcProviderService()— RPC registrationgetBindingNotificationPublishService()— notificationsgetMountPointService()— device mount points
Example initialization pattern:
@Override
protected boolean initProcedure() {
// Initialize directed graph executor
this.dgExecutor = new SliPluginUtils(lightyServices.getBindingDataBroker());
// Initialize SDNC providers
this.sdncProvider = new SdncProvider(
lightyServices.getBindingDataBroker(),
lightyServices.getRpcProviderService(),
lightyServices.getBindingNotificationPublishService());
this.sdncProvider.initialize();
// Initialize database connection
this.dbLibService = new DbLibService();
this.dbLibService.init();
LOG.info("lighty SDNC initialized successfully");
return true;
}
Step 4: Implement stopProcedure
@Override
protected boolean stopProcedure() {
if (this.sdncProvider != null) {
this.sdncProvider.close();
LOG.info("SdncProvider closed");
}
if (this.dbLibService != null) {
this.dbLibService.destroy();
LOG.info("DbLibService stopped");
}
if (this.dgExecutor != null) {
this.dgExecutor.close();
LOG.info("DG executor stopped");
}
return true;
}
Docker Image
We built a custom Docker image that replaces the vanilla SDNC container. The image:
- Uses a plain Java SE base (no Karaf, no OSGi)
- Starts significantly faster due to eliminated OSGi bootstrap overhead
- Consumes substantially less RAM — no OSGi bundle wiring in memory
- Maintains full API compatibility with the vanilla SDNC container
For further SDN/C performance and architecture optimizations, contact us.