DOI QR코드

DOI QR Code

Implementation of query model of CQRS pattern using weather data

기상 데이터를 활용한 CQRS 패턴의 조회 모델 구현

  • Seo, Bomin (Department of Mobile Convergence Engineering, Hanbat National University) ;
  • Jeon, Cheolho (Department of Mobile Convergence Engineering, Hanbat National University) ;
  • Jeon, Hyeonsig (Department of Mobile Convergence Engineering, Hanbat National University) ;
  • An, Seyun (Department of Industrial Design, Hanbat National University) ;
  • Park, Hyun-ju (Department of Information and Communication Engineering, Hanbat National University)
  • Received : 2019.03.25
  • Accepted : 2019.05.05
  • Published : 2019.06.30

Abstract

At a time when large amounts of data are being poured out, there are many changes in software architecture or data storage patterns because of the nature of the data being written, rather more read-intensive than writing. Accordingly, in this paper, the query model of Command Query Responsibility Segmentation (CQRS) pattern separating the responsibilities of commands and queries is used to implement an efficient high-capacity data lookup system in users' requirements. This paper uses the 2018 temperature, humidity and precipitation data of the Korea Meteorological Administration Open API to store about 2.3 billion data suitable for RDBMS (PostgreSQL) and NoSQL (MongoDB). It also compares and analyzes the performance of systems with CQRS pattern applied from the perspective of the web server (Web Server) implemented and systems without CQRS pattern, the storage structure performance of each database, and the performance corresponding to the data processing characteristics.

대용량 데이터가 쏟아져 나오고 있는 지금, 대용량 데이터의 처리를 위해 데이터 처리 특성상 쓰기 작업보다 읽기작업이 많아 소프트웨어 아키텍처나 데이터 저장 패턴에 많은 변화가 가해지고 있다. 이에 따라 본 논문에서는 명령(Command)과 쿼리(Query)의 책임을 분리하는 CQRS(Command Query Responsibility Segregation) 패턴의 쿼리 모델을 사용해 사용자의 요구사항에 효율적인 대용량 데이터 조회 시스템을 구현한다. 본 논문의 대용량 데이터는 기상청 Open API의 2018년 온도, 습도, 강수 데이터를 활용하여 약 23억 건의 데이터를 RDBMS(PostgreSQL)와 NoSQL(MongoDB)에 알맞게 저장한다. 또한 구현한 웹 서버 (Web Server) 입장에서의 CQRS패턴을 적용한 시스템과 CQRS 패턴을 적용하지 않은 시스템의 성능, 각 데이터베이스의 저장구조 성능, 데이터 처리 특징에 맞는 성능을 비교 및 분석한다.

Keywords

HOJBC0_2019_v23n6_645_f0001.png 이미지

Fig. 1 Architecture

HOJBC0_2019_v23n6_645_f0002.png 이미지

Fig. 2 Schema

HOJBC0_2019_v23n6_645_f0003.png 이미지

Fig. 3 Summer Average temperature result

HOJBC0_2019_v23n6_645_f0004.png 이미지

Fig. 4 Average humidity result

HOJBC0_2019_v23n6_645_f0005.png 이미지

Fig. 5 Total rainfall result

HOJBC0_2019_v23n6_645_f0006.png 이미지

Fig. 6 Average temperature result

Table. 1 NoSQL Documents

HOJBC0_2019_v23n6_645_t0001.png 이미지

Table. 2 Operating environment

HOJBC0_2019_v23n6_645_t0002.png 이미지

Table. 3 Test environment

HOJBC0_2019_v23n6_645_t0003.png 이미지

References

  1. Public Data Portal, www.data.go.kr [Internet], Available: https://www.data.go.kr.
  2. S. Y. Bang, H. D. Ha, C. J. Kim, "A Study on BigData-based Software Architecture Design for Utilizing Public Open Data," Journal of KIIT, vol. 13, no. 10, pp. 99-10, 2015.
  3. B. H. Back, I. K. Ha, B. C. Ahn, "An Extraction Method of Sentiment Infromation from Unstructed Big Data on SNS," Journal of Korea Multimedia Society vol. 17, no. 6, pp. 671-680, Jun. 2014. https://doi.org/10.9717/kmms.2014.17.6.671
  4. J. S. Oh, C. G. Song, "Transmission performance of improvements in mobile applications via XML and JSON data translation," Journal of Information Science Society, vol.39, no. 1, pp. 129-131, 2012.
  5. json, www.json.org [Internet], Available : http://www.json.org/
  6. P. Gomez, R. Casallas, and C. Roncancio, "Data schema does matter, even in NoSQL systems!," 2016 IEEE Tenth International Conference on Research Challenges in Information Science (RCIS), Grenoble, pp. 1-6, 2016.
  7. DB-ENGINES, www.db-engines.com [Internet], Available : https://db-engines.com/en/ranking.
  8. K. HAKIM, "Correctness for CQRS Systems," KTH Royal Institute of Technology, Stockholm, 2012.
  9. M. Overeem, M. Spoor, and S. Jansen, "The dark side of event sourcing: Managing data conversion," 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER), Klagenfurt, pp. 193-204, 2017.
  10. C. B. Kyun, DDD START! Learn domain-driven design implementation and key concepts, 1th ed. Republic of Korea, KR : Seoul, 2016.