apache / celix

Apache Celix is a framework for C and C++14 to develop dynamic modular software applications using component and in-process service-oriented programming.
https://celix.apache.org/
Apache License 2.0
165 stars 86 forks source link

Prepare Celix 3.0.0 release #509

Open pnoltes opened 1 year ago

pnoltes commented 1 year ago

For the next major version bump a lot deprecated functionality and functions can be dropped. Also some header files not meant for users should be made private.

An overview of the changes that should or can be done, before a Celix 3.0.0 release are:

Note that this does not mean that all deprecated functions/types usage (i.e. bundle_getState, etc) needs to be removed from Celix, but for a first 3.0.0 only that these functions / types are no longer useable downstream (so not useable for Apache Celix users)

PengZheng commented 1 year ago
  • [ ] Change bundle cache dir scheme in v3

It reminds me of the brainstorm we had in https://github.com/apache/celix/pull/441#issuecomment-1236383556

Now that #476 splits the cache and storage, the most straightforward way of supporting efficient sharing of bundles between multiple Celix instances is to add support for uncompressed bundle. This way, each framework instance has its own bundle cache like before, but for shared bundles, we extract them to someplace outside of bundle cache (maybe make them read-only), and then make symbolic links within the bundle cache to uncompressed shared bundles.

For containered/sandboxed APPs, we can mount folder containing uncompressed bundles read-only into the container/sandbox, and include the mount point into the bundle path, so that the framework within the container/sandbox can find them.

Our new celix_utils_deleteDirectory deals with symbolic links correctly, see TEST_F(FileUtilsTestSuite, DeleteSymbolicLinkToDirectory) in #476.

  • [ ] Remove FRAMEWORK_EXPORT (only needed for windows)

It's needed to perform binary footprint optimization for shared object. See #442 It's especially important for C++ bundles if they were to be deployed in devices with limited storage. IMHO, we should use it universally in the whole Celix project, and encourage (and facilitate) our users to do the same.

  • [ ] Maybe (TBD) remove pubsub admins from celix (pubsub is not part of the OSGi specifications)

But OSGi does have Event Admin. The only problem I see with PSA is that it does not support zero-overhead in process communication like RSA: one socket per subscriber is too expensive for communication within the same process.

PSA(Event Admin)/RSA represent two typical inter-component communication styles. We could add support for Event Admin, which both support zero overhead in-process and efficient inter-process communication, or we add support of zero-overhead in-process communication to PSA and rename it to Event Admin.

Also it's worth noting that now service discovery for RSA/PSA(Event Admin) can be unified easily using dns-sd.

PengZheng commented 1 year ago

As mentioned in #511, a crystal clear specification of the Celix component model or a reinterpretation of OSGi in the Celix context is very desirable.

pnoltes commented 1 year ago

I agree with adding a Celix EventAdmin. The event admin is part of the OSGi spec and I also think a remote event admin makes sense and is easier to use for users.

The main reason is that the current PubSub (and also the Remote Service Admin) needs extra manual work or codegen to be able to function. This manual work/codegen is needed to create DFI descriptors for serialization / remote invocation. The event admin is based on properties and for properties serialization should be straightforward and can be done - for example - with reuse of the netstring implementation used in pubsub wire protocol.

I will add a separate issue for the event admin.