You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Ferenc Gerlits (Jira)" <ji...@apache.org> on 2021/07/26 07:28:00 UTC

[jira] [Resolved] (MINIFICPP-1473) E2P-2. Migrate hand-written class loader to Poco::ClassLoader

     [ https://issues.apache.org/jira/browse/MINIFICPP-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ferenc Gerlits resolved MINIFICPP-1473.
---------------------------------------
    Resolution: Won't Do

> 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.
>  
> {{AgentDocs}} relies on static self-registration of extensions, so if we remove that, we'll need to find a different way of generating the documentation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)