From 0 to HERO in under 10 seconds
With the advent of microservices and Functions-as-a-Service, on-the-spot execution with a fast and predictable startup, automatic up-and-down scaling and low memory utilisation have become the norm for modern web applications. The application size and the footprint of the container image have become increasingly important. In this new world, being able to create small, customised runtimes that can connect to remote services is a necessity.
Based on the Apache Sling Scripting Bundle Tracker (or Apache Sling Scripting Reloaded for those of you who attended adaptTo() in 2018), our talk showcases how precompiled scripts packed in OSGi bundles can be used to deploy a sub-100MB JCR-less Docker based Sling instance that can start rendering remote content sources within seconds after startup. As a somewhat extreme example, the accompanying code demonstrates running Sling on remote file hosting services, which opens interesting perspectives in terms of interoperability, content sharing and cloud-scale operations.
Beyond being a fun demo, our example demonstrates how Sling's modular design enables future evolution. The full source code will be available for you to play with.