# Understand INGInious ## Introduction INGInious is made from three different packages: - **The common:** which contains basic blocks, like *tasks* and *courses*. Derivates from these blocks are created by the frontend and other modules. The common does not need the backend nor the frontend. - **The agent:** this runs jobs. It interacts directly with Docker to start new containers, and send the grades back to the backend. A specific part of the backend is in charge of starting the agents automatically; most of time, you won’t need to configure it manually. The agent needs to be run *on* the Docker host, as it interacts with other containers with Unix sockets, and must also interact with CGroupsto allow a very fine management of timeouts and memory limits. - **The backend:** which is in charge of handling grading requests, giving the work to distant agents; the backend is made to be simple and frontend-agnostic; you can ‘easily’ replace the frontend by something else. The backend only stores information about *running* tasks. This point is important when considering replication and horizontal scalability. - **The frontend:** which is a web interface for the backend. It provides a simple yet powerful interface for students and teachers. It is made to be “stateless”: all its state is stored in DB, allowing to replicate the frontend horizontally. ## Architecture The following schema shows the basic architecture of INGInious: ![](assets/images/image1_understand_inginious.png) Image retrieved [INGInious official documentation](http://inginious.readthedocs.io/en/stable/dev_doc/understand_inginious.html#basic-architecture-of-inginious) ## Containers A *grading container* is a container that do the grading. It typically runs a script made by a teacher or its assistants, a launch sub-containers,called *student containers*, that will separately jail code made by students. A single *grading container* can launch more than one *student container*; the interaction between both is completely secured by the agent.