Lucee Zero, a lighter Lucee Light (Lamba Friendly)

Lucee Zero is a new smaller Lucee distribution without the admin or docs bundled.

This reduces the jar size by about 2mb and avoids expanding them on install, which makes Lucee initial startup a lot faster, as there is less to deploy.

Why an additional distribution?

  • Firstly backwards compat with existing build pipelines, as you can’t build a full install by adding just extensions, the admin simply isn’t there with Lucee Zero.

  • Secondly Lambas have some size limitations, you only have 50MB, when Lucee deploys, the .lco is extracted into lucee-server/patches and then the lucee-admin.lar and lucee-doc.lar are exracted out into lucee-server/context/context, plus inside the original lucee-zero.jar.

  • So this new distribution saves roughly 6MB of disk space, as there ends up being three copies of these two .lar archives on the filesystem once deployed.

When I run the local build for extensions, it’s about 6-7s faster (Lucee does deploy slower on windows than linux, so YMMV)

LDEV-4558 - A lighter Lucee light, Lucee Zero (no admin or docs)

This will be good for using with Fuseless: Tools for running Serverless CFML Lambda Functions by @pfreitag as smaller and faster is better for Lamdas

Actions · lucee/extension-compress · GitHub runs 4s faster

FYI: The Docs and Admin extensions you see in the admin, only add the required mappings to enable them, the admin is tightly tied to the release and is bundled in the core.lco file (by default)

Here are some examples of using the various Lucee distributions with Lucee script runner (default is 5.4.0.80)

Please support my work on Lucee :slight_smile:

4 Likes

Fantastic! Would I be right in assuming that the cfadmin tags would be unavailable in Lucee zero?

nope, <cfadmin> is still there

2 Likes

Some might want :grinning: to build their own home grown administrator “light”.

1 Like

mv @andreas /naughty/bin

1 Like

Ohhh. I have to give this a try! Micro images all the way!

1 Like

Well, if size is the issue in a Lambda, you could move the “full fat” Lucee to a layer…

Hi folks - I tried swapping this distribution into an existing Fuseless Lambda function but couldn’t get it to work; going to have a fiddle and see if I can get it going but the error on any URL is a “missing lucee-server/Component.cfc”. Any instinctive thoughts? Previously the function was using lucee-light-5.4.0.80 no problem. Thanks!

first, try the 6.0.0.499-SNAPSHOT, we’ve been doing a lot of work recently

hmmm, the correct path is lucee-server/context/context/component.cfc

sounds like the /lucee-server mapping is wrong?should be pointing to{lucee-server}/context/`

can you send me the following files via email to zac@lucee.org?

  • lucee-server/context/logs/out.log
  • lucee-server/context/logs/err.log
  • lucee-server/context/cfConfig.json

Hi @Zackster - so this is running on Lambda (Fuseless) without access to files, all I’ve done is a like-for-like between the release jars and the latest snapshots - both Zero and Light. I’ll send what I’ve got by email :slight_smile:

try 492, I’m bisecting a regression

try 492, I’m bisecting a regression

Same. Emailed you what I’ve got so far though.

I have been investigating over the weekend,

we have two open (inter-related) 6 regressions relating to this

https://luceeserver.atlassian.net/browse/LDEV-4623
https://luceeserver.atlassian.net/browse/LDEV-4620

This is fantastic! I’ve already reworked our build to run with lucee-light or lucee-zero using the jar file with Gradle. Thank you!

What are the chances of getting these as artifacts in the maven repository so we can do something like this in gradle / maven?

implementation("org.lucee:lucee-zero:$luceeVersion")
1 Like

well if cfadmin was a rest api, then you could just host a light admin on cdn also… or in a native wrapped app, and limit access via ip…

add me to the /naughty/bin (also rolled my own ‘thick’ admin for v6.x), so this just gave me a new idea #lo