How it works?
The application uses the Node.js runtime - it generates a website with a control panel. Variable page elements are stored in the MySQL database which is replicated between servers. The application is based on the potential of Docker containers, it is run for production in a Kubernetes cluster. To ensure fast implementation of the code, we use the CI/CD (continuous integration and continuous deployment) with GitHub and Docker Hub services.
User page is delivered from the nearest server through Cloudflare. Production machines communicate with each other via WireGuard VPN working in a mesh configuration. Infrastructure is designed for high availability and ability to scale quickly.
Camera video delivery
We use WebRTC and HTTP Live Streaming technologies to deliver camera footage to users. Picture from cameras are delivered to the server with graphics cards. On server, image is processed into different quality streams. OvenMediaEngine software allows us to deliver the live view with the lowest possible delay (usually 2 seconds).
As cameras, we usually use consumer surveillance IP cameras, which are calibrated to ensure the highest possible image quality.
Our entire infrastructure and application are monitored and tested continuously. Availability monitoring is provided by Uptime Kuma, Uptime Robot, Zabbix and LibreNMS. We use Elasticsearch software to monitor application events. Hardware and performance parameters is collected by Zabbix.
Idea of sharing a printer was completely spontaneous. For this task, we wanted to choose a printer that would be as maintenance-free as possible. After reviewing many offers, we chose Epson TM-T88IV printer. This printer supports the ESC / POS standard, so you can "write" to it with using many libraries available on the web.
Our proprietary script, using the DiscordPHP library, is responsible for sending messages from Discord to the printer. An appropriate message is generated and sent to RabbitMQ.
Our proprietary code is also responsible for sending messages from Tipply, which also was handled with RabbitMQ. We use RabbitMQ to queue outgoing messages to the printer. Printer is connected to computer via an RS232 port, which might not keep up with a large amount of messages - this is why we queueing messages.
Items used for this part of the project: