Skip to content

Discussion: How to Structure Integrations

Tim Quinn edited this page Feb 2, 2021 · 11 revisions

We have several integrations of Helidon with other technologies, for both Helidon SE and Helidon MP. I have built another one—​for Micrometer support—​and before I recreate the PR for it Tomas suggested in a Slack DM that we have a broader discussion for how to handle these integrations.

So far, we have used various approaches for how to structure the Helidon SE and Helidon MP modules for these integrations, as Tomas summarized:

Approach Location for SE module Location for MP module

First-class citizen

helidon/xxx

helidon/microprofile/xxx

Integration-level citizen

Two modules

Repeat xxx for SE suffix

helidon/integrations/xxx/xxx

helidon/integrations/xxx/cdi

Use base for SE suffix

helidon/integrations/xxx/base

helidon/integrations/xxx/cdi

One module

helidon/integrations/xxx

The "Integration-level citizen, one module" approach (e.g, Neo4J) declares a dependency on CDI using

<scope>provided</scope>
<optional>true</optional>

Notes

  • First-class citizen

    • Adv: Follows our familiar approach of putting SE modules as children of the top-level and modules for Helidon MP under microprofile.

    • Dis: Not appropriate if xxx is not truly a MicroProfile technology. e.g., Micrometer

  • Integration, two modules

    • Adv: Follows our familiar approach which separates the Helidon SE and Helidon MP code.

    • Dis:

      • Seems slightly odd to repeat the technology name in the SE module location: integrations/xxx/xxx.

      • And yet, using base for the lowest-level name does not add much information.

  • Integration, one module

    • Adv: Reduces the number of modules in the system.

    • Dis:

      • Might look slightly odd to have annotations in a module that is usable from a Helidon SE app.

      • CDI behavior of xxx is triggered somewhat indirectly by the app developer declaring a dependency on some other module that has a harder dependency on CDI.