Architecture
P4FlowForge is developed in Python and based on the Scapy library to facilitate network traffic generation and delay measurement. It operates on a client-server architecture, where the generator (client) creates network traffic based on user-defined protocols, and the receiver (server) captures and analyzes this traffic. This architecture enables users to simulate various network conditions and measure the performance impact on network components.
The P4FlowForge tool embodies a modular architecture that accommodates a variety of communication protocols, reflecting the diversity and complexity of contemporary network environments. This multifaceted architecture is illustrated through two primary modes of operation: a direct client-server model for HTTP, TCP, UDP, and CUSTOM protocols, illustrated in Fig. 1a, and a broker-mediated model for MQTT protocol scenarios, illustrated in Fig. 1b.

In the client-server paradigm, the P4FlowForge Generator functions as the client, initiating traffic and sending packets directly to the P4FlowForge Receiver, which acts as the server. This direct communication model is typical for HTTP, TCP, UDP, and custom-defined protocols through JSON configuration. In this setup, the client encapsulates the data within the standard protocol structure or custom, embedding a timestamp for delay measurement. The packets are then transmitted over the network to the server. Upon reception, the server decodes the packets, extracts the timestamp, and computes the delay, providing immediate and precise feedback on network latency.
The client-server architecture exemplifies a straightforward and efficient approach to traffic generation and latency evaluation, conducive to a wide array of network testing scenarios, from basic connectivity checks to more intricate performance analyses.
For the MQTT protocol, the architecture adapts to incorporate an MQTT broker as an intermediary between the Generator and the Receiver. Both entities connect to the broker, with the generator publishing messages on a specific topic and the receiver subscribing to that same topic. The broker is responsible for delivering messages from the Generator to the Receiver, simulating a publish/subscribe pattern intrinsic to the MQTT protocol operational framework.
This broker-mediated communication is advantageous for testing network systems that rely on the lightweight MQTT messaging system, often employed in IoT (Internet of Things) and M2M (machine-to-machine) communication environments. It allows the assessment of the broker performance, the reliability of message delivery, and the end-to-end delay across the publish/subscribe mechanism.
Last updated