[
https://issues.apache.org/jira/browse/MINIFICPP-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ferenc Gerlits updated MINIFICPP-1473:
--------------------------------------
Description:
Our current class loading infrastructure is quite confusing, and relies on
static self-registry of classes.
Poco::ClassLoader looks like a robust 3rd-party implementation of the same
thing, which
* would be easier to adapt to the shared-library-plugin world;
* and already supports both Windows and Linux/Mac, so we can hide OS-specific
differences (which are handled by our hand-crafted code, but it's not clear how
well).
As part of this, we should get rid of the static self-registry, which won't
work with plugins.
TODO: may need to be broken down further
* bring in the Poco library: Foundation only, strip out everything else
* rewrite the classloader to use Poco::ClassLoader
* remove static self-registry and load the classes explicitly when needed
* change the STATIC extension libraries to SHARED, and --whole-archive should
no longer be necessary
* the main executable and the integration tests should not link with any of
the extension libraries, and instead load them dynamically using (our wrapper
of) Poco::ClassLoader
* unit tests should link with the extensions, so they have access to all their
public methods, and can test the utility classes contained in the extension
TODO: I expect complications; add them here when we find them.
was:
Our current class loading infrastructure is quite confusing, and relies on
static self-registry of classes.
Poco::ClassLoader looks like a robust 3rd-party implementation of the same
thing, which
* would be easier to adapt to the shared-library-plugin world;
* and already supports both Windows and Linux/Mac, so we can hide OS-specific
differences (which are handled by our hand-crafted code, but it's not clear how
well).
As part of this, we should get rid of the static self-registry, which won't
work with plugins.
TODO: may need to be broken down further
* bring in the Poco library: Foundation only, strip out everything else
* rewrite the classloader to use Poco::ClassLoader
* remove static self-registry and load the classes explicitly when needed
TODO: Verify that Poco::ClassLoader can load classes from whole-archived static
libraries inside the executable itself. If it cannot, then this step will need
to be moved to later.
> E2P-2. Migrate hand-written class loader to Poco::ClassLoader
> -------------------------------------------------------------
>
> Key: MINIFICPP-1473
> URL: https://issues.apache.org/jira/browse/MINIFICPP-1473
> Project: Apache NiFi MiNiFi C++
> Issue Type: New Feature
> Reporter: Ferenc Gerlits
> Priority: Minor
>
> Our current class loading infrastructure is quite confusing, and relies on
> static self-registry of classes.
> Poco::ClassLoader looks like a robust 3rd-party implementation of the same
> thing, which
> * would be easier to adapt to the shared-library-plugin world;
> * and already supports both Windows and Linux/Mac, so we can hide
> OS-specific differences (which are handled by our hand-crafted code, but it's
> not clear how well).
> As part of this, we should get rid of the static self-registry, which won't
> work with plugins.
> TODO: may need to be broken down further
> * bring in the Poco library: Foundation only, strip out everything else
> * rewrite the classloader to use Poco::ClassLoader
> * remove static self-registry and load the classes explicitly when needed
> * change the STATIC extension libraries to SHARED, and --whole-archive
> should no longer be necessary
> * the main executable and the integration tests should not link with any of
> the extension libraries, and instead load them dynamically using (our wrapper
> of) Poco::ClassLoader
> * unit tests should link with the extensions, so they have access to all
> their public methods, and can test the utility classes contained in the
> extension
>
> TODO: I expect complications; add them here when we find them.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)