# A Reliable Publish-Subscribe Mechanism for Internet of Things-Enabled Smart Greenhouses
## 4 Performance Evaluation
### Result  
Within this particular section, we undertake an examination of the effects brought about by the traditional pub-sub broker messaging system. This analysis is conducted via the consideration of many noteworthy characteristics, and subsequently, we proceed to describe the performance of our proposed message system. This study aims to illustrate the findings obtained from the evaluation of non-scalable and scalable brokers, namely, Mosquito 1.4.15, Bevywise MQTT Route 2.0, ActiveMQ 5.15.8, and EMQ X 4.0.8. The assessment is conducted on both the original and proposed designs. Subsequently, a comparative analysis is presented. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline  & \multicolumn{8}{c}{**The Number of Events = 4, QoS2**} \\ \hline \multirow{3}{*}{**MQTT Brokers**} & **Original** & **Proposed** & **Original** & **Proposed** & **Proposed** & **Original** & **Proposed** & **Original** & **Proposed** \\  & **Mosquito** & **Mosquito** & **Bevywise** & **Bevywise** & **ActiveMQ** & **ActiveMQ** & **EMQ X** & **EMQX** \\  & **1.4.15** & **1.4.15** & **MQTT** & **MQTT** & **S.15.8** & **S.15.8** & **S.15.8** & **S.15.8** & **S.15.8** & **S.15.8** \\ \hline \multirow{3}{*}{\begin{tabular}{c} Message arrival rate (msgs/s) \\ \end{tabular} } & \multirow{3}{*}{6585.00} & \multirow{3}{*}{6585.00} & \multirow{3}{*}{2649.00} & \multirow{3}{*}{2649.00} & \multirow{3}{*}{10,585.00} & \multirow{3}{*}{10,585.00} & \multirow{3}{*}{2627.31} & \multirow{3}{*}{2627.31} \\  & & & & & & & & \\ \hline \multirow{3}{*}{\begin{tabular}{c} Message size (bytes) \\ \end{tabular} } & \multirow{3}{*}{100} & \multirow{3}{*}{20} & \multirow{3}{*}{100} & \multirow{3}{*}{20} & \multirow{3}{*}{100} & \multirow{3}{*}{20} & \multirow{3}{*}{100} & \multirow{3}{*}{20} \\  & & & & & & & & \\ \hline \multirow{3}{*}{\begin{tabular}{c} The number \\ of messages \\ \end{tabular} } & \multirow{3}{*}{65.85} & \multirow{3}{*}{329.25} & \multirow{3}{*}{26.49} & \multirow{3}{*}{132.45} & \multirow{3}{*}{105.85} & \multirow{3}{*}{529.25} & \multirow{3}{*}{26.2731} & \multirow{3}{*}{131.3655} \\  & & & & & & & \\ \hline \multirow{3}{*}{\begin{tabular}{c} Message processing \\ time (s) \\ \end{tabular} } & \multirow{3}{*}{16.4625} & \multirow{3}{*}{82.3125} & \multirow{3}{*}{6.6225} & \multirow{3}{*}{33.1125} & \multirow{3}{*}{26.4625} & \multirow{3}{*}{132.3125} & \multirow{3}{*}{6.568} & \multirow{3}{*}{32.841} \\  & & & & & & & \\ \hline \multirow{3}{*}{\
\begin{tabular}{c} Average latency \\ (in ms) \\ \end{tabular} } & \multirow{3}{*}{1.38} & \multirow{3}{*}{1.38} & \multirow{3}{*}{1.53} & \multirow{3}{*}{1.53} & \multirow{3}{*}{2.14} & \multirow{3}{*}{2.14} & \multirow{3}{*}{3.68} & \multirow{3}{*}{3.68} \\  & & & & & & & \\ \hline \multirow{3}{*}{
\begin{tabular}{c} Subscription \\ throughput (msgs/s) \\ \end{tabular} } & \multirow{3}{*}{47.717} & \multirow{3}{*}{238.58} & \multirow{3}{*}{17.313} & \multirow{3}{*}{86.568} & \multirow{3}{*}{49.462} & \multirow{3}{*}{247.313} & \multirow{3}{*}{7.1394} & \multirow{3}{*}{35.6971} \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Evaluation results for scalable and non-scalable MQTT brokers with various message arrival rates and average latency for QoS2. The brokers' performance is analyzed based on the previous calculations using four indicators:  
* The rate at which messages are sent from the client to the broker per second is compared between the original and suggested broker systems. * The measurement of the aggregate number of bytes sent during a given message exchange serves as a metric for evaluating the size of the message. * The calculation of message processing time in four events occurring between the client and the brokers serves as an indication of the extent to which events are covered inside the greenhouse environment. * The estimation of subscription throughput in MQTT brokers is a crucial indicator utilized to determine the efficiency of message transmission to subscribers.