Claim Check + Semaphore-Based Queuing: A Fault-Tolerant Pattern for Distributed OCR/LLM Inference without Managed Infrastructure

preprint OA: closed
Full text JSON View at publisher

Abstract

Abstract (CCSQI) pattern: a formally specified, production-validated architecture for fault-tolerant GPU inference that replaces \$1,480--\$2,100/month of managed cloud infrastructure with five open-source components on commodity hardware. The pattern targets \emph{temporally decoupled} workloads — systems where producers and consumers operate in separate time windows and the SLA is completeness before a deadline, not real-time latency. For this workload class, reactive autoscaling solves a problem the architecture does not generate. and \texttt{asyncio.shield} produce deadlock under 30+ concurrent tasks with no exception and no log entry. The resolution follows from the actor model~\cite{hewitt1973}: liveness belongs to the broker, exclusion belongs to the semaphore. We additionally prove that a six-operation pipeline has exactly four structurally reachable failure modes, three automatically repairable and one preventable by operation ordering. The pattern is validated over 90 days, 4,000 documents, 24 classification types, with zero document loss and \$0 recurring infrastructure cost.
Full text 9,584 characters · extracted from preprint-html · click to expand
Claim Check + Semaphore-Based Queuing: A Fault-Tolerant Pattern for Distributed OCR/LLM Inference without Managed Infrastructure | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Claim Check + Semaphore-Based Queuing: A Fault-Tolerant Pattern for Distributed OCR/LLM Inference without Managed Infrastructure Alejandro Jaime This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-8960646/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract (CCSQI) pattern: a formally specified, production-validated architecture for fault-tolerant GPU inference that replaces $1,480--$2,100/month of managed cloud infrastructure with five open-source components on commodity hardware. The pattern targets \emph{temporally decoupled} workloads — systems where producers and consumers operate in separate time windows and the SLA is completeness before a deadline, not real-time latency. For this workload class, reactive autoscaling solves a problem the architecture does not generate. and \texttt{asyncio.shield} produce deadlock under 30+ concurrent tasks with no exception and no log entry. The resolution follows from the actor model~\cite{hewitt1973}: liveness belongs to the broker, exclusion belongs to the semaphore. We additionally prove that a six-operation pipeline has exactly four structurally reachable failure modes, three automatically repairable and one preventable by operation ordering. The pattern is validated over 90 days, 4,000 documents, 24 classification types, with zero document loss and $0 recurring infrastructure cost. asyncio race condition GPU inference temporal decoupling actor model claim check pattern fault-tolerant pipeline distributed systems fault tolerance Full Text Additional Declarations No competing interests reported. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-8960646","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":598682499,"identity":"2f638f5c-4804-4a30-8a5f-d71170f58cde","order_by":0,"name":"Alejandro Jaime","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAABFUlEQVRIie2PMUvEMBTHHxTapdL15LD9BMILBVFO+jGcUwLN0uNudCwUOukHkA5+BQ8hOAYyuPgFxOW6uAkdvUE0bcRBTF0F8wvkveH98s8DcDj+IgEAAnhDS/WBeOjkdkrxvinpqNBflK97IK+MbSeqPbne3S1WEUDXd+Upvz5TnU7J4sPqZ2WmfEouH/jJVQVslotiuXkqUCssPZKWGBUi7jUKUQLVilpuWjooMhcWJVFRT96Mwl5z8c5Jy/tJBVUI6WdKoVMkTebldApRPqYHDcf9GorjXDByMy/XkqJ9l/i+fiYvzQKj4II97kSWJC2/7fvzLLauD+DjWLyQmq+Ok2gdH2e3pgbm1aSanHY4HI5/yAc0NGCPFlvEwgAAAABJRU5ErkJggg==","orcid":"","institution":"National University of La Plata","correspondingAuthor":true,"prefix":"","firstName":"Alejandro","middleName":"","lastName":"Jaime","suffix":""}],"badges":[],"createdAt":"2026-02-24 19:38:41","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-8960646/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-8960646/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":107488674,"identity":"590d1110-73f8-4e6f-8668-a08ef7ec8e19","added_by":"auto","created_at":"2026-04-22 02:45:31","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":287869,"visible":true,"origin":"","legend":"","description":"","filename":"ccsqilncsv1.pdf","url":"https://assets-eu.researchsquare.com/files/rs-8960646/v1_covered_3ef1cce1-7441-447a-95b8-aad4b85ebdda.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"Claim Check + Semaphore-Based Queuing: A Fault-Tolerant\nPattern for Distributed OCR/LLM Inference without Managed\nInfrastructure","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":true,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":true,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"asyncio race condition, GPU inference, temporal decoupling, actor model, claim check pattern, fault-tolerant pipeline, distributed systems, fault tolerance","lastPublishedDoi":"10.21203/rs.3.rs-8960646/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-8960646/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"(CCSQI) pattern: a formally specified, production-validated\narchitecture for fault-tolerant GPU inference that replaces\n\\$1,480--\\$2,100/month of managed cloud infrastructure with\nfive open-source components on commodity hardware. The pattern\ntargets \\emph{temporally decoupled} workloads — systems where\nproducers and consumers operate in separate time windows and\nthe SLA is completeness before a deadline, not real-time\nlatency. For this workload class, reactive autoscaling solves\na problem the architecture does not generate.\nand \\texttt{asyncio.shield} produce deadlock under 30+ concurrent\ntasks with no exception and no log entry. The resolution\nfollows from the actor model~\\cite{hewitt1973}: liveness\nbelongs to the broker, exclusion belongs to the semaphore.\nWe additionally prove that a six-operation pipeline has\nexactly four structurally reachable failure modes, three\nautomatically repairable and one preventable by operation\nordering. The pattern is validated over 90 days, 4,000\ndocuments, 24 classification types, with zero document loss\nand \\$0 recurring infrastructure cost.","manuscriptTitle":"Claim Check + Semaphore-Based Queuing: A Fault-Tolerant\nPattern for Distributed OCR/LLM Inference without Managed\nInfrastructure","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2026-03-03 05:22:49","doi":"10.21203/rs.3.rs-8960646/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"475ff465-9384-46c5-948e-312a081e4678","owner":[],"postedDate":"March 3rd, 2026","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[],"tags":[],"updatedAt":"2026-04-21T02:25:00+00:00","versionOfRecord":[],"versionCreatedAt":"2026-03-03 05:22:49","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-8960646","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-8960646","identity":"rs-8960646","version":["v1"]},"buildId":"XKTyCvWXoU3ODBz1xrDgd","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}

Text is read by the "Ask this paper" AI Q&A widget below. Extraction quality varies by source — PMC NXML preserves structure cleanly, OA-HTML may include some navigation residue, and OA-PDF can have broken hyphenation. The publisher copy (via DOI) is the canonical version.

My notes (saved in your browser only)

Ask this paper AI returns verbatim quotes from the full text · source: preprint-html

Answers must be backed by verbatim quotes from this paper's full text. Hallucinated quotes are dropped automatically; if no verbatim passage answers the question, we say so. How this works

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2026) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.

Source provenance

europepmc
last seen: 2026-05-20T01:45:00.602351+00:00