Blockchain & Cryptocurrency Glossary

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

  • search-icon Clear Definitions
  • search-icon Practical
  • search-icon Technical
  • search-icon Related Terms

Request–Response Model

1 min read
Pronunciation
[ri-kwest re-sponss mod-uhl]
Analogy
Like ordering food at a restaurant by placing an order and waiting for the waiter to bring your meal.
Definition
A communication pattern where a client sends a request to a service and waits synchronously for a response, commonly used in API and oracle interactions.
Key Points Intro
The request–response model underpins synchronous data retrieval in blockchain integrations.
Key Points

Synchronous flow: client blocks until response arrives

Structured messages: predefined request and response schemas

Timeout handling: manages latency and retries

Error codes: standardized failure reasons for diagnostics

Example
A smart contract emits an event to request market data, then reads the returned value in a follow-up transaction once the off-chain service responds.
Technical Deep Dive
Clients emit RequestData events, off-chain relayers listen via WebSocket, call external REST or gRPC services, then invoke contract callbacks with signed responses. Schemas defined in Protobuf or JSON ensure compatibility. Contracts include fallback oracles and retry logic.
Security Warning
Blocking dependencies can stall contract execution and increase gas costs if the external service is slow or unavailable.
Caveat
Synchronous dependencies add complexity and unpredictability to on-chain workflows.

Request–Response Model - Related Articles

No related articles for this term.