The engine Lambda is the core rendering component of the Fusion architecture.
This is invoked with a Rendering object containing renderable Components
(in this case, React Components) and associated content, which are then fused
together to generate HTML.
Fusion supports multiple cache modes by writing the resulting HTML to S3. This allows the Fusion origin to either serve the HTML first or as a backup.
AWS DynamoDB is where organization-specific renderings are persistedReact is currently the default renderer for the engine,
but other templating engines, such as handlebars, are supported@arc-fusion/prop-types are custom prop types for FusionIn local development, Mongo is used instead of DynamoDB.
It is run inside a Docker container alongside the engine.
In Production mode, detailed visibility is provided using :
AWS XRay to generate Service Maps and TracesDatadog for custom metricsThe engine Lambda is single-tenant and deployed using Maestro.
Deployment via Maestro will package the front-end Components (known as the
Feature Pack) and the core engine code, which enables Fusion to generate static
HTML.
Fusion has public HTTP endpoints, which are described in the API Documentation.
The following routes are specifically used by the PageBuilder Admin UI.
Configs describe the Components available in the PageBuilder Admin. These routes are read-only and return JSON.
/configs/chains/configs/features/configs/layouts/configs/output-types/configs/content/schemas/configs/content/sourcesResolvers are published from the PageBuilder Admin with a payload that contains
all resolvers. This uploads the JSON to S3, which triggers the resolver-generator
to rebuild the resolver Lambda.
/resolversSite Properties are site-specific values that may be accessed anywhere in the bundle. These are essentially a replacement for Runtime Properties in PageBuilder Classic.
/propertieswebpack is included in the engine Lambda and invoked on a Rendering when it is
published.
This is the deployed directory structure:
/opt/
engine/
bundle/
build/ <-- server-only compiled bundle code
components/
combinations/
output-types/
fusion.json
content/
schemas/
sources/
fusion.json
properties.js
dist/ <-- compiled bundle code for server and client
components/
combinations/
configs/
components/
chains/
features/
layouts/
output-types/
content/
schemas/
sources/
engine/
admin.js
polyfill.js
preview.js
react.js
stats.json <-- webpack stats output (local dev only)
calls.json <-- request tracing output (local dev only)
generated/ <-- dynamically generated src files used as webpack entrypoints
components/
combinations/
properties.js
linked_modules/ <-- dynamically mapped volumes to support `npm link`
node_modules/ <-- bundle modules built in docker image for cache optimization
src/ <-- the actual bundle repo
environment/ <-- environment variables to be read by the Lambda
lib/ <-- fusion engine src
node_modules/ <-- fusion engine modules
src/
index.js <-- entry-point invoked by serverless and AWS Lambda
webpack/ <-- webpack config, executed on Compiler Lambda
stages/
static/ <-- webpack static artifacts (local dev only)
Notes:
/opt to prepare for possible use of lambda layersbuild/ or dist/ under bundle/ to prevent runtime prioritization of bundle modules over engine versionsContent type
Image
Digest
sha256:75a96865e…
Size
261.6 MB
Last updated
about 5 hours ago
docker pull washpost/fusion-engine:latest-canary