blob: f5eeb42daac6c9461e7b34972b6279cb69a7fa6c [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Celix Version 3 (Proposal) / Apache Celix</title>
<link rel="icon" href="/assets/img/favicon.ico">
<link href="/assets/css/bootstrap.min.css" rel="stylesheet">
<link href="/assets/css/style.css" rel="stylesheet">
<style>
.card-body img {
max-width: 100%;
width: 100%;
height: auto;
}
.card-body img + em {
text-decoration: underline;
}
</style>
<script>
var _paq = window._paq = window._paq || [];
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://analytics.apache.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '9']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
</head>
<body class="light-grey">
<a href="https://github.com/apache/celix" class="github-ribbon">
<img src="/assets/img/forkme_right_red_aa0000.png" alt="Fork me on GitHub">
</a>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top">
<div class="container">
<a class="navbar-brand" href="/">
<img src="/assets/img/celix-white.svg" height="40" class="d-inline-block align-top" alt="Celix Logo">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="/">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/download.cgi">Download</a>
</li>
<li class="nav-item dropdown active">
<a class="nav-link dropdown-toggle" href="#" id="ddDocs" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Docs
</a>
<div class="dropdown-menu" aria-labelledby="ddDocs">
<a class="dropdown-item" href="/docs/2.4.0/docs.html">2.4.0 (latest)</a>
<a class="dropdown-item" href="/docs/2.3.0/docs.html">2.3.0</a>
<a class="dropdown-item" href="/docs/2.2.1/docs.html">2.2.1</a>
<a class="dropdown-item" href="/docs/2.1.0/docs.html">2.1.0</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="ddContributing" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Contributing
</a>
<div class="dropdown-menu" aria-labelledby="ddContributing">
<a class="dropdown-item" href="/contributing/youatcelix.html">You at Celix</a>
<a class="dropdown-item" href="/contributing/submitting-patches.html">Submitting patches</a>
<a class="dropdown-item" href="/contributing/source-and-builds.html">Source code and builds</a>
<hr>
<a class="dropdown-item" href="/contributing/releasing.html">Releasing</a>
<a class="dropdown-item" href="/contributing/volunteers.html">Volunteers</a>
<a class="dropdown-item" href="https://whimsy.apache.org/board/minutes/Celix.html">Board Reports</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="ddSupport" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Support
</a>
<div class="dropdown-menu" aria-labelledby="ddSupport">
<a class="dropdown-item" href="/support/mailing-list.html">Mailing Lists</a>
<a class="dropdown-item" href="/support/issue-tracking.html">Issue Tracking</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="ddFoundation" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
ASF
</a>
<div class="dropdown-menu" aria-labelledby="ddFoundation">
<a class="dropdown-item" href="https://www.apache.org/">ASF Home</a>
<a class="dropdown-item" href="https://www.apache.org/foundation/how-it-works.html">How it works</a>
<a class="dropdown-item" href="https://www.apache.org/licenses/">License</a>
<a class="dropdown-item" href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a>
<a class="dropdown-item" href="https://www.apache.org/foundation/thanks.html">Thanks</a>
<a class="dropdown-item" href="https://www.apache.org/security/">Security</a>
<a class="dropdown-item" href="https://www.apache.org/foundation/policies/conduct">Code of Conduct</a>
</div>
</li>
</ul>
</div>
</div>
</nav>
<div class="section">
<div class="container">
<div class="row py-4">
<div class="col-sm-12 card">
<div class="card-body pt-5">
<a href="/docs/2.1.0/docs.html" title="back to documentation">&lt;&lt; back to documentation</a>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<h1 id="celix-version-3-proposal">Celix Version 3 (Proposal)</h1>
<h2 id="intro">Intro</h2>
<p>The <a href="celix/celix.h">celix.h</a> header contains a proposed API for Apache Celix version 3.
This API is not fixed, but work in progress and should be considered a starting point for discussion.</p>
<p>There are a few reasons for a API change:</p>
<h3 id="the-current-apache-celix-api-is-mapped-from-the-osgi-api">The current Apache Celix API is mapped from the OSGi API.</h3>
<p>The problem is that OSGi is designed for Java, a
language where classes are present runtime, reflection can be used, resource are controlled through garbage collection
and classes are kept available when still needed(garbage collector) even if a bundle is uninstalled.
This resulted in an API which is very lenient in object sharing/ownership and no real focus on resource
locking/protection. This simply does not map wel to a C language. For a dynamic service framework in C, the focus
should be in minimizing object sharing and when needed only for a controlled, well defined and short period. When
resource sharing is needed - i.e. services - projecting access to these resources should dictate the design of the
API.
In this proposed API, when possible, object sharing is done through sharing ids in the form of a primitive
(value copied) types instead of pointers. These ids can be used to
(safely) retrieve info form the object if still present, which should make it more safe to use and most importantly
less complex for implementation (think threads &amp; locks). Also most service or service related updates must be
handled with callbacks, to ensure correct usage of locking can be applied more easily.</p>
<h3 id="osgi-api-leaks-too-much-details">OSGi API leaks too much details.</h3>
<p>The OSGi API is more than 15 years old and has grown overtime, this shows.
There are a lot of hoops to take to use a service in a correct way.
The proposed Apache Celix API tries to minimize the needed objects, while still providing the same functionality.
It was also designed for a more user friendly experience.</p>
<h3 id="smaller-code-base">Smaller code base</h3>
<p>Because the OSGi leaks to much details, it is also difficult to implemented; specifically mapped one to one from Java.
A redesign of the API could lead to a smaller code base.</p>
<h3 id="single-framework-event-thread-design">Single framework event thread design.</h3>
<p>It would be beneficial to use single framework event thread,
this would means that as a user it is ensured that all the callbacks are called from the same thread.
Preventing issues that service can be added/removed simultaneously and the locking complexity which comes with that.
With the current API this is more difficult (too many entries to shared resources).</p>
<h3 id="multiple-languages">Multiple languages</h3>
<p>One of the key values of Apache Celix should be to deliver a sophisticated develop / design environment for more
complex - i.e. composed out of modules) application/systems. For example a applications with combines
some well proven C modules/libraries, with modern C++ modules and a splash of development support
with python modules.
And although Apache Celix is not there yet, it is one of it&rsquo;s goals.
The current API is not designed to support multiple languages and is difficult to port the different languages due to
the &ldquo;too much details&rdquo; issue.</p>
<h3 id="more-focus-on-the-primary-ways-to-interact-with-a-dynamic-service-framework">More focus on the primary ways to interact with a dynamic service framework.</h3>
<p>For Apache Celix developers a focus is how to: work with services (register, tracking &amp; monitor service interest) and
how to easily create components which provides and depends on services.
The proposed API focus on these issues as built-in support. For OSGi some of these functions where added add a later
stage and this shows.</p>
<h3 id="current-api-has-a-strong-focus-on-error-codes">Current api has a strong focus on error codes</h3>
<p>Java has exceptions, C has not. This has lead to an initial design that almost all function return a error code.
While in principle completely correct, from a developer perspective it become cumbersome.
Also taking in to perspective, than in many cases if an error is returned there no real way to handle this,
the proposed API focus more on easy of use and lenient and silently accepting invalid input (i.e. NULL pointers
or invalid ids).</p>
<h3 id="integral-api">Integral API</h3>
<p>Again because the OSGi API has grown overtime, the API seems to be dispersed and not one integral API.
The proposed API tries to remedy that.</p>
<h3 id="runtime-type-introspection">Runtime Type Introspection</h3>
<p>With OSGi for Java you have runtime type introspection (reflection) build-in the Java language, for C
(and most other native languages) this is not the case. As effect is not possible to infer if services
are compatible or to automagically make service remote / serialize types.
The dynamic function interface library (dfi library) adds type introspection support, by using the extender pattern combined with so called type/interface descriptor files.
Although not ideal, this can be used to runtime check service compatibility and automagically serialize types.
If possible the dfi support will be optional and opt-out.</p>
<h3 id="eat-your-own-dog-food">Eat your own dog food</h3>
<p>A bit strange, but as a service oriented framework the OSGi specification for the core framework specification does not provide framework services.
The proposed API moves some of the API for detailed info to framework services.</p>
<h3 id="integrated-event-admin">Integrated event admin</h3>
<p>Services are great, but not everything fits perfectly solely with services. The event admin from the OSGi
specification is a nice complement to the service oriented paradigm and as result event admin awareness is taken
into account in the proposed API.</p>
<h3 id="missing-prefix-for-symbols-and-headers">Missing prefix for symbols and headers</h3>
<p>The current usage of prefixes is not sufficient. For example the celix framework has te be included as
&ldquo;framework.h&rdquo; and has no prefix. This is not wise for a language without namespaces. The proposed API
prefixes everything with celix_ and all include paths start with celix/.
TODO discuss if a more generic OSGi like prefix is desirable, e.g. nosgi_ and nosgi/</p>
<h3 id="const-correctness">const correctness</h3>
<p>The proposed API add the use of const when applicable. The usage of const adds more semantics to the API and
can prevent certain calls (e.g.in the callbacks) when they should not be used.</p>
<h3 id="support-for-a-more-static-approach">Support for a more static approach</h3>
<p>Although Apache Celix is a framework for dynamic services, this does not mean that every module should be runtime install/uninstall-able.
Supporting static modules and modules as &ldquo;plain old libraries&rdquo; can make it easier to use and deploy application using Apache Celix.
In this proposal, bundle are still present, but just a way to install modules. Support for installing modules using static
and shared libraries is added.</p>
<h2 id="apache-celix-v3-cmake-commands">Apache Celix V3 CMake Commands</h2>
<p>Apache Celix provides several CMake commands to be able to work with Apache Celix modules, bundles and deployments.</p>
<h3 id="generic-changes">Generic Changes</h3>
<ul>
<li>symbolic_name is no longer needed nor expected. A module_name / bundle_name
is enough and should be unique.</li>
<li>All command are prefixed with <code>celix_</code>.</li>
</ul>
<h3 id="modules--bundles">Modules &amp; Bundles</h3>
<p>Modules are self-contained, autonomous and bounded software parts which can be combined to provide a greater/broader functionality.</p>
<p>Modules contain resources and required libraries (self-contained),
use a activator to bootstrap itself (autonomous),
can provide/require services to share/use functionality (bounded)
and can import / export libraries so share types / routines (bounded)</p>
<p>There are two types of modules</p>
<ul>
<li>Library Modules</li>
<li>Bundled Modules (aka Bundles)</li>
</ul>
<p>Library modules are singular modules which do not import nor export libraries,
cannot be bundled with additional required (private) libraries, and are build as shared or static libraries.
Library modules can contain additional (embedded) resources.
Static modules will only auto register on platforms where there is
support for the <code>__attribute__((ctor))</code> compiler attribute.</p>
<p>Bundle modules are modules which can import and/or export other libraries and
can embed additional required (private) libraries.
Bundle modules will be build as bundle file (ZIP file).</p>
<h3 id="modules">Modules</h3>
<p>Modules can be build a &ldquo;plain old libraries&rdquo; using the CMake
add_library command. Resources can be added using the
celix_module_files command.</p>
<p>To be able to find the module resources, the module name used in the
celix_moduleRegister call should be the same as the module name used
in the CMake commnands.
If no module name is set using the celix_module_name CMake command,
the module name is equal to the name target.</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="">
</span></span></span><span style="display:flex;"><span><span style=""></span><span style="color:#a2f">celix_module_name</span>(<span style="color:#b44">&lt;module_target&gt;</span> <span style="color:#b44">&lt;module_name&gt;</span>)<span style="">
</span></span></span><span style="display:flex;"><span><span style="">
</span></span></span><span style="display:flex;"><span><span style=""></span><span style="color:#a2f">celix_module_files</span>(<span style="color:#b44">&lt;bundle_or_module_target&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">files...</span> <span style="color:#b44">DESTINATION</span> <span style="color:#b44">&lt;dir&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[FILE_PERMISSIONS</span> <span style="color:#b44">permissions...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[DIRECTORY_PERMISSIONS</span> <span style="color:#b44">permissions...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[NO_SOURCE_PERMISSIONS]</span> <span style="color:#b44">[USE_SOURCE_PERMISSIONS]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[FILES_MATCHING]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[[PATTERN</span> <span style="color:#b44">&lt;pattern&gt;</span> <span style="color:#b44">|</span> <span style="color:#b44">REGEX</span> <span style="color:#b44">&lt;regex&gt;]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[EXCLUDE]</span> <span style="color:#b44">[PERMISSIONS</span> <span style="color:#b44">permissions...]]</span> <span style="color:#b44">[...]</span>)<span style="">
</span></span></span><span style="display:flex;"><span><span style="">)
</span></span></span></code></pre></div><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-C" data-lang="C"><span style="display:flex;"><span><span style="color:#080;font-style:italic">/**
</span></span></span><span style="display:flex;"><span><span style="color:#080;font-style:italic"> * Registers the module for all current framework and future framework that are created.
</span></span></span><span style="display:flex;"><span><span style="color:#080;font-style:italic"> * If no name is provided, the module will not be registered and an error will be logged.
</span></span></span><span style="display:flex;"><span><span style="color:#080;font-style:italic"> *
</span></span></span><span style="display:flex;"><span><span style="color:#080;font-style:italic"> * When initializing the module, the framework will look for a &lt;module_name&gt;_resourceEntry and
</span></span></span><span style="display:flex;"><span><span style="color:#080;font-style:italic"> * &lt;module_name&gt;_resourceEntrySize symbol. If found, the content is assumed to be an embedded zip (or tar?) file.
</span></span></span><span style="display:flex;"><span><span style="color:#080;font-style:italic"> * the celix_modules_files CMake command will ensure that these symbols are created and linked to the module library.
</span></span></span><span style="display:flex;"><span><span style="color:#080;font-style:italic"> *
</span></span></span><span style="display:flex;"><span><span style="color:#080;font-style:italic"> * @param moduleName The name of the module.
</span></span></span><span style="display:flex;"><span><span style="color:#080;font-style:italic"> * @param moduleVersion Optional, the version of the module.
</span></span></span><span style="display:flex;"><span><span style="color:#080;font-style:italic"> * @startFp Optional the start function which will be called if the module is going to be added and ready to start.
</span></span></span><span style="display:flex;"><span><span style="color:#080;font-style:italic"> * @startFp Optional the stop function which will be called if the module going to be removed and ready to start.
</span></span></span><span style="display:flex;"><span><span style="color:#080;font-style:italic"> * @opts Optional the additional options. The options will only be used during the registerModule call.
</span></span></span><span style="display:flex;"><span><span style="color:#080;font-style:italic"> * @return 0 if successful
</span></span></span><span style="display:flex;"><span><span style="color:#080;font-style:italic"> */</span>
</span></span><span style="display:flex;"><span><span style="color:#0b0;font-weight:bold">int</span> <span style="color:#00a000">celix_moduleRegistration_registerModule</span>(
</span></span><span style="display:flex;"><span> <span style="color:#a2f;font-weight:bold">const</span> <span style="color:#0b0;font-weight:bold">char</span><span style="color:#666">*</span> moduleName,
</span></span><span style="display:flex;"><span> <span style="color:#a2f;font-weight:bold">const</span> <span style="color:#0b0;font-weight:bold">char</span><span style="color:#666">*</span> moduleVersion,
</span></span><span style="display:flex;"><span> celix_module_registration_startModule_fp startFp,
</span></span><span style="display:flex;"><span> celix_module_registration_stopModule_fp stopFp,
</span></span><span style="display:flex;"><span> <span style="color:#a2f;font-weight:bold">const</span> celix_module_registration_options<span style="color:#666">*</span> opts);
</span></span></code></pre></div><h3 id="bundles">Bundles</h3>
<p>Bundles are ZIP files which bundle one module.
The CMake commands for add_bundle commands are not changed with exception of the
added celix_ prefix. The other command are renamed to module and a celix_ is added
(e.g bundle_name -&gt; celix_module_name)</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="color:#a2f">celix_add_bundle</span>(<span style="color:#b44">&lt;bundle_target_name&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">SOURCES</span> <span style="color:#b44">source1</span> <span style="color:#b44">source2</span> <span style="color:#b44">...</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[NAME</span> <span style="color:#b44">bundle_name]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[SYMBOLIC_NAME</span> <span style="color:#b44">bundle_symbolic_name]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[DESCRIPTION</span> <span style="color:#b44">bundle_description]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[VERSION</span> <span style="color:#b44">bundle_version]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[PRIVATE_LIBRARIES</span> <span style="color:#b44">private_lib1</span> <span style="color:#b44">private_lib2</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[EXPORT_LIBRARIES</span> <span style="color:#b44">export_lib1</span> <span style="color:#b44">export_lib2</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[IMPORT_LIBRARIES</span> <span style="color:#b44">import_lib1</span> <span style="color:#b44">import_lib2</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[HEADERS</span> <span style="color:#b44">&#34;header1: header1_value&#34;</span> <span style="color:#b44">&#34;header2: header2_value&#34;</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span>)<span style="">
</span></span></span><span style="display:flex;"><span><span style="">
</span></span></span><span style="display:flex;"><span><span style=""></span><span style="color:#a2f">celix_add_bundle</span>(<span style="color:#b44">&lt;bundle_target_name&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">ACTIVATOR</span> <span style="color:#b44">&lt;activator_lib&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[NAME</span> <span style="color:#b44">bundle_name]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[SYMBOLIC_NAME</span> <span style="color:#b44">bundle_symbolic_name]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[DESCRIPTION</span> <span style="color:#b44">bundle_description]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[VERSION</span> <span style="color:#b44">bundle_version]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[PRIVATE_LIBRARIES</span> <span style="color:#b44">private_lib1</span> <span style="color:#b44">private_lib2</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[EXPORT_LIBRARIES</span> <span style="color:#b44">export_lib1</span> <span style="color:#b44">export_lib2</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[IMPORT_LIBRARIES</span> <span style="color:#b44">import_lib1</span> <span style="color:#b44">import_lib2</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[HEADERS</span> <span style="color:#b44">&#34;header1: header1_value&#34;</span> <span style="color:#b44">&#34;header2: header2_value&#34;</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span>)<span style="">
</span></span></span><span style="display:flex;"><span><span style="">
</span></span></span><span style="display:flex;"><span><span style=""></span><span style="color:#a2f">celix_add_bundle</span>(<span style="color:#b44">&lt;bundle_target_name&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[NAME</span> <span style="color:#b44">bundle_name]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[SYMBOLIC_NAME</span> <span style="color:#b44">bundle_symbolic_name]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[DESCRIPTION</span> <span style="color:#b44">bundle_description]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[VERSION</span> <span style="color:#b44">bundle_version]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[PRIVATE_LIBRARIES</span> <span style="color:#b44">private_lib1</span> <span style="color:#b44">private_lib2</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[EXPORT_LIBRARIES</span> <span style="color:#b44">export_lib1</span> <span style="color:#b44">export_lib2</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[IMPORT_LIBRARIES</span> <span style="color:#b44">import_lib1</span> <span style="color:#b44">import_lib2</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[HEADERS</span> <span style="color:#b44">&#34;header1: header1_value&#34;</span> <span style="color:#b44">&#34;header2: header2_value&#34;</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span>)<span style="">
</span></span></span></code></pre></div><h3 id="descriptors">Descriptors</h3>
<p>Descriptors are files which describe interfaces or messages which can be
parsed by the dynamic function interface (dfi) library.
The dfi library can be used for runtime &rsquo;type introspection&rsquo;.
The descriptor files are a bit cryptic for human eyes, but relatively easy to parse.</p>
<p>With these descriptors the Celix framework can runtime compare if
services and/or messages provider consumer combinations are compatible
and make remote services / serialization of messages possible.</p>
<p>The <code>celix_module_descriptor</code> CMake will register header files
for descriptor generation and inclusion in the module/bundle
resources (under META-INF/descriptors/interfaces and
META-INF/descriptors/messages).</p>
<p>The Celix project will have a <code>dfi-gen</code> target which will be used to
generate the descriptors from the header files.</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="">
</span></span></span><span style="display:flex;"><span><span style=""></span><span style="color:#a2f">celix_module_descriptor</span>(<span style="color:#b44">&lt;bundle_or_module_target&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">header_file1</span> <span style="color:#b44">header_file2</span> <span style="color:#b44">...</span>
</span></span><span style="display:flex;"><span>)<span style="">
</span></span></span></code></pre></div><h3 id="deployment">Deployment</h3>
<p>The <code>add_deploy</code> will be changed to <code>celix_add_deploy</code> and will accept
library modules and bundle modules.</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-CMake" data-lang="CMake"><span style="display:flex;"><span><span style="color:#a2f">celix_add_deploy</span>(<span style="color:#b44">&lt;deploy_target_name&gt;</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[COPY]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[GROUP</span> <span style="color:#b44">group_name]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[NAME</span> <span style="color:#b44">deploy_name]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[LAUNCHER</span> <span style="color:#b44">launcher]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[DIR</span> <span style="color:#b44">dir]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[MODULES</span> <span style="color:#b44">&lt;module_or_bundle1&gt;</span> <span style="color:#b44">&lt;module_or_bundle2&gt;</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span> <span style="color:#b44">[PROPERTIES</span> <span style="color:#b44">&#34;prop1=val1&#34;</span> <span style="color:#b44">&#34;prop2=val2&#34;</span> <span style="color:#b44">...]</span>
</span></span><span style="display:flex;"><span>)<span style="">
</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
</div>
<footer class="py-3 bg-secondary">
<div class="container">
<div class="row">
<div class="col-md-8 text-center">
<p class="m-0 text-white">
Copyright &copy; 2023 The Apache Software Foundation, Licensed under
the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
<br>
Apache Celix, Celix, Apache, the Apache feather logo and the Apache Celix logo are trademarks of The Apache Software Foundation.
</p>
</div>
<div class="col-md-4 text-center">
<a href="https://www.apache.org/events/current-event.html" target="_blank">
<img src="https://www.apache.org/events/current-event-234x60.png" title="Apache Event" width="234" height="60" border="0">
</a>
</div>
</div>
</div>
</footer>
<script src="/assets/js/jquery.min.js"></script>
<script src="/assets/js/bootstrap.bundle.min.js"></script>
</body>
</html>