Saltar al contenido ForoHackers

Backend: start here

Backend
#913 · Ophuscado · · Denunciar

Backend is the part of a system that runs on servers: it receives requests, applies the rules of the application, reads and writes data, and returns an answer. Users never see it, yet it holds the data, enforces the security and has to stay correct and available under load.

Key concepts

  • Request and response: a handler maps a request to an answer; most work is validating input and shaping output.
  • Persistence: a database holds the truth; schemas, indexes and transactions keep it consistent.
  • Authentication and authorisation: who is calling, and what they may do; checked on the server, always.
  • Statelessness and scaling: keep servers interchangeable so you can add more behind a load balancer.
  • Background work: queues and scheduled jobs handle slow or deferred tasks outside the request.

Vocabulary

  • Endpoint: a URL and method that a service answers.
  • Middleware: code that wraps every request, for logging, authentication or limits.
  • ORM: object-relational mapper, a layer between objects and database rows.
  • Cache: a fast store of results that are expensive to recompute.

What to study, in order

  1. Write a small HTTP server in one language, with no framework, that returns JSON.
  2. Connect it to a SQL database; design a schema and write the queries by hand.
  3. Add sign-in with hashed passwords and sessions, and check permissions on every route.
  4. Add validation, error handling and structured logs.
  5. Put a queue and a worker behind it, then load-test and find the first bottleneck.

Related tags

#http #sql #api-design #web-security

Inicia sesión o únete para responder.