# MedChain: Efficient Healthcare Data Sharing via Blockchain
## 5 Evaluations
### Efficiency Analysis
#### 5.2.3 Performance Analysis through Experiments  
For demonstration, a prototype MedChain [42] system is created, which includes a blockchain service module, a directory service module, and a test client. Moreover, WANem [43] is employed to emulate the latency of a wide area network (WAN). For a privacy purpose, no real-life patient medical data is employed in experiments. Instead, the synthetic data is applied (together with the MedChain prototype), which follows the same ECG recording format as in PhysioNet [44; 45]. The parameters of the experiment environment are listed in Table 3 for reference. All involved nodes are simulated on a single machine and connected through the emulated WAN. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Operation** & **MedChain** & **Existing Solutions** \\ \hline Add Data & \((T_{Qb}+T_{Qd}+T_{E}+T_{D}+T_{B}\) & \(T_{E}+T_{D}+T_{B}\) \\ Add Session & \(k\cdots(T_{Qd}+T_{E})+T_{D}+T_{B}\) & \(N/A\) \\ Retrieve Data & \(T_{Qd}+k\cdots(T_{E^{\prime}}+n\cdots(T_{Qb}+T_{D}))\) & \(k\cdots n\cdots(T_{E^{\prime}}+T_{Qb}+T_{D})\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Communication overhead comparison. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Machine Specs & Dell server (CPU: 2.93 GHz quad-core Intel Core i7 870, Cache: 8 \\  & M, RAM: 16 G of 2400 MHz DDR3, OS: Windows 7) \\ Network Latency & 50 ms + Jitter (Normal Distribution) \\ Directory Node Concurrency & 10 tasks \\ Blockchain Node Concurrency & 30 tasks \\ Maximal Block Size & 400 events \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Parameters of the experiment environment. In the experiments, the performance of MedChain is benchmarked against existing models [32; 33; 34] to empirically demonstrate the overhead incurred in different data sharing processes. We summarized their characteristics as the variables in the evaluation. Specifically, existing models only support electronic healthcare records, while MedChain also supports data streams. Thus, in the efficiency comparison related to data types, existing models are labeled by \"Record-based\" and MedChain is labelled by \"Stream-based\". Moreover, existing models store all data descriptions on blockchain, while Medchain separates mutable information storage to directory. In the efficiency comparison related to storage location, existing models are labeled by \"On blockchain\" and MedChain is labelled by \"On directory.\"  
The first experiment studies the communication overhead in data access. Compared with existing blockchain-based solutions, MedChain encodes the digest of data stream into a digest chain. This approach can facilitate the integrity check in data access, since only the last chunk of a stream needs to be extracted from the blockchain in most cases. In contrast, existing schemes have to download all the digests from the blockchain for validating the integrity of each chunk, which brings more communication overhead. The comparison result is shown in Figures 8 and 9. If only the data stream is shared (Figure 8), the existing schemes (marked as record-based) shows more communication overhead than MedChain (marked as stream-based) in responsiveness and bandwidth consumption. Especially, such an advantage becomes evident when a longer data stream needs to be shared. In another scenario, both records and data stream are shared in one session. Without loss of generality, they have the same numbers. As shown in Figure 9a,b, MedChain still performs better over existing schemes, especially with the increase of data quantity. Yet, such an advantage is reduced, because, apart from the data stream, each record file is independent so that sharing different records requires downloading all the digests for integrity check. Figure 9c,d further testifies this effect. However, it also shows the power of MedChain in sharing more data chunks. Second, the storage overhead is studied.