A product drop is a whole storefront experience. Shoppers load pages, browse products, and watch availability change while a smaller number compete to buy the last units. Harper can run those parts of the application together, from page delivery and live inventory updates to the coordinated stock decision at checkout. This architecture focuses on that final decision within a larger regional storefront, with the same pattern applying to flash sales and ticket allocations.
One storefront, with a coordinated decision at checkout
Multiple Harper nodes serve the application across regions, with Harper Fabric managing deployment and replication. The application can deliver storefront pages and HTTP APIs, read catalog, and availability data, and push stock updates to connected shoppers over WebSockets. Checkout is another part of that application, using the same platform and inventory records.
These activities need different rules. Many people can browse a product and receive availability updates at once. Buying the final unit requires one accepted claim across participating nodes. Harper 5.4 cluster-wide record locks let the checkout handler lock the stock record, check what remains, and save the reservation before releasing the lock. A competing checkout arriving through another region must follow the same coordination path. The lock applies to the relevant record, not the whole storefront.
For individually allocated inventory, the claim identifies a unit and its order reference. For a stock pool, the application checks the remaining quantity and saves the reduction together with the reservation decision. An ordinary concurrent decrement does not enforce a stock floor. Saved inventory changes can feed the live storefront, but a displayed stock count is not a reservation. Checkout still checks the authoritative allocation.
Regional nodes bring page delivery, application handling, and live connections closer to shoppers. An exclusive stock claim can still require coordination between nodes. This design assumes Harper owns the sellable allocation. If another commerce platform owns stock, its reservation API remains the final authority. Payments and fulfillment remain integrations with the broader commerce system.
Alternatively, connect storefront services to a transactional database
A conventional storefront can serve pages through a CDN, run HTTP and WebSocket connections in an application service, and store catalog, stock, and reservation records in PostgreSQL. The checkout handler uses a transaction, row lock, and appropriate constraints to record the reservation and stock change before acknowledging success. The application then delivers availability updates to connected shoppers.
A central deployment is a credible starting point. Regional application servers can connect to its inventory authority, and larger deployments may add messaging to distribute updates among servers. A separate message broker is not required for every storefront. Payment processing and fulfillment remain external integrations in both designs.
Two kinds of demand during the same release
A release creates broad demand for pages and live updates, alongside concentrated competition for scarce stock. Adding regional capacity helps serve shoppers, but does not make the last unit an independent decision in every region. A central database can add network travel to distant checkouts. Regional inventory authorities require partitioned allocations or coordination. Both designs must handle contention and uncertain payment outcomes. Harper brings storefront logic, live connections, records, and supported lock coordination into the same platform, reducing the service boundaries around this part of the application.
Why Harper matters
- Extend the storefront you already run. Page delivery, APIs, live inventory updates, and stock claims can share Harper. Exclusive inventory handling becomes another application capability.
- Serve many shoppers while deciding one claim. Browsing and subscriptions support the wider audience while checkout coordinates changes to the contested stock record.
- Keep the order promise tied to a saved decision. Participating checkout paths record the accepted reservation before confirming it, even when buyers arrive through different regional nodes.
Plan for contention and unfinished orders
Use a supported RocksDB deployment with cluster record locking enabled and a valid cluster configuration. Treat lock refusals as a retry or unavailable result, never permission to sell from an unchecked copy. Every inventory-changing path, including cancellations and administrative adjustments, must follow the same coordination rules.
Save a request identity so retries return the existing reservation. If payment needs time, save a business hold deadline and release the short database lock. Confirm or release under a fresh lock, checking the current owner and deadline. Keep provider calls outside the lock and reconcile uncertain results before charging again. A cart spanning several stock records needs ordered locking and a suitable transaction or recoverable workflow.
One heavily contested quantity record can become a bottleneck. Test the expected burst, set bounded retries, and consider preallocated stock partitions when the business can tolerate them. Show customers a clear sold-out or pending result. A timeout alone does not prove that the order failed.
Treat live availability as guidance until checkout confirms a reservation. Updates may arrive late, and reconnecting shoppers may need a fresh inventory view. Make pending, sold-out, and confirmed states clear in the storefront.
Related resources
- Harper 5.4 release notes: lock handoff and expired-lease behavior relevant to a busy product release.
- Cluster record locks: supported storage and coordination requirements.
- PostgreSQL locking: the conventional transaction boundary for competing buyers.
Start with one controlled release
Pilot one allocation with shoppers arriving through multiple regions. Run page requests and live inventory subscriptions alongside simultaneous claims on the final unit. Test repeated checkout requests, reconnecting shoppers, delayed payments, and a lost response after a successful save. Track oversells, completed orders, page response times, update delays, lock waits, and unresolved payment attempts. Bring the allocation owner and expected release pattern to a Harper architecture discussion.





