Stride

Engineering case study / Fuel automation

Fuel operations, from permission to proof.

A connected operations platform for vehicle authorization, dispensing records, tank telemetry and stock reconciliation.

Operational softwareIoT & telemetryHistorical AWS architecture
Fuel control becomes difficult when permission to dispense, the device transaction and the stock report each tell a different story. Stride, an application delivery company based in Ahmedabad, presents a source-grounded engineering case study of the Callcomm platform: the workflows, backend boundaries and recovery paths behind a useful operations system. Examples are synthetic. Architecture status is labelled per diagram; no live demo, downloadable report or measured business outcome is represented.

The business problem

A multi-site fuel operator needs to answer practical questions before and after every dispense: is this vehicle allowed to use this dispenser, which site owns the transaction, and why did the tank balance change? A spreadsheet can record a quantity, but cannot reliably enforce an active RFID mapping at the device boundary. A dashboard can show a number, but without source timestamps it can make yesterday’s tank reading look current.

The platform brings clients, sites, vehicles, tanks, dispensers and RFID inventory into one controlled workflow. Operational history matters as much as the current state: replacing a tag must preserve the old assignment, deactivating a vehicle must close its active mapping, and disabling a client must retain its records. The business problem is therefore a combination of access control, physical stock accounting and evidence that an operator can inspect.

Delivery scope & application boundaries

The source spans a FastAPI backend, SQLAlchemy and Alembic persistence, PostgreSQL, a Next.js operations interface, device APIs, a TCP console receiver and AWS telemetry components. The application delivery scope connects onboarding, site and asset administration, RFID lifecycle, vehicle-to-dispenser authorization, transaction capture, stock views and reporting. These are connected application responsibilities rather than an isolated dashboard design.

Client and site boundaries shape the UI and backend together. An administrator needs a usable authorization matrix; the server still has to validate the vehicle, its active tag mapping and dispenser access independently. RFID mapping and unmapping events form an audit trail. Vehicle deactivation releases an active tag back to inventory, while client deactivation preserves operational history. These rules make lifecycle changes predictable for the people maintaining sites.

Backend implementation: two kinds of truth

Dispensing authorization and tank telemetry answer different questions. The device authorization path requires a non-empty vehicle RFID, an active vehicle mapping and an open dispenser grant. Transaction handling must keep device retries from creating repeated stock deductions. The source includes dedicated transaction-idempotency and validation-logging tests; this report identifies those checks as implementation evidence, without presenting them as a newly executed acceptance run.

The telemetry path receives valid console RUNDATA over TCP, places it in a durable local outbox and publishes it to SQS FIFO using station-based ordering. An ingestion Lambda resolves an active site and tank from station code plus tank number. It writes raw and parsed evidence to immutable S3 staging before applying the reading to PostgreSQL. If archival storage fails, the message must remain recoverable rather than silently advancing the current stock view.

A sensor volume is an absolute level, not another dispense quantity. Freshness checks prevent old or duplicate observations from moving the latest level backwards. Current-stock source and timestamp precedence also matter when manual entries and telemetry meet. Compaction produces deterministic daily JSONL history; separate movement processing interprets that history. Replaying evidence must not casually overwrite manual movements or apply historical deductions a second time.

Historical architecture & a separate AWS reference

The first diagram reconstructs the documented AWS topology: an EC2 application host, a private EC2 PostgreSQL host and the SQS/Lambda/S3 telemetry flow. It is historical source evidence, not an assertion that these resources are currently running. Retired / disabled path: legacy consolidation is explicitly disabled in the interval-visibility release notes; it is excluded from the primary flow below. Raw ingestion and archive processing are distinct from that retired path.

Fuel automation — source architectureHistorical source reconstruction.Fuel automation — source architectureSOURCE-BACKED • Repository snapshot, not live infrastructure verificationEC2 applicationOperations UI + FastAPIDevice authorization + TCPDurable receiver outboxValidated console RUNDATAPublish; retain until ackAmazon SQS FIFOStation-ordered telemetryRetryable ingestion inputAWS Lambda ingestionResolve active site / tankArchive before DB applyAmazon S3 evidenceImmutable JSONL stagingDaily compaction + replayPrivate EC2 PostgreSQLLatest level + stock historyUI reads via applicationArrows show the narrated workflow; boxes group responsibilities, not network boundaries.
Historical source reconstruction. Open editable SVG

The second diagram is a proposed AWS reference for a future delivery. It keeps the durable receiver boundary and moves database responsibility toward managed PostgreSQL. Such a change needs protocol connectivity review, migration rehearsal, backup validation and operational ownership. RDS is a proposal here; the inspected historical infrastructure describes PostgreSQL on a private EC2 host.

Fuel automation — proposed AWS referenceProposed hosting or migration design, separate from the source-backed architecture.Fuel automation — proposed AWS referencePROPOSED REFERENCE • Not a deployed-system claimDevice + web entryProtocol receiver on EC2HTTPS application boundaryDurable receiver outboxKeep accepted input locallyAcknowledge queue publishSQS FIFO + DLQOrdered intake and isolationReplay reviewed failuresLambda ingestionValidate + archive evidenceIdempotent current viewS3 evidence archiveLifecycle policy by contractVersioned replay procedureRDS PostgreSQLManaged data boundaryApp reads; backup rehearsalArrows show the narrated workflow; boxes group responsibilities, not network boundaries.
Proposed hosting or migration design, separate from the source-backed architecture. Open editable SVG

POC walkthrough: a synthetic site

This is a reproducible walkthrough design using fabricated data, not a live demo or a recorded client result. Use a disposable environment with a fictional site, tank, vehicle, RFID and dispenser. Keep device identifiers and customer inventory out of the fixture.

  1. Establish permission. Create the site assets, map a sample RFID to a vehicle and open its dispenser grant. Ask the device API to authorize that pair. Close the grant and repeat; the expected contrast is an explicit denial, with enough validation context for support.
  2. Exercise transaction replay. Submit one synthetic dispense with a stable transaction reference, then send the same request again. Inspect the transaction ledger and stock changes. The acceptance condition is one business deduction, with the duplicate handled consistently.
  3. Send tank evidence. Inject absolute readings of 8,000 and 7,900 litres at successive sample timestamps. Replay the earlier observation after the later one. The latest level should remain 7,900; the fabricated values demonstrate ordering, not measured consumption.
  4. Interrupt and recover. Pause publishing after the receiver writes its outbox, then resume it. Inspect acknowledgement handling, archived evidence and the resulting latest-level record. Compare a repeated archive replay before accepting any rebuilt movement publication.

What the engineering decisions protect

The durable outbox covers the gap between accepting device input and receiving queue acknowledgement. SQS ordering supports a coherent station stream, but does not remove the need for database freshness checks or idempotent application. S3 supplies inspectable source evidence; PostgreSQL supplies the operational view. Separating those roles makes a disputed dashboard number something an engineer can trace rather than guess about.

A useful handover includes fixtures for stale readings, unmapped tanks, revoked permissions and duplicate transactions, together with an archive replay procedure. Retention must be explicit: the telemetry documentation describes daily history with a thirty-day retention policy, so operators cannot assume an unlimited audit archive. The design also keeps alarm and diagnostic console messages outside the tank-level ingestion path unless a separately specified workflow handles them.

Evidence, limits & next delivery

This report is grounded in the local product story, telemetry pipeline, ingestion implementation, infrastructure README and interval-visibility release note. The requested docs/source directory was unavailable; equivalent current documentation and code supplied the evidence. Source inspection establishes intended and implemented behavior, not present uptime, customer adoption, financial savings or production acceptance. No such metrics are claimed.

A next engagement would begin with a supported-device inventory, operational role map and an agreed stock reconciliation policy. Delivery acceptance would follow one end-to-end path from permission through device transaction to ledger and operator view, then deliberately repeat it under interruption. That is the practical boundary between a connected application and a screen that merely displays device data.

Stride / Ahmedabad

Bring the workflow into focus.

Discuss the business process, integration boundaries and acceptance evidence for your next application.

Talk to Stride →