Introduction
Welcome to this in-depth guide on understanding and managing System and Empress Processes in Empress. The knowledge of these processes is crucial for developers to manage an active Empress environment effectively.
System Processes
System processes are handled at a system level and may have configurations set up via bench or some other Empress deployment management tool. The choice of system level services will depend on your deployment architecture and strategy.
* MariaDB/PostgreSQL (Database)
* Redis (Queues for background workers, and Caching)
* NGINX (Reverse Proxy for production deployment)
* Supervisor (Process Management for bench's non containerized production deployment)
MariaDB/PostgreSQL: These are the database solutions that you can choose from. MariaDB or PostgreSQL will store and manage your data.
Redis: Redis is used for maintaining queues for background workers and caching purposes. This helps in managing data effectively and efficiently.
NGINX: NGINX is used as a reverse proxy for production deployment. It helps in handling requests from clients in the network.
Supervisor: Supervisor is used for managing processes in non-containerized production deployment of the bench.
Empress Processes
Empress processes can be triggered manually or via a process manager. These processes are defined in Empress’ codebase and are managed by the same. The following processes are integral to the functioning of Empress:
- WSGI Server
- Redis Worker Processes
- Scheduler Process
WSGI Server
The WSGI Server is responsible for responding to the HTTP requests to Empress. In a development scenario, bench serve
or bench start
start the Werkzeug server. For production setups, Bench uses Gunicorn, which is automatically configured in the supervisor.
bench serve
or
bench start
Redis Worker Processes
Redis Worker Processes execute background jobs in the Empress system. These processes are automatically started when bench start
is run, and for production, they are configured in the supervisor configuration.
bench start
Scheduler Process
The Scheduler Process schedules enqueuing of scheduled jobs in the Empress system. This process is automatically started when bench start
is run, and for production, they are configured in the supervisor configuration.
bench start
Conclusion
Understanding and managing System and Empress Processes are vital for developers working with Empress. These processes ensure the smooth running of your Empress environment. This guide provided a deep dive into these processes, enabling developers to effectively integrate and utilize them in software development and customization.