Skip to main content
INDEPENDENT RESEARCH · LWC · SEARCH & HYDRATIONTier 1 Flagship

Multi-Site Quoting Without Leaving the CRM

“Compress the payload. Move computation to the data. Hydrate only what the eye can see.”

The companion to the catalog-engine research: what the quoting experience feels like when payloads are small and results arrive targeted.

LWCGZIPOBJECT STORAGERUSTTYPESCRIPT

Executive BriefHigh-Volume
Domain / ScopeHigh-Volume Platform Architecture
Architectural RoleIndependent Architect & Builder
Timeline & InitiativeIndependent research · 2025–2026
Key Verified Invariant

Quoting stays in the native component across tested fixtures - no portal redirect in the flow

01 · The Constraint

What Made the Problem Difficult

Independent work on generated fixtures. Multi-site quoting is a good stress case because it combines three pains at once: many locations, many attributes per location, and users who refuse to leave the CRM to do the work. I built a synthetic version of that problem to test one claim - that a native component can stay native if it never holds the whole dataset.

Core Platform Constraint

Systemic Friction

What breaks when the dataset outgrows the component: transferring full payloads freezes the UI thread, holding everything in memory exhausts the tab, and paging through a server per keystroke feels sluggish. The temptation is an external portal - which users experience as abandonment.

Boundary Invariants & Operational Limits:
  • !Quoting stays inside the CRM component - no portal redirect
  • !No tab crashes or multi-second freezes on large fixtures
  • !Respect sandbox transport limits and security boundaries
  • !Search across locations and attributes must feel instant
02 · The Architecture

What System Was Designed

Compress on the way in, index outside the render path, hydrate incrementally. The component loads Pako from static resources and works in array buffers, not JSON strings. An async transport layer pages compressed chunks; the Rust indexer handles heavy scans while the TypeScript engine answers interactive refinements in memory. Only the visible slice - ranked IDs plus display fields - reaches the DOM.

03 · The Key Decision

Pivotal Architectural Choices

Key Architectural Decisions

ADR // 01DETERMINISTIC CHOICE

Client-side gzip vs. moving quoting off-platform

Context:

The industry default for oversized payloads is an external app. Users hate the context switch.

Alternatives Evaluated:
  • Standalone external quoting app
  • Dozens of paged server queries per interaction
  • Uncompressed batched polling
Chosen: In-browser gzip via static resources with a compressed transport layer.

Keeps reps in the workflow they know while cutting wire bytes dramatically on repetitive catalog data.

ADR // 02DETERMINISTIC CHOICE

Two engines with distinct jobs vs. one store doing everything

Context:

Bulk indexing and interactive refinement stress different resources.

Alternatives Evaluated:
  • One monolithic query path
  • Pure client-side array scans
Chosen: Rust indexer for heavy scans plus TypeScript engine for in-memory refinement.

Each does what it is good at. A small router sends bulk scans one way and keystroke refinements the other, over a shared contract.

04 · The Engineering

What Was Actually Built

01

Loaded Pako as a static resource and kept payloads as array buffers end to end - no JSON string round-trips.

02

Chunked ingest with cooperative yielding so decompression never blocks input handling.

03

Built the transport as a thin chunking and orchestration layer over object storage - no database, no session affinity.

04

Used the Rust indexer for high-cardinality scans and json-query-lite in memory for refinements and ranking.

05

Rendered incrementally: the component holds result IDs and hydrates display rows for the viewport only.

06

Kept a shared record contract between engines so either can answer a query class without the UI caring.

05 · The Trade-offs

Deliberate Architectural Compromises

Trade-offs & Mitigations

⚖Decompression CPU vs. transfer time

Architectural Benefit:

Far fewer bytes cross the network; payload caps stop biting.

Associated Cost:

The client spends cycles expanding gzip.

Mitigation Strategy:

Chunked, yielded decompression scheduled around input frames.

⚖Two-language stack vs. one

Architectural Benefit:

Bulk throughput plus UI agility.

Associated Cost:

Two toolchains to govern.

Mitigation Strategy:

One record contract and one query grammar shared by both engines.

06 · The Result

Verified Outcomes

✓ VERIFIED RESULT

Quoting stays in the native component across tested fixtures - no portal redirect in the flow

✓ VERIFIED RESULT

Wire bytes fall sharply on repetitive catalog fixtures versus uncompressed JSON

✓ VERIFIED RESULT

Interactive refinements answer from memory without a server round-trip

✓ VERIFIED RESULT

Render cost stays flat via viewport hydration regardless of result-set size

07 · Architecture Blueprint

System Schematic & Data Flow

System Topology Blueprint
High-Volume Quoting & Targeted Hydration
INTERACTIVE SCHEMATIC
SALESFORCE PLATFORM BOUNDARY · NATIVE EXPERIENCENative LWC Quoting UIpako Gzip Compression CoreIncremental Row Hydrationcompressed payload stream (gzip)AWS SUPPORTING TRANSPORT & ORCHESTRATION LAYERStream Ingestion, Multi-Site Chunking & Workload DistributionSEARCH ENGINE A · HEAVY INDEXINGRust Search EngineHigh-throughput location index & spatial searchSEARCH ENGINE B · DYNAMIC EVALUATIONTypeScript Search EngineAgile in-memory filtering & rule evaluationtargeted minimal result set
PRESERVED NATIVE UXSales and operations stay inside native Salesforce LWC without external portal redirects.
CLIENT-SIDE GZIPPayloads compressed via pako in browser memory before network transit.
TARGETED HYDRATIONOnly resolved, minimal records return to the DOM, shielding UI thread from memory freezes.

Compressed chunks travel once; engines answer locally; the component renders only the visible slice.

Text alternative for screen readers: Architecture flow: Native Component UI to Gzip Transport via Compressed Chunk Ingest; Gzip Transport to Object Storage Layer via Chunked Binary Stream; Object Storage Layer to Rust & TS Engines via Indexed Search & Refine; Rust & TS Engines to Native Component UX via Viewport Hydration

08 · Why It Matters

Architectural Conclusion

“A native experience survives scale when the component stops carrying the dataset and starts carrying answers.”

Key Lessons for Platform Scale:
  • •Decide where bytes rest, where they move, and where they compute - in that order.
  • •Static resources plus disciplined buffers take a CRM component surprisingly far.