Jisuanji kexue (Nov 2021)

SQL Access Framework for Hyperledger Fabric

  • YU Zhi-yong, LIN Li-qiang, CHEN Yan, ZHOU Tian, NI Yi-tao, CHEN Xing

DOI
https://doi.org/10.11896/jsjkx.210100220
Journal volume & issue
Vol. 48, no. 11
pp. 54 – 61

Abstract

Read online

Blockchain technology has the advantages of decentralization,non-tampering,and traceability,and has been widely used in various fields.However,as a cutting-edge technology,blockchain has problems in development and high learning costs,and most developers are more familiar with application development methods based on relational databases,that is operating relational databases through SQL.Hyperledger Fabric is the most mainstream blockchain development framework.In response to this pro-blem,the article proposes a SQL access framework for Hyperledger Fabric.First of all,in view of the inconsistency of the underlying storage structure of Fabric and SQL,the conversion rules from relational model to key-value model are defined and implemented the model conversion algorithm.Second,the SQL execution contract is developed based on smart contract technology,which realizes the automatic transformation from SQL statement to CouchDB operation statement,and then operates the under-lying data of Fabric.Finally,from the perspective of application layer development,an application automation refactoring tool is designed.The tool consists of two parts,including the application refactoring tool and the blockchain.Fabric-Driver is an interactive middleware for the network.The experimental results show that compared with the existing scheme,using the proposed framework to develop blockchain applications can save about 82% of the time,the reading and writing performance of using this framework is less than 5%.

Keywords