In this paper, we propose a data sharing scheme using blockchain in distributed systems. Currently, various communication techniques are used in distributed systems. Among them, DDS middleware, which is a data-centric structure, can transmit and receive data of various heterogeneous sensors and devices. Data transmission/reception using DDS can be defined as DB and data sharing technique that matches table structure can improve data transmission/reception efficiency. In addition, redundancy data synchronization is possible using a data sharing technique, and communication within each node is performed by sharing data rather than DDS, thereby reducing communication traffic. Using all of these data sharing techniques to store all the shared data on the blockchain can increase the time required for data sharing, but improves reliability by storing the data in an encrypted blockchain when attacked from outside.