1. REST
REST models the system as resources addressed by URLs and acted on with HTTP verbs like GET, POST, PUT, and DELETE.
rest: resource-http-verbsTyporithm · medium
Step 1 of 8 · intro card
Communication
REST models resources with HTTP verbs, gRPC uses binary protobuf for fast service-to-service calls, and GraphQL lets the client shape the response to avoid over-fetching. Good APIs add versioning for backward compatibility and idempotency so retries are safe.
REST is the default style for public HTTP APIs: it models the world as resources at URLs and uses HTTP verbs (GET, POST, PUT, DELETE) plus status codes. It is simple, cacheable, and human-readable.
gRPC encodes calls as binary protobuf over HTTP/2. It is compact and fast, with generated client stubs and streaming, which makes it a strong fit for internal service-to-service communication where both sides share a schema.
GraphQL exposes a single endpoint where the client writes a query that shapes the exact fields it needs in one round trip, avoiding over-fetching. Across all styles, versioning keeps older clients working and idempotency makes retries safe after a timeout.
REST: resources + HTTP verbs, simple and cacheable.
gRPC: binary protobuf over HTTP/2, fast for internal calls.
GraphQL: client-shaped queries avoid over-fetching.
api:
rest: resource-http-verbs
grpc: binary-protobuf-fast
graphql: client-shaped-query
versioning: backward-compat
idempotency: safe-retriesConnect each part of the code to the concept before you type.
REST models the system as resources addressed by URLs and acted on with HTTP verbs like GET, POST, PUT, and DELETE.
rest: resource-http-verbsgRPC serializes calls as compact binary protobuf over HTTP/2, making it fast and efficient for service-to-service traffic.
grpc: binary-protobuf-fastGraphQL lets the client send one query that shapes the exact fields it wants, avoiding over-fetching and under-fetching.
graphql: client-shaped-queryVersioning lets an API evolve while keeping older clients working, preserving backward compatibility.
versioning: backward-compatAn idempotent endpoint produces the same result no matter how many times it is called, so retries are safe.
idempotency: safe-retriesRead the concept map and follow the code breakdown.
Type the implementation, repair mistakes and work through every recall exercise.
Use the final check without hints; revisit weak concepts in short practice sessions.