Skip to the content ForoHackers
Log inJoin

Backend: start here

Backend
#3419 · · Quote · Report

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

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply