spring-cloud-function icon indicating copy to clipboard operation
spring-cloud-function copied to clipboard

Different packaging formats for Spring Cloud Functions

Open saturnism opened this issue 5 years ago • 3 comments

Is your feature request related to a problem? Please describe. For functions running on Cloud platforms, e.g. GCF, function package (JAR) is expected to contain a cloud-specific handler (e.g., HttpFunction) in the standard JAR format. A Main Class is not required, since the runtime is usually provides the main class.

Describe the solution you'd like Explore a custom LayoutFactory for Spring Boot plugin so that we don't need to use the Shade plugin, and/or introducing conflicts w/ Shade plugin.

However, Spring Boot layouts usually have nested JARs. This can introduce startup time hit more so than Shaded JAR.

Describe alternatives you've considered This is exploratory discussion. I have made a POC LayoutFactory for GCF. However, there are potentially introducing the initial overhead + the Spring Cloud Function's AbstractSpringFunctionAdapterInitializer may be initializing again.

Additional context

saturnism avatar Apr 09 '20 19:04 saturnism

/cc @meltsufin @olegz

saturnism avatar Apr 09 '20 19:04 saturnism

An example of this here: https://github.com/saturnism/gcf-layout-poc

saturnism avatar Apr 10 '20 16:04 saturnism

@olegz Please close, as not planned.

elefeint avatar Aug 04 '22 13:08 elefeint