Urgent.News

What's breaking now, across thousands of outlets.

Tech

Building an investing knowledge graph, part 5: what LIVE actually means

Building an investing knowledge graph, part 5: what LIVE actually means Part 4 ended with the resolver working locally and me calling it live on Railway. That framing glossed over a gap. Something running locally and something running in production are different in ways that are obvious in retrospect and invisible until they bite you. Here's what changed once I had a caller that wasn't me. The…

Part 5 explores the meaning of "LIVE" in the context of an investing knowledge graph. When the resolver was first called locally, everything worked fine. However, once an external caller, such as a third-party service, started using the API, new issues arose.

Initially, the error budget was internal and easy to manage since the single caller always handled failures. But when external callers began returning errors, the situation changed. A 500 error response with a generic message appeared for a request that had previously worked in local testing. This was due to the API hitting the registry backend during a mid-write transaction, causing inconsistent data responses.

The issue stemmed from the locally used file-based registry backend, which had no durability problems. The production backend, however, switched to PostgreSQL via Supabase, using transactions to ensure data consistency. Reads now receive a consistent snapshot of the registry, and writes and reads are atomic.

The transition to the new backend was straightforward, as the application logic remained unchanged; only the persistence layer changed. Railway's default zero-downtime deployment handled the deployment process by routing traffic only after the new service passed its healthcheck. This ensured that no request reached the new version before it was completely ready.

The healthcheck endpoint returns a 200 status when both the API and the registry backend are ready to serve requests. This is crucial because startup takes time, and an incorrectly configured healthcheck could route traffic to an instance that's not fully operational, generating confusing errors.

The registry currently holds nearly 48,000 entities and aliases. Most entries are stable, but some are likely incorrect due to the model's permissive threshold during early calibration. To address this, a review layer is in place for pairs scored as probable matches but below a high-confidence threshold. These pairs go into a pending state, requiring review before being added to the stable registry. Current API responses only include stable entries, filtering out any pending pairs.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Order Receipt Delivery: SMS Timeout Retry Idempotency and Status Polling

An order receipt is evidence of a settled payment, so the sending process cannot be allowed to reinterpret the order or quietly render a newer template after a timeout.

  • Order receipt serves as payment proof without altering order or generating new template
  • Persist intent with idempotency key before sending to handle SMS timeout as uncertain outcome
  • Map delivery labels at adapter boundary to avoid leaking into order processing

More from Wednesday 2 September →