Technology
Dyfus II: Modular Gas Station Automation
A distributed, event-driven system architecture for modern gas station operations. From fuel dispenser control to cash register systems to central data processing - fully offline-capable and highly available.
System Overview
Dyfus II is a modern gas station management system consisting of six specialized components. All communication occurs via MQTT (Message Queuing Telemetry Transport), ensuring decoupling, scalability, and fault tolerance.
Component Architecture
DPOS Angular
POS Frontend
BusinessLogicHub
Business Logic
CashRegister
Fiscal Devices
Persistor
Local DB
Replicator
Synchronization
DispensersController
Fuel Pumps
Components in Detail
BusinessLogicHub
Python | MQTT | Firebird SQL
The central orchestrator of the system. Coordinates all business processes: fuel sales, payment processing, inventory management, and shift management.
DPOS Angular
Angular 18 | TypeScript | RxJS | Material Design
The modern Point-of-Sale frontend for cashiers. Real-time display of fuel pump status, article management, customer management, and comprehensive reporting features.
DispensersController
Python | Serial Communication | SK Protocol (RAFCi 3.A)
Communication bridge between POS system and fuel dispenser hardware (RAFCI controller). Controls fuel authorization, monitors fueling operations in real-time, and communicates with tank gauges.
CashRegisterCommunicator
Python | DATECS Protocol | Serial Communication
Middleware for communication with fiscal cash registers (DATECS FP-800, Eltrade). Translates MQTT commands into binary cash register protocol and processes responses.
Persistor
Python | SQLite | MQTT
MQTT-to-SQLite bridge for local data persistence. Enables offline operation through local data storage and synchronizes changes upon reconnection.
Replicator
Python | Firebird | SQLite | MQTT
Bidirectional database replication between central Firebird database and decentralized SQLite stations. Implements ID mapping and three-phase FK processing.
Technology Stack
Backend
-
Py
Python 3.11+
All backend services
-
MQ
MQTT (Mosquitto)
Message Broker
-
FB
Firebird 3/4
Central database
-
SQ
SQLite
Local station DB
Frontend
-
Ng
Angular 18
Standalone Components
-
TS
TypeScript 5.5
Type-safe Development
-
Rx
RxJS
Reactive Programming
-
M3
Material Design
UI Components
Architecture Principles
Event-Driven Architecture
All components communicate via asynchronous events. This enables loose coupling, easy extensibility, and high fault tolerance.
Offline-First
Each station operates autonomously with a local SQLite database. During network issues, operations continue uninterrupted.
Fault Tolerance
Three-tier blocking system protects against inconsistent states. State persistence enables clean recovery after crashes.
Modularity
Each component is independently deployable and updatable. Docker containers enable easy deployment and scaling.
Example: Fueling Transaction
Nozzle is lifted
DispensersController detects event via RAFCI and sends Authorization Request via MQTT
BusinessLogicHub checks authorization
Verification of pump blocks, customer credit, available fuel in reservoir
DPOS shows active fueling
Real-time updates of volume and amount in frontend via MQTT events
Fueling completed
Sale-End event triggers receipt printing and database update
Receipt is printed
CashRegisterCommunicator sends print command to fiscal cash register
Data is replicated
Persistor writes to SQLite, Replicator synchronizes to headquarters
Interested in a Demo?
We'd be happy to show you the Dyfus II system in action and discuss how it can be adapted to your requirements.
Schedule Demo