Skip to content
thebsq Architecture call

Layer 03 · Human + Machine-to-Machine Systems Engineering

Software, Hardware & Machine-to-Machine (M2M) Systems Engineering

An adviser books a consultation in a browser. A partner authorises a purchasing agent to book the same service. The same availability, price and cancellation terms apply to both. We build the software, connected hardware and interfaces that honour either booking and can recover it if a confirmation goes missing.

Engineering for people and autonomous machines

A person who sees two conflicting appointment times picks up the phone. A machine cannot. It needs a defined answer: the offer expired, approval is required, or another slot is free. So an error message is an interface. We specify those outcomes with the people who run the service. The application then gives a person a useful sentence and a machine a stable code, from one version of the business. HTTP already has a format for this. A problem document carries a stable type, a title a person can read and the fields a client needs to recover. RFC 9457, Problem Details for HTTP APIs.

How do you specify a transaction for machines?

Start with one transaction and name its states. A reservation moves through a quote, a short hold, a confirmation, a cancellation and an expiry. Then write down who may move it. An assistant that may read availability has no right to create a hold. An approver may accept a price and still not override capacity.

The lifecycle of a reservationA reservation moves from quote to hold to confirmed to fulfilled. A caller with the reserve scope may place a hold. An approver or a policy confirms it. An ERP acknowledgement marks it fulfilled. A quote expires when its validity ends. A hold expires on a timer, which releases the capacity. A confirmed reservation can be cancelled by an operator or the customer within the agreed terms. Each transition names an actor, a source of truth and a record an operator can find.QuoteHoldConfirmedFulfilledExpiredCancelledhold scope: reserveconfirm approver or policyfulfil ERP acknowledgementvalidity endstimer · capacity releasedoperator or customer, within termsEach transition names an actor, a source of truth and a record an operator can find.
The lifecycle of a reservation. Who may move a transaction, and on whose record.
Inspect nodeValid quote

The quote fixes the terms and validity window for a possible hold. Check the clock at the moment capacity is requested.

Explore diagram8 nodes · 10 connectionsMermaid

Why do integrations fail?

Most integration defects we meet are missing states, not wrong code. A system that knows only "booked" and "cancelled" sells the last slot twice, because nothing represents the minute in between. A system without "expired" leaks capacity. Each abandoned checkout keeps a slot that nobody will use. Draw the lifecycle first. The data model, the permissions and the test cases all fall out of it.

Give the person who handles an exception enough to decide. A failed reservation shows the requested service, the last known state and the point where confirmation stopped. Staff can then offer another slot or reconcile a late acknowledgement. A screen that says "something went wrong" makes them rebuild the history from the customer.

Commercial M2M and agentic discovery

Where does Generative Engine Optimization start?

Generative Engine Optimization starts with facts an independent buyer can verify. A catalogue needs stable identities for the supplier, the product family, the variant and the current offer. Each variant needs its units, eligibility, service region and date. If a device ships with two connectors, an agent must tell the variants apart before it requests a quote. The page a person reads must resolve the same distinction.

We bring 15 years of search engineering, market intelligence and MarTech to that work. The product owner supplies the authoritative description. Commercial operations owns availability and terms. Engineering keeps the publication paths consistent: the page, the structured data, the feed and the documentation are views of one maintained fact. When a model quotes an old brochure, the canonical source gives the buyer a dated, attributable claim to check.

The standards exist. Schema.org supplies the vocabulary for products, variants and offers. A robots policy decides which crawlers may read them. An llms.txt file points an assistant at the pages that matter. One rule keeps the catalogue honest: never publish a stronger claim in markup than on the page a person reads.

What is the evidence for GEO?

Evidence for this approach is early and worth reading with care. A 2024 study measured visibility gains of up to 40% in generative engine answers after content changes, and found that the effect varied by domain. GEO: Generative Engine Optimization. We read that as a reason to test each catalogue, not as a recipe. Our research blueprint follows one machine-led purchase end to end.

Test discovery with the questions a real purchasing team asks. Which device fits the installed interface? Which service ships to this country? Is the integration supported or only planned? Record the question, the date, the cited URL and the offer version. Score visibility and correctness in separate columns. A frequent citation for the wrong variant is a catalogue defect, and more content will amplify it.

Keep public discovery apart from private purchasing rights. An indexable page may describe a service freely. Contract prices, negotiated limits and order history sit behind an authenticated interface. Put an expiry on every quote that can change, and return a fresh quote when conditions move. A cached description must never become a price commitment.

Operational M2M and connected hardware

When does a request become an obligation?

Every platform needs one unambiguous point where a request becomes an obligation. For a booking it is the reservation record that owns capacity. For a purchase it may be an accepted order after a credit check. Fix that point before you connect the website, the ERP, the payment service or an embedded controller. Each integration then receives one authority and no more. A machine caller gets its own identity, a narrow scope and a short-lived credential. A shared key that can read, hold and order is three permissions under one name.

Human and machine reference architectureHuman buyers and search or procurement agents read a public discovery zone over HTTPS, JSON-LD and feeds: product pages with a canonical URL, structured data for entities and offers, and a catalogue feed with variants, units and regions. A cached public fact never commits the supplier; it leads to a fresh, authorised quote in the authenticated transaction zone. There a quote service issues an offer reference with an expiry, a policy and approval component applies limits, roles and holds, and the reservation and order service is the system of record. In the operational M2M zone each adapter holds one authority: a device gateway that authenticates with mutual TLS and may only observe, an ERP adapter fed by an outbox and reconciled daily, and a payment provider called with idempotent requests.Human buyersSearch & procurement agentsPublic discovery · indexable, cacheable, datedProduct pagesHTML with a canonical URLStructured dataJSON-LD entities and offersCatalogue feedvariants, units, regionsAuthenticated · identity, scope, auditQuote serviceoffer reference with expiryReservation & order servicesystem of recordPolicy & approvallimits, roles, holdsOperational M2M · one authority per adapterDevice gatewaymTLS, observe onlyERP adapteroutbox, reconciled dailyPayment provideridempotent requestsHTTPSJSON-LDfeedscached fact → fresh, authorised quoteMQTT · mTLSeventsAPI · request key
Human and machine reference architecture. Three zones, each with its own authority.
Inspect nodePolicy and approval

Check buyer identity, scope, spending limit and expiry before committing any inventory.

Explore diagram8 nodes · 9 connectionsMermaid

Consider a device that reports whether a loading station can take another vehicle. The gateway stamps the observation time, converts the reading to the agreed unit and attaches a device identity. The scheduling service checks freshness before it offers the slot. A buyer may see an estimate from the last reading. Confirmation requires capacity under the booking rules. Lost connectivity then has a defined commercial consequence and a named operator.

How does an agent prove who it is?

A machine caller owes the service three answers: which software calls, on whose behalf, and within which limit. OAuth supplies the pattern. The agent obtains a short-lived token for one audience and one scope. Where it acts for a user or another service, a token exchange records both parties, so the audit log shows the chain of delegation. A token bound to the caller's key is useless to a thief who copies it. The Model Context Protocol builds its authorisation on the same standards. A long-lived shared key answers none of the three questions. RFC 8693, OAuth 2.0 Token Exchange · RFC 9449, Demonstrating Proof of Possession · MCP authorization.

How do you make a retry safe?

Retries are normal operation. A network cannot deliver a message exactly once. It can deliver at least once, and the receiver can make repeats harmless. If the connection drops after the server accepts an order, the caller cannot tell success from failure. HTTP defines which methods are safe to repeat, and a POST is not one of them. RFC 9110, HTTP Semantics. A request key carries that promise instead. The server stores the key with a fingerprint of the request and answers a repeat with the original result. The same key with a different payload is a conflict, not a repeat. The order and its outbound message are written in one transaction, so a confirmed booking still reaches the ERP after the message service recovers.

A lost reply, a safe retrySequence between a caller, an order service, its ledger with an outbox table, and an ERP. One: the caller posts an order with request key K. Two: the service writes the order and its outbound message in one database transaction. Three: the 201 Created reply is lost in transit. Four: the caller times out and retries with the same key. Five: the service finds key K and creates no second order. Six: it returns the original result. Seven: a relay delivers the outbound message to the ERP at least once. Eight: the ERP acknowledgement closes the outbox row. The oldest open row is the figure an operator watches.CallerOrder serviceLedger + outboxERP11POST /orders with request key K22One transaction writes the order and its outbound message33“201 Created” is lost in transit44Timeout. Retry with the same key K55Key K found: no second order66The original result is returned77A relay delivers the message, at least once88The acknowledgement closes the row
A lost reply, a safe retry. Request key plus outbox: one order, one ERP entry.
Inspect nodeOrder and outbox

Two: the service writes the order and its outbound message in one database transaction.

Explore diagram9 nodes · 9 connectionsMermaid

The same rule holds on a factory network. A broker that guarantees delivery at least once will sometimes deliver twice, so the consumer removes duplicates by message identity. The oldest unacknowledged message is the number an operator watches.

Hardware needs a plan for field conditions. Specify how a gateway resumes after power loss, how many readings it can buffer and what it does when its clock drifts. A sequence number per device exposes gaps that a timestamp hides. Separate observation from command authority. Where motion or equipment safety is involved, the protective control is local. A late web response must never be the mechanism that puts equipment into a safe state.

Production standards and acceptance evidence

Engineering and InfoSec agree on review evidence while the design is still cheap to change. A demonstration covers the happy path. A production acceptance also needs an interrupted booking, a withdrawn device identity and a restored data store.

Production standards and evidence for release
ControlEngineering decisionAcceptance evidence
Security by designSeparate discovery, reads, approvals and commandsAccess review and a test of each permitted role
GDPR data residencyMap records, backups, support access and approved EU regionsDocumented locations and processor review
Automated testingExercise ordinary transactions, duplicate requests and delayed responsesRepeatable integration tests with reconciled order counts
Continuous integration and deliveryPromote a versioned release through review and a limited rolloutReproducible build, deployment record and rollback rehearsal
Hardware and software fault toleranceDefine offline behaviour, safe defaults and recovery ownershipBench evidence for loss of power or connectivity and replay
Inspect nodeDefine the release boundary

Name the operation, actor, records, region and physical equipment in scope. Use the same version of the contract for the human interface and the machine client.

Explore diagram13 nodes · 17 connectionsMermaid

What happens when a step fails halfway?

A purchase that touches stock, payment and shipping cannot commit in one database transaction. Model it as a saga, the pattern Garcia-Molina and Salem described in 1987: each step has a compensating step that undoes it. Reserve the stock, then authorise the payment. If the payment fails, release the stock. Two rules keep a saga honest. Every compensation is safe to repeat, because it will be retried as well. And a step without a compensation, such as a shipped parcel or a sent email, goes last.

How do you set a latency budget?

Set a latency budget for the decision, not for the system. A procurement agent accepts a slow catalogue refresh. It needs a fast answer on whether a hold is still valid. Say the answer must arrive within 300 milliseconds for 95 of 100 requests. Then divide that budget between network, policy check and ledger, and trace each part. Carry one trace identifier from the first request to the ERP acknowledgement. An operator can see which component spent the budget and whether a retry is safe.

How do you migrate a live system?

A migration always crosses versions. Add the new field, write old and new together, move the readers, then remove the old one. A previous reader must be able to ignore what it does not know. An order that began before a deployment must stay recognisable after a rollback. Keep a set of older transactions in release tests, so the team meets those failures before customers do.

A small business may need one booking adapter and a reliable catalogue. A manufacturer may also need fleet credentials, staged updates and ERP reconciliation across markets. We can configure an entire organisation to operate autonomously by connecting these transactions. Its leaders decide who may commit stock or spend money. One agent issues the purchase order, another confirms delivery and a finance agent settles the invoice once the records match.

For a company opening a sales channel to external agents, the M2M architecture guide follows the buyer through discovery, a time-limited quote, an authorized order and reconciliation.

Book a Decision Diagnostic