<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/resources/xsl/jats-html.xsl"?>
<article article-type="research-article" dtd-version="1.1" xml:lang="ko" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<front>
	<journal-meta>
		<journal-id journal-id-type="publisher-id">jkits</journal-id>
		<journal-title-group>
		<journal-title>한국지식정보기술학회 논문지</journal-title>
		<journal-title xml:lang="en">Journal of Knowledge Information Technology and Systems</journal-title>
		</journal-title-group>
		<issn pub-type="ppub">1975-7700</issn>
		<publisher>
		<publisher-name>한국지식정보기술학회</publisher-name>
		<publisher-name xml:lang="en">Korea Knowledge Information Technology Society</publisher-name>
		</publisher>
	</journal-meta>
	<article-meta>
		<article-id pub-id-type="publisher-id">jkits_2019_14_02_127</article-id>
		<article-id pub-id-type="doi">10.34163/jkits.2019.14.2.003</article-id>
		<article-categories>
			<subj-group>
				<subject>Research Article</subject>
			</subj-group>
		</article-categories>
		<title-group>
			<article-title>온라인 트랜잭션의 투명성 향상을 위한 블록체인 기반 서비스 아키텍쳐</article-title>
			<trans-title-group xml:lang="en">
				<trans-title>A Block Chain based Service Architecture for Improving Transparency of Online Transaction</trans-title>
			</trans-title-group>
		</title-group>
		<contrib-group>
			<contrib contrib-type="author" xlink:type="simple">
				<name-alternatives>
					<name name-style="eastern">
						<surname>김</surname><given-names>철진</given-names>
					</name>
					<name name-style="western" xml:lang="en">
						<surname>Kim</surname><given-names>Chul-Jin</given-names>
					</name>
					</name-alternatives>
					<xref ref-type="fn" rid="fn001"><sup>*</sup></xref>
			</contrib>
				</contrib-group>
		<aff-alternatives id="A1">
			<aff><italic>인하공전 컴퓨터시스템과 교수</italic></aff>
			<aff xml:lang="en"><italic>Dept. of Computer Systems and Engineering, Inha Technical College</italic></aff>
		</aff-alternatives>
			<author-notes>
			<fn id="fn001"><label>*</label><p>Corresponding author is with the Department of
Computer Systems and Engineering, Inha Technical College, 100 Inha-ro Nam-gu Incheon, 22212, KOREA.</p><p><italic>E-mail address</italic>: <email>cjkim@inhatc.ac.kr</email></p></fn>
		</author-notes>
		<pub-date pub-type="ppub">
			<month>4</month>
			<year>2019</year>
		</pub-date>
		<volume>14</volume>
		<issue>2</issue>
		<fpage>127</fpage>
		<lpage>136</lpage>
		<history>
			<date date-type="received">
				<day>22</day>
				<month>1</month>
				<year>2019</year>
			</date>
			<date date-type="rev-recd">
				<day>19</day>
				<month>2</month>
				<year>2019</year>
			</date>
			<date date-type="accepted">
				<day>12</day>
				<month>4</month>
				<year>2019</year>
			</date>
		</history>
		<permissions>
			<copyright-statement>&#x00A9; 2019 KKITS All rights reserved</copyright-statement>
			<copyright-year>2019</copyright-year>
		</permissions>
		<abstract>
			<title>요약</title>
			<p>블록체인 플랫폼 기반으로 다양한 분야에서 신규 시스템 개발 및 연구가 진행되고 있다. 블록체인 기반 신규 시스템 개발은 기존의 중앙집중식 서버 기반에서 탈중앙화 시스템으로의 전환이기 때문에, 기존 시스템을 이용할 수 없으며 신규로 개발해야 한다. 이에 블록체인 기반의 탈중앙화 시스템 개발로 인한 추가 비용과 시간이 소요될 것으로 예상된다. 본 논문에서는 기존 온라인 시스템을 유지하면서 블록체인 기반으로 탈중앙화 하기 위한 방안를 제안한다. 신규로 개발하지 않고 기존 온라인 시스템과 블록체인을 연동하기 위한 아키텍쳐를 제안한다. 블록체인과 기존 온라인 시스템을 연동하므로 기존 온라인 시스템에서 발생하는 트랜잭션 데이터에 대한 투명성을 보장할 수 있다. 본 논문에서는 하이퍼레져 패브릭 기반 블록체인과의 연동을 위해 커넥션 어뎁터를 이용하였으며, 커넥션 어뎁터는 하이퍼레져 패브릭 내의 원장에 트랜잭션 데이터를 저장하고 갱신하기 위한 REST API를 호출한다. 또한 하이퍼레져 패브릭 내의 원장을 관리하는 피어들 간의 체인코드 배포 및 동기화 프로세스를 제안하였다. 사례연구에서는 온라인 쇼핑몰 서비스와 하이퍼레져 패브릭을 연동하여 트랜잭션 데이터의 투명성이 보장될 수 있음을 파악하였다.</p>
		</abstract>
		<trans-abstract xml:lang="en">
			<title>ABSTRACT</title>
			<p>Based on the block chain platform, new systems are being developed and studied in various fields. Since the development of new system based on block chain is a transition from the existing centralized server to the decentralized system, existing systems can not be used and new ones should be developed. Therefore, the development of a decentralization system based on the block chain is expected to take additional time and cost. In this paper, we propose a method to decentralize on the basis of block chain while maintaining existing online system. We propose an architecture for integrating existing online systems and block chains without developing new ones. By integrating the block chain with the existing online system, transparency of the transaction data occurring in the existing online system can be guaranteed. In this paper, we use the connection adapter for interworking with the Hyperledger Fabric based block chain. The connection adapter calls the REST API to store and update the transaction data in the ledger in the Hyperledger Fabric. We also propose a process of distributing and synchronizing chain codes between peers managing the ledger in Hyperledger Fabric. In the case study, we confirmed that transparency of transaction data can be secured by integrating with online shopping mall service and Hyperledger Fabric.</p>
		</trans-abstract>
		<kwd-group kwd-group-type="author" xml:lang="en">
			<kwd>Block chain</kwd>
			<kwd>Hyperledger fabric</kwd>
			<kwd>Connection adapter</kwd>
			<kwd>Transparency</kwd>
			<kwd>Online transaction</kwd>
		</kwd-group>
	</article-meta>
</front>
<body>
<sec id="sec001" sec-type="intro">
	<title>1. 서 론</title>
<p>현재 블록체인(Block Chain) 기술에 대한 연구가 활발하게 진행되고 있으며 온라인 거래, 금용, 사물인터넷, 저작권, 등 다양한 분야에 적용하려고 하고 있다<xref ref-type="bibr" rid="B001">[1]</xref>,<xref ref-type="bibr" rid="B002">[2]</xref>. 특히 온라인 거래와 금융 분야에서 거래의 투명성을 보장할 수 있는 플랫폼으로 관심을 받고 있다. 본 연구에서는 기존 온라인 서비스에서 발생하는 트랜잭션의 투명성을 향상시키고자 온라인 예약이나 계약 등의 서비스에서 발생하는 트랜잭션을 블록체인에서 분산 저장하기 위한 서비스 아키텍쳐를 제안하고자 한다.</p>
<p>본 논문의 구성은 2장에서 본 논문의 기반이 되는 하이퍼레져 패브릭과 관련 응용 연구를 분석하며, 3장은 온라인 트랜잭션의 투명성을 보장하기 위한 아키텍쳐와 처리 프로세스를 제안한다. 4장은 본 연구의 아키텍쳐와 처리 프로세스의 적합성을 검증하기 위한 사례 연구를 수행한다. 5장 결론에서는 향후 연구 방안을 제시한다.</p>
</sec>
<sec id="sec002">
<title>2. 관련연구</title>
<sec id="sec002-1">
<title>2.1 하이퍼레져 패브릭</title>
<p>하이퍼레져 패브릭(Hyperledger Fabric)<xref ref-type="bibr" rid="B003">[3]</xref>,<xref ref-type="bibr" rid="B004">[4]</xref>은 오픈 소스 프로젝트 블록체인 플랫폼이다. 하이퍼레져 패브릭에서는 &#x003C;<xref ref-type="fig" rid="f001">그림 1</xref>&#x003E;에서와 같이 피어(Peer)라는 노드들이 원장(Ledger)을 관리하며 피어들 간에 합의를 통해 원장 데이터의 신뢰성을 보장한다.</p>
<p>이더리움(Ethereum) 플랫폼에서 사용자 노드의 처리 모듈인 스마트 컨트랙트(Smart Contract)<xref ref-type="bibr" rid="B005">[5]</xref>,<xref ref-type="bibr" rid="B006">[6]</xref>와 같이 하이퍼레져 패브릭에서는 피어 내에 체인 코드(Chain Code)를 통해 피어의 기능을 수행한다. 본 연구에서는 기존 온라인 서비스의 트랜잭션 데이터에 대한 투명성을 확보하기 위한 연동 블록체인 플랫폼으로 오픈 소스 기반의 하이퍼레져 패브릭을 기반으로 한다.</p>
<fig id="f001" orientation="portrait" position="float">
	<label>그림 1.</label>
	<caption>
		<title>하이퍼레져 패브릭의 원장 관리</title>
		<p>Figure 1. Ledger Management of Hyperledger Fabric</p>
	</caption>
	<graphic xlink:href="../ingestImageView?artiId=ART002459564&amp;imageName=jkits_2019_14_02_127_f001.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
</fig>
</sec>
<sec id="sec002-2">
<title>2.2 블록체인 기반의 인터넷 응용 적용</title>
<p>연구 <xref ref-type="bibr" rid="B007">[7]</xref>에서는 블록체인의 활용 분야로 가상 화폐 분야, 정보 보호 분야, 스마트 도시 분야, 소프트웨어 커넥터 분야, IoT 장치 관리 분야를 분석하였다. 소프트웨어 커넥터 분야는 소프트웨어 들 간의 상호 작용을 블록체인으로 활용하는 방안이다. 데이터를 분산하여 관리해야 하거나, 데이터의 교환이 안전하게 관리되어야 하는 서비스에 블록체인이 활용될 수 있음을 분석하였다. 기본 아키텍쳐는 응용 계층과 블록체인 계층으로 구분하며 블록체인 계층이 커넥터 역할을 한다. 본 논문에서는 제안하는 블록체인과의 연동 아키텍쳐와 유사하지만 연구 <xref ref-type="bibr" rid="B007">[7]</xref>은 커넥터로서의 블록체인을 분석하였으며 본 연구에서는 블록체인과 기존 온라인 서비스를 연동하기 위한 구체적인 아키텍쳐와 개발을 진행한다.</p>
</sec>
<sec id="sec002-3">
<title>2.3 하이퍼레져 패브릭 기반 탈중앙화 어플리케이션 연구</title>
<p>연구 <xref ref-type="bibr" rid="B008">[8]</xref>에서는 하이퍼레져 패브릭 기반으로 응용 어플리케이션을 개발할 수 있음을 제안하였다. 하이퍼레이져 패브릭 네트워크을 구축하고 체인 코드 및 탈중앙화 어플리케이션을 개발하여 학생 포트폴리오 검증 시스템을 개발하였다. 학생의 포트폴리오 정보는 신뢰성 및 투명성이 중요하므로 블록체인 플랫폼을 기반으로 이러한 신뢰성과 투명성을 보장할 수 있도록 개발하였다. 연구 <xref ref-type="bibr" rid="B008">[8]</xref>은 학생 포트폴리오 검증 시스템을 탈중앙화하기 위해 블록체인 시스템 기반으로 신규 시스템을 개발해야 한다. 본 논문에서는 신규가 아닌 기존 온라인 시스템에서 투명성을 보장하기 위한 방안으로 연동 아키텍쳐를 제안한다.</p>
</sec>
<sec id="sec002-4">
<title>2.4 하이퍼레져 패브릭을 이용한 무역 시스템</title>
<p>연구 <xref ref-type="bibr" rid="B009">[9]</xref>에서는 기존의 무역 견적/계약 시스템이 중앙집중식 관리로 정보 갱신 및 중개수수료 발생 등의 이슈가 있음을 분석하였으며, 이러한 이슈를 개선하기 위해 하이퍼레져 패브릭을 이용하여 탈중앙화하는 무역 시스템의 아키텍쳐를 제안하였다.</p>
<p>하이퍼레져 패브릭을 기반으로 하면 분산 원장에 견적, 송장, 계약서를 공유함으로 공급사슬(Supply Chain)에서 단절이 발생하더라도 가시성<xref ref-type="bibr" rid="B010">[10]</xref>에는 문제가 발생하지 않을 것으로 분석하였으며 또한 중개자가 없으므로 중개 수수료 감소 및 거래 시간을 단축할 수 있음을 제안하였다.</p>
<p>연구 <xref ref-type="bibr" rid="B009">[9]</xref>는 무역 견적/계약 시스템에 하이퍼레져 패브릭 블록체인 플랫폼을 적용하여 탈중앙화하는 사례를 연구하였으며, 본 논문에서는 기존 시스템을 유지하면서 블록체인 플랫폼을 연동하기 위한 구체적인 방안을 제안한다.</p>
</sec>
</sec>
<sec id="sec003">
<title>3. 온라인 트랜잭션을 위한 블록체인 기반 서비스 아키텍쳐</title>
<p>기존 온라인 서비스(쇼핑몰, 예약, 계약, 등)는 &#x003C;<xref ref-type="fig" rid="f002">그림 2</xref>&#x003E; 에서와 같이 해킹이나 임의조작에 의해 온라인 거래의 투명성에 대한 확실한 보장을 할 수 없으며, 중앙 집중 방식의 서비스가 이러한 문제점을 잠재적으로 내포하고 있다<xref ref-type="bibr" rid="B011">[11]</xref>,<xref ref-type="bibr" rid="B012">[12]</xref>. 이에 각 서비스 업체들은 보안에 막대한 비용을 투자하거나 시스템 운영자 및 관리자의 보안 의식 강화에 노력하고 있다. 그러나 그러한 노력에도 불구하고 매년 시스템 해킹 및 보안 피해 사례가 증가하고 있다.</p>
<fig id="f002" orientation="portrait" position="float">
	<label>그림 2.</label>
	<caption>
		<title>중앙집중식 서버 구조의 거래 투명성</title>
		<p>Figure 2. Transaction Transparency in a Centralized Server Architecture</p>
	</caption>
	<graphic xlink:href="../ingestImageView?artiId=ART002459564&amp;imageName=jkits_2019_14_02_127_f002.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
</fig>
<p>본 연구에서는 &#x003C;<xref ref-type="fig" rid="f003">그림 3</xref>&#x003E;에서와 같이 온라인 서비스에서 처리되는 거래 내역에 대한 정보를 중앙 서버가 아닌 사용자(고객)들이 관리하는 블록에 저장하며 블록간에 합의를 통해 투명성을 향상시킬 수 있을 것이다. 본 연구에서 제안하는 트랜잭션 투명성 향상을 위한 아키텍쳐는 오픈 소스 기반의 하이퍼레져 패브릭 플랫폼을 기반으로 한다.</p>
<fig id="f003" orientation="portrait" position="float">
	<label>그림 3.</label>
	<caption>
		<title>블록체인 구조의 거래 투명성</title>
		<p>Figure 3. Transaction Transparency in Block Chain Architecture</p>
	</caption>
	<graphic xlink:href="../ingestImageView?artiId=ART002459564&amp;imageName=jkits_2019_14_02_127_f003.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
</fig>
<sec id="sec003-1">
<title>3.1 블록체인 기반 온라인 트랜잭션 처리 아키텍쳐</title>
<p>본 연구에서는 온라인 서비스에서의 트랜잭션을 블록체인 원장에 저장하기 위해 연동 아키텍쳐를 제안한다.</p>
<fig id="f004" orientation="portrait" position="float">
	<label>그림 4.</label>
	<caption>
		<title>블록체인과 온라인 서비스의 연동 개념도</title>
		<p>Figure 4. Integration Concept of Block Chain and Online Service</p>
	</caption>
	<graphic xlink:href="../ingestImageView?artiId=ART002459564&amp;imageName=jkits_2019_14_02_127_f004.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
</fig>
<p>&#x003C;<xref ref-type="fig" rid="f004">그림 4</xref>&#x003E;에서와 같이 각 사용자 별로 서비스 호출(Service Call)을 통해 블록체인 서비스를 이용할 수 있으며 서비스 처리에 따른 트랜잭션 데이터는 각 사용자의 블록에 분산 저장된다. 서비스 호출은 온라인 서비스에서 제공하는 웹 서비스 API를 이용하여 접근할 수 있도록 한다. 분산 저장되는 트랜잭션 데이터는 일관성을 유지하기 위해 증명 작업(Proof of Work)을 진행하며 증명이 완료되면 블록을 확정한다. 이 때 블록 들 간의 불일치 문제가 발생하면 거래에 대한 변조로 판단하여 거래를 롤백(rollback) 시킨다. 이러한 과정을 통해 온라인 서비스의 트랜잭션 투명성을 확보할 수 있다.</p>
<p>서비스 연동은 블록체인 기반의 온라인 서비스 연동 뿐만 아니라 기존의 온라인 서비스와의 연동을 통해 블록체인 서비스로의 전환이 가능할 것이다. &#x003C;<xref ref-type="fig" rid="f005">그림 5</xref>&#x003E;에서와 같이 커넥션 어뎁터(Connection Adaptor)를 통해 기존 서비스들이 제공되는 온라인 트랜잭션 정보들을 블록체인 플랫폼으로 전송하여 관리할 수 있도록 한다. 커넥션 어뎁터는 블록체인 측면에서의 어뎁터와 온라인 서비스 측면에서의 어뎁터를 제공한다. 블록체인 측면에서의 어뎁터는 스마트 컨트랙트(Smart Contract)나 에이젠트(Agent), REST API를 이용하며, 온라인 서비스 측면에서 어뎁터는 웹 서비스 API를 이용하여 연동할 수 있도록 한다.</p>
<fig id="f005" orientation="portrait" position="float">
	<label>그림 5.</label>
	<caption>
		<title>블록체인과 기존 온라인 서비스의 연동 구조</title>
		<p>Figure 5. Integration Architecture of Block Chain and Exsiting Online Server</p>
	</caption>
	<graphic xlink:href="../ingestImageView?artiId=ART002459564&amp;imageName=jkits_2019_14_02_127_f005.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
</fig>
<fig id="f006" orientation="portrait" position="float">
	<label>그림 6.</label>
	<caption>
		<title>하이퍼레져 패브릭과 기존 온라인 서비스의 연동 구조</title>
		<p>Figure 6. Integration Architecture of Hyperledger Fabric and Exsiting Online Server</p>
	</caption>
	<graphic xlink:href="../ingestImageView?artiId=ART002459564&amp;imageName=jkits_2019_14_02_127_f006.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
</fig>
<p>&#x003C;<xref ref-type="fig" rid="f006">그림 6</xref>&#x003E;의 온라인 서비스와 하이퍼레져 패브릭 연동 아키텍쳐에서 블록체인 내의 피어와 연동하기 위해 커넥션 어뎁터를 통해 REST API를 호출한다. 온라인 서비스에서 전달되는 트랜잭션 데이터는 하이퍼레져 패브릭 네트워크를 기반으로 멤버 서비스와 블록체인 서비스 그리고 체인코드 서비스를 이용하여 트랜잭션의 투명성을 제공한다.</p>
<fig id="f007" orientation="portrait" position="float">
	<label>그림 7.</label>
	<caption>
		<title>하이퍼레져 페브리과 기존 온라인 서비스의 연동 개념도</title>
		<p>Figure 7. Integration Concept of Hyperledger Fabric and Exsiting Online Server</p>
	</caption>
	<graphic xlink:href="../ingestImageView?artiId=ART002459564&amp;imageName=jkits_2019_14_02_127_f007.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
</fig>
<p>하이퍼레져 패브릭 기반의 온라인 서비스 연동은 &#x003C;<xref ref-type="fig" rid="f007">그림 7</xref>&#x003E;에서와 같이 커넥션 어뎁터를 REST API를 이용한다. 온라인 서비스에서 REST API를 호출하면 피어 내의 체인코드를 통해 원장에 트랜잭션 정보를 저장하거나 갱신한다. 피어는 기존의 온라인 서비스에서 전달되는 사용자(고객)를 기반으로 블록체인 내에 구성된다.</p>
<fig id="f008" orientation="portrait" position="float">
	<label>그림 8.</label>
	<caption>
		<title>하이퍼레져 패브릭의 온라인 트랜잭션 관리</title>
		<p>Figure 8. Online Transaction Management of Hyperledger Fabric</p>
	</caption>
	<graphic xlink:href="../ingestImageView?artiId=ART002459564&amp;imageName=jkits_2019_14_02_127_f008.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
</fig>
<p>하이퍼레져 패브릭은 &#x003C;<xref ref-type="fig" rid="f008">그림 8</xref>&#x003E;과 원장 내의 월드스테이트(World State)에 온라인 정보의 트랜잭션을 관리하며 피어 간의 합의 과정을 통해 트랜잭션 정보의 투명성을 보장할 수 있다. 합의 알고리즘은 PBFT(Practical Byzantine Fault Tolerance)를 사용한다.</p>
<fig id="f009" orientation="portrait" position="float">
	<label>그림 9.</label>
	<caption>
		<title>트랜잭션 정보를 갱신하기 위한 체인 코드</title>
		<p>Figure 9. Chain Code to update Transaction Information</p>
	</caption>
	<graphic xlink:href="../ingestImageView?artiId=ART002459564&amp;imageName=jkits_2019_14_02_127_f009.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
</fig>
<p>Go 언어<xref ref-type="bibr" rid="B013">[13]</xref> 기반의 체인 코드는 &#x003C;<xref ref-type="fig" rid="f009">그림 9</xref>&#x003E;와 같이 Init(), Invoke(), get()/set() 함수로 구성되며, 일반적으로 Shim<xref ref-type="bibr" rid="B014">[14]</xref> 패키지의 체인코드 인터페이스를 따라 구현한다. Init() 함수와 Invoke() 함수에 의해 월드 스테이트 내의 트랜잭션을 갱신할 수 있다.</p>
<fig id="f010" orientation="portrait" position="float">
	<label>그림 10.</label>
	<caption>
		<title>커넥션 어뎁터</title>
		<p>Figure 10. Connection Adapter</p>
	</caption>
	<graphic xlink:href="../ingestImageView?artiId=ART002459564&amp;imageName=jkits_2019_14_02_127_f010.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
</fig>
<p>&#x003C;<xref ref-type="fig" rid="f010">그림 10</xref>&#x003E;의 커넥션 어뎁터는 온라인 서비스에서 제공하는 어뎁터로서 블록체인의 REST API를 호출할 수 있도록 하며, 해당 REST API에 JSON 형식의 트랜잭션 데이터를 함께 전달한다.</p>
</sec>
<sec id="sec003-2">
<title>3.2 블록체인 기반 온라인 트랜잭션 처리 프로세스</title>
<p>온라인 서비스와 블록체인 네트워크와의 연동을 위해 체인코드 배포와 원장 동기화 처리를 위한 프로세스를 정의한다.</p>
<p>온라인 트랜잭션을 블록체인 내의 원장에 저장하기 위해 피어들에게 체인코드를 배포해야 한다. &#x003C;<xref ref-type="fig" rid="f012">그림 11</xref>&#x003E;에서와 같이 온라인 서비스의 커넥션 어뎁터를 통해 배포를 위한 REST API와 JSON 데이터를 블록체인으로 전달하면 블록체인 내의 피어(Peer<sub>1</sub>)의 체인코드를 호출하여 다른 피어(Peern)에게 배포한다.</p>
<p>블록체인의 피어 내의 원장들 간의 온라인 트랜잭션 동기화를 위한 프로세스는 &#x003C;<xref ref-type="fig" rid="f011">그림 12</xref>&#x003E;와 같다. 온라인 트랜잭션이 발생하면 커넥션 어뎁터를 통해 블록체인으로 트랜잭션 REST API와 JSON 데이터를 전달한다. 블록체인은 트랜잭션 REST API 호출하여 피어들 간에 합의 후에 원장을 갱신한다.</p>
</sec>
</sec>
<sec id="sec004">
<title>4. 실험 및 평가</title>
<p>본 사례연구에서는 기존의 온라인 쇼핑몰과 블록체인 연동 서비스를 개발하여 본 연구에서 제안한 연동 아키텍쳐의 적합성을 파악한다. 기존 쇼핑몰에서의 주문 처리 트랜잭션 데이터를 블록체인으로 전달하여 기존 온라인 트랜잭션이 블록체인 내에서 관리될 수 있음을 확인한다.</p>
<fig id="f011" orientation="portrait" position="float">
	<label>그림 12.</label>
	<caption>
		<title>블록체인 내의 온라인 트랜잭션 동기화 프로세스</title>
		<p>Figure 12. Online Transaction Sychronization Process in Block Chain</p>
	</caption>
	<graphic xlink:href="../ingestImageView?artiId=ART002459564&amp;imageName=jkits_2019_14_02_127_f012.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
</fig>
<fig id="f012" orientation="portrait" position="float">
	<label>그림 11.</label>
	<caption>
		<title>온라인 트랜잭션 저장을 위한 체인코드 배포 프로세스</title>
		<p>Figure 11. Chain Code Deployment Process for saving Online Transaction</p>
	</caption>
	<graphic xlink:href="../ingestImageView?artiId=ART002459564&amp;imageName=jkits_2019_14_02_127_f011.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
</fig>
<fig id="f013" orientation="portrait" position="float">
	<label>그림 13.</label>
	<caption>
		<title>블록체인과 연동하기 위한 기존 온라인 쇼핑몰 서비스</title>
		<p>Figure 13. Existing Online Shopping Mall Service for Integrating Block Chain</p>
	</caption>
	<graphic xlink:href="../ingestImageView?artiId=ART002459564&amp;imageName=jkits_2019_14_02_127_f013.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
</fig>
<p>온라인 쇼핑몰과 블록체인을 연동하기 위한 커넥션 어뎁터는 &#x003C;<xref ref-type="bibr" rid="B014">그림 14</xref>&#x003E;와 같다. &#x003C;<xref ref-type="bibr" rid="B013">그림 13</xref>&#x003E;의 기존 온라인 쇼핑몰에서 주문를 클릭하면 블록체인에 트랜잭션 저장을 위한 REST API인 인터넷 주소: <ext-link ext-link-type="uri" xlink:href="http://localhost:3000/api/Trade">http://localhost:3000/api/Trade</ext-link> 호출한다.</p>
<fig id="f014" orientation="portrait" position="float">
	<label>그림 14.</label>
	<caption>
		<title>블록체인 커넥션 어뎁터</title>
		<p>Figure 14. Block Chain Connection Adapter</p>
	</caption>
	<graphic xlink:href="../ingestImageView?artiId=ART002459564&amp;imageName=jkits_2019_14_02_127_f014.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
</fig>
<p>REST API를 통해 전달되는 데이터는 &#x003C;<xref ref-type="fig" rid="f015">그림 15</xref>&#x003E;와 같이 JSON 형식으로 전달되며 본 사례연구에서는 3개의 데이터를 전달한다. 상품 데이터(Commodity), 구매자 데이터(Trader), 그리고 트랜잭션 데이터(Trade)를 전달한다.</p>
<fig id="f015" orientation="portrait" position="float">
	<label>그림 15.</label>
	<caption>
		<title>블록체인으로 전달되는 온라인 트랜잭션 데이터 형식</title>
		<p>Figure 15. Online Transaction Data Type passing to Block Chain</p>
	</caption>
	<graphic xlink:href="../ingestImageView?artiId=ART002459564&amp;imageName=jkits_2019_14_02_127_f015.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
</fig>
<p>본 연구에서는 하이퍼레져 컴포져(Hyperledger Composer)<xref ref-type="bibr" rid="B015">[15]</xref>를 이용하여 REST API 서비스를 제공한다. &#x003C;<xref ref-type="fig" rid="f016">그림 16</xref>&#x003E;에서와 같이 하이퍼레져 컴포져 서버가 구동된 상태에서 온라인 쇼핑몰에서 REST API 서비스를 이용할 수 있다.</p>
<fig id="f016" orientation="portrait" position="float">
	<label>그림 16.</label>
	<caption>
		<title>REST API 서비스를 위한 하이퍼레져 컴포져 서버 구동</title>
		<p>Figure 16. Hyperledger Composer Server Start for REST API Service</p>
	</caption>
	<graphic xlink:href="../ingestImageView?artiId=ART002459564&amp;imageName=jkits_2019_14_02_127_f016.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
</fig>
<p>&#x003C;<xref ref-type="fig" rid="f017">그림 17</xref>&#x003E;과 같이 하이퍼레져 컴포져를 통해 REST API를 제공한다. 본 사례연구에서 제공되는 REST API는 상품 데이터, 구매자 정보, 트랜잭션 데이터를 서비스하며 해당 REST API를 커넥션 어뎁터에서 호출한다.</p>
<fig id="f017" orientation="portrait" position="float">
	<label>그림 17.</label>
	<caption>
		<title>하이퍼레져 컴포져의 REST API</title>
		<p>Figure 17. REST API of Hyperledger Composer</p>
	</caption>
	<graphic xlink:href="../ingestImageView?artiId=ART002459564&amp;imageName=jkits_2019_14_02_127_f017.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
</fig>
<p>온라인 쇼핑몰에서 블록체인으로 전달되는 3개의 데이터 형식(<xref ref-type="fig" rid="f015">그림 15</xref>)에 대해 &#x003C;<xref ref-type="fig" rid="f018">그림 18</xref>&#x003E;과 같이 확인할 수 있다. 해당 REST API를 통해 상품 데이터와 구매자, 트랜잭션 정보를 확인할 수 있다.</p>
<fig id="f018" orientation="portrait" position="float">
	<label>그림 18.</label>
	<caption>
		<title>하이퍼레져 컴포져를 통해 전달되는 트랜잭션 데이터</title>
		<p>Figure 18. Transaction Data passing through Hyperledger Composer</p>
	</caption>
	<graphic xlink:href="../ingestImageView?artiId=ART002459564&amp;imageName=jkits_2019_14_02_127_f018.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
</fig>
<p>온라인 쇼핑몰로 부터 블록체인으로 전달된 데이터는 피어의 원장 내 월드 스테이트에 저장되며 &#x003C;<xref ref-type="fig" rid="f019">그림 19</xref>&#x003E;와 같이 저장된다. 이러한 원장의 정보는 다른 피어들 간에 동기화 하여 관리되며 변경이 발생하면 체인코드를 통해 모든 피어들이 합의 후에 동기화한다. 다른 피어에서 확인한 트랜잭션 정보도 &#x003C;<xref ref-type="fig" rid="f019">그림 19</xref>&#x003E;와 동일하게 관리됨을 확인할 수 있다.</p>
<fig id="f019" orientation="portrait" position="float">
	<label>그림 19.</label>
	<caption>
		<title>원장의 월드스테이트에 저장된 트랜잭션 데이터</title>
		<p>Figure 19. Saved Transaction Data in World State of Ledger</p>
	</caption>
	<graphic xlink:href="../ingestImageView?artiId=ART002459564&amp;imageName=jkits_2019_14_02_127_f019.jpg" position="float" orientation="portrait" xlink:type="simple"></graphic>
</fig>
<p>지금까지의 사례연구를 통해 온라인 트랜잭션 데이터가 블록체인 내의 원장에 저장되며 피어들 간에 합의를 통해 저장된 온라인 트랜잭션에 대한 투명성이 보장됨을 파악할 수 있다.</p>
</sec>
<sec id="sec005" sec-type="Conclusions">
<title>5. 결 론</title>
<p>신규 온라인 서비스를 블록체인 기반 하에 개발하기 위해서는 많은 시간과 비용이 소요되므로 본 연구에서는 기존의 온라인 서비스를 유지하면서 블록체인과 연동하기 위한 아키텍쳐를 제안하였다. 온라인 서비스에서 발생되는 트랜잭션 정보에 대한 투명성은 보안 안정성을 보장하는 블록체인을 통해 가능하므로 기존의 블록체인 플랫폼을 기반으로 하였다. 온라인 서비스에서 커넥션 어뎁터를 통해 블록체인의 REST API를 호출하여 블록체인과 연동하며 블록체인은 하이퍼레져 패브릭을 기반으로 온라인 서비스와 연동하였다. 사례연구를 통해 본 연구에서 제안한 연동 아키텍쳐가 적합함을 파악하였으며 온라인 트랜잭션 데이터가 블록체인 내의 피어들 간에 합의를 통해 동기화되며 온라인 트랜잭션 데이터의 투명성이 보장될 수 있음을 파악하였다. 향후에는 기존 온라인 서비스와 블록체인을 동적으로 연동할 수 있는 커넥션 어뎁터 기법을 연구한다.</p>
</sec>
</body>
<back>
<ref-list>
<title>References</title>
<!-- [1] Y. S. Ko, and H. S. Choi, Changing business paradigm and its application- Focused on the block chain technology, Korea Science &#x26; Art Forum, Vol. 27, pp. 13-29, 2017.-->
<ref id="B001">
<label>[1]</label>
<element-citation publication-type="journal">
<person-group>
<name><surname>Ko</surname><given-names>Y. S.</given-names></name>
<name><surname>Choi</surname><given-names>H. S.</given-names></name>
</person-group>
<year>2017</year>
<article-title>Changing business paradigm and its application- Focused on the block chain technology</article-title>
<source>Korea Science &#x26; Art Forum</source>
<volume>27</volume>
<fpage>13</fpage><lpage>29</lpage>
<pub-id pub-id-type="doi">10.17548/ksaf.2017.01.27.13</pub-id>
</element-citation>
</ref>
<!-- [2] A. Watanabe, Y. Matsumoto, Y. Nishimura, and T. Shimizu, Block chain, introduction to application development, 2017.-->
<ref id="B002">
<label>[2]</label>
<element-citation publication-type="other">
<person-group>
<name><surname>Watanabe</surname><given-names>A.</given-names></name>
<name><surname>Matsumoto</surname><given-names>Y.</given-names></name>
<name><surname>Nishimura</surname><given-names>Y.</given-names></name>
<name><surname>Shimizu</surname><given-names>T.</given-names></name>
</person-group>
<year>2017</year>
<source>Block chain, introduction to application development</source>
</element-citation>
</ref>
<!-- [3] E. Androulaki, C. Cachin, C. Ferris, S. Muralidharan, C. Murthy, B. Nguyen, M. Sthi, and C. Stathakopoulou, Hyperledger fabric: A distributed operating system for permissioned blockchains, Proceedings of the Thirteenth EuroSys Conference. ACM, 2018.-->
<ref id="B003">
<label>[3]</label>
<element-citation publication-type="paper">
<person-group>
<name><surname>Androulaki</surname><given-names>E.</given-names></name>
<name><surname>Cachin</surname><given-names>C.</given-names></name>
<name><surname>Ferris</surname><given-names>C.</given-names></name>
<name><surname>Muralidharan</surname><given-names>S.</given-names></name>
<name><surname>Murthy</surname><given-names>C.</given-names></name>
<name><surname>Nguyen</surname><given-names>B.</given-names></name>
<name><surname>Sthi</surname><given-names>M.</given-names></name>
<name><surname>Stathakopoulou</surname><given-names>C.</given-names></name>
</person-group>
<year>2018</year>
<source>Hyperledger fabric: A distributed operating system for permissioned blockchains</source>
<conf-name>Proceedings of the Thirteenth EuroSys Conference</conf-name>
<publisher-name>ACM</publisher-name>
<pub-id pub-id-type="doi">10.1145/3190508.3190538</pub-id>
</element-citation>
</ref>
<!-- [4] A Blockchain Platform for the Enterprise, HYPERLEDGER FABRIC, https://hyperledger-fabric.readthedocs.io/, retrieved Jun. 2018.-->
<ref id="B004">
<label>[4]</label>
<element-citation publication-type="webpage" publication-format="web">
<source>A Blockchain Platform for the Enterprise, HYPERLEDGER FABRIC, <uri>https://hyperledger-fabric.readthedocs.io/</uri></source>
<comment>retrieved Jun. 2018</comment>
</element-citation>
</ref>
<!-- [5] H. S. Park, J. W. Chung, and U. M. Kim, A study on shared EMR(Electronic medical record by block chain(Ethereum), Proceedings of KIIT Summer Conference, pp. 436-437, Dec. 2017.-->
<ref id="B005">
<label>[5]</label>
<element-citation publication-type="paper">
<person-group>
<name><surname>Park</surname><given-names>H. S.</given-names></name>
<name><surname>Chung</surname><given-names>J. W.</given-names></name>
<name><surname>Kim</surname><given-names>U. M.</given-names></name>
</person-group>
<year>2017</year>
<month>Dec.</month>
<source>A study on shared EMR(Electronic medical record by block chain(Ethereum)</source>
<conf-name>Proceedings of KIIT Summer Conference</conf-name>
<fpage>436</fpage><lpage>437</lpage>
</element-citation>
</ref>
<!-- [6] S. H. Jo, J. B. Lee, J. Y. Park, D. G. Lee, and H. In, Ethereum basic, BookStar, 2017.-->
<ref id="B006">
<label>[6]</label>
<element-citation publication-type="book">
<person-group>
<name><surname>Jo</surname><given-names>S. H.</given-names></name>
<name><surname>Lee</surname><given-names>J. B.</given-names></name>
<name><surname>Park</surname><given-names>J. Y.</given-names></name>
<name><surname>Lee</surname><given-names>D. G.</given-names></name>
<name><surname>In</surname><given-names>H.</given-names></name>
</person-group>
<year>2017</year>
<source>Ethereum basic</source>
<publisher-name>BookStar</publisher-name>
</element-citation>
</ref>
<!-- [7] T. H. Kang, E. S. Jeong, C. W. Lee, and B. H. Roh, Case study on the usage of blockchain to the internet applications, Proceedings of Korea Information Science Society Conference, pp. 1793-1795, Jun. 2017.-->
<ref id="B007">
<label>[7]</label>
<element-citation publication-type="paper">
<person-group>
<name><surname>Kang</surname><given-names>T. H.</given-names></name>
<name><surname>Jeong</surname><given-names>E. S.</given-names></name>
<name><surname>Lee</surname><given-names>C. W.</given-names></name>
<name><surname>Roh</surname><given-names>B. H.</given-names></name>
</person-group>
<year>2017</year>
<month>Jun.</month>
<article-title></article-title>
<source>Case study on the usage of blockchain to the internet applications</source>
<conf-name>Proceedings of Korea Information Science Society Conference</conf-name>
<fpage>1793</fpage><lpage>1795</lpage>
</element-citation>
</ref>
<!-- [8] C. H. Park, M. K. Kim, and H. W. Kim, A study on building blockchain network and decentralized application development based on Hyperledger Fabric, Proceedings of Symposium of the Korean Institute of communications and Information Sciences, pp. 5-6, Jun. 2018.-->
<ref id="B008">
<label>[8]</label>
<element-citation publication-type="paper">
<person-group>
<name><surname>Park</surname><given-names>C. H.</given-names></name>
<name><surname>Kim</surname><given-names>M. K.</given-names></name>
<name><surname>Kim</surname><given-names>H. W.</given-names></name>
</person-group>
<year>2018</year>
<month>Jun.</month>
<source>A study on building blockchain network and decentralized application development based on Hyperledger Fabric</source>
<conf-name>Proceedings of Symposium of the Korean Institute of communications and Information Sciences</conf-name>
<fpage>5</fpage><lpage>6</lpage>
</element-citation>
</ref>
<!-- [9] M. K. Kim, S. J. Oh, and C. S. Hong, Digital trading system using Hyperledger Fabric block chain open source, Proceedings of Korea Information Science Society Conference, pp. 1913-1915, Jun. 2018.-->
<ref id="B009">
<label>[9]</label>
<element-citation publication-type="paper">
<person-group>
<name><surname>Kim</surname><given-names>M. K.</given-names></name>
<name><surname>Oh</surname><given-names>S. J.</given-names></name>
<name><surname>Hong</surname><given-names>C. S.</given-names></name>
</person-group>
<year>2018</year>
<month>Jun.</month>
<source>Digital trading system using Hyperledger Fabric block chain open source</source>
<conf-name>Proceedings of Korea Information Science Society Conference</conf-name>
<fpage>1913</fpage><lpage>1915</lpage>
</element-citation>
</ref>
<!-- [10] Y. H. Hwang and S. Y. Baek, Effect of logistics flow visibility and system self-efficacy on task performance, Journal of national Defense Studies, Vol. 57, No. 4, pp. 185-216, 2014.-->
<ref id="B010">
<label>[10]</label>
<element-citation publication-type="journal">
<person-group>
<name><surname>Hwang</surname><given-names>Y. H.</given-names></name>
<name><surname>Baek</surname><given-names>S. Y.</given-names></name>
</person-group>
<year>2014</year>
<article-title>Effect of logistics flow visibility and system self-efficacy on task performance</article-title>
<source>Journal of national Defense Studies</source>
<volume>57</volume><issue>4</issue>
<fpage>185</fpage><lpage>216</lpage>
</element-citation>
</ref>
<!-- [11] K. D. Park, C. O. Kim, and H. Y. Youm, Countermeasures against security threats to online voting using distributed ledger technology, Journal of the Korea Institute of Information Security &#x26; Cryptology, Vol. 27, No. 5, pp. 1201-1216, 2017.-->
<ref id="B011">
<label>[11]</label>
<element-citation publication-type="journal">
<person-group>
<name><surname>Park</surname><given-names>K. D.</given-names></name>
<name><surname>Kim</surname><given-names>C. O.</given-names></name>
<name><surname>Youm</surname><given-names>H. Y.</given-names></name>
</person-group>
<year>2017</year>
<article-title>Countermeasures against security threats to online voting using distributed ledger technology</article-title>
<source>Journal of the Korea Institute of Information Security &#x26; Cryptology</source>
<volume>27</volume><issue>5</issue>
<fpage>1201</fpage><lpage>1216</lpage>
</element-citation>
</ref>
<!-- [12] W, Gavin, Ethereum: A secure decentralised generalised transaction ledger, Ethereum Project Yellow Paper, 2014.-->
<ref id="B012">
<label>[12]</label>
<element-citation publication-type="report">
<person-group>
<name><surname>Gavin</surname><given-names>W</given-names></name>
</person-group>
<year>2014</year>
<source>Ethereum: A secure decentralised generalised transaction ledger</source>
<comment>Ethereum Project Yellow Paper</comment>
</element-citation>
</ref>
<!-- [13] Go Programming Language, https://golang.org/, retrieved Jul. 2018.-->
<ref id="B013">
<label>[13]</label>
<element-citation publication-type="webpage" publication-format="web">
<source>Go Programming Language, <uri>https://golang.org/</uri></source>
<comment>retrieved Jul. 2018</comment>
</element-citation>
</ref>
<!-- [14] Chain Code Interface of Hyperldeger Fabric , https://fabric-shim.github.io/release-1.4/index.html/, retrieved Jul. 2018.-->
<ref id="B014">
<label>[14]</label>
<element-citation publication-type="webpage" publication-format="web">
<source>Chain Code Interface of Hyperldeger Fabric, <uri>https://fabric-shim.github.io/release-1.4/index.html/</uri></source>
<comment>retrieved Jul. 2018</comment>
</element-citation>
</ref>
<!-- [15] Hyperledger Composer, https://www.hyperledger.org/projects/composer, retrieved Aug. 2018.-->
<ref id="B015">
<label>[15]</label>
<element-citation publication-type="webpage" publication-format="web">
<source>Hyperledger Composer, <uri>https://www.hyperledger.org/projects/composer</uri></source>
<comment>retrieved Aug. 2018</comment>
</element-citation>
</ref>
</ref-list>
<ack>
<title>감사의 글</title>
<p>『이 논문은 2018년도 인하공업전문대학의 지원에 의하여 연구되었음.』</p>
</ack>
<bio>
<p><graphic xlink:href="../ingestImageView?artiId=ART002459564&amp;imageName=jkits_2019_14_02_127_f020.jpg"></graphic><bold>Chul Jin Kim</bold> received both M.S. and Ph.D. degree in Computer Science from the Soongsil University in 1998 and 2004. He worked as a senior researcher in SAMSUNG Electronics from 2004 to 2009. He has been a professor in the Department of Computer Systems and Engineering at Inha Technical College since 2009. He research focus is software engineering, object-oriented &#x0026; component technique, software architecture, customization, deep learning, and block chain platform.</p>
<p><italic>E-mail address</italic>: <email>cjkim@inhatc.ac.kr</email></p>
</bio>
</back>
</article>
