초록 열기/닫기 버튼

The advent of the e-commerce era has changed the way people shop, and at the same time, users generate a large amount of data when shopping. These data can be analyzed by offline calculation, but the results of offline analysis lack real-time performance. In this paper, by processing the log data and business data of e-commerce users in real-time, the feedback of the processing results can be quickly realized. The Spark big data computing framework has the advantages of real-time computing capability and high throughput. Spark Streaming, as an extension of Spark core, is the real-time stream processing component of the Spark computing platform. In this paper, the data is processed in real-time through Spark. Through Maxwell, real-time monitoring of business data changes in the MySQL database is performed, and the monitored data is sent to Kafka. Log data is directly sent to Kafka. Spark Streaming consumes the data in Kafka, then performs specific processing on the data according to the requirements, and the processed data is written to the Elasticsearch. In order to achieve exactly once consumption of data, this paper realizes at least one consumption of data by manually submitting offsets. Elasticsearch supports idempotent writes, so it can achieve exactly once consumption of downstream data. Manually submitted offsets are stored in Redis. Finally, specific queries can be performed on the processing results according to business requirements.


전자상거래 시대의 도래는 사람들이 쇼핑하는 방식을 변화시켰고, 동시에 사용자들은 쇼핑할 때 많은 양의 데이터를 생성한다. 이러한 데이터는 오프라인 계산으로 분석이 가능하지만 오프라인 분석 결과는 실시간 성능이 부족하다. 본 논문에서는 전자상거래 이용자의 로그 데이터와 비즈니스 데이터를 실시간으로 처리함으로써 처리 결과의 피드백을 신속하게 실현할 수 있다. 스파크 빅데이터 컴퓨팅 프레임워크는 실시간 컴퓨팅 기능과 높은 처리량의 장점을 가지고 있다. 스파크 스트리밍(Spark Streaming)은 스파크 코어의 확장으로서 스파크 컴퓨팅 플랫폼의 실시간 스트림 처리 구성 요소이다. 본 논문에서는 스파크를 통해 실시간으로 데이터를 처리한다. Maxwell을 통해 MySQL 데이터베이스의 비즈니스 데이터 변경에 대한 실시간 모니터링을 수행하고 모니터링한 데이터를 Kafka로 전송한다. 로그 데이터는 Kafka로 직접 전송한다. 스파크 스트리밍은 Kafka에서 데이터를 소비한 후 요구사항에 따라 데이터에 대한 특정 처리를 수행하며 처리된 데이터는 Elasticsearch에 저장한다. 이 논문은 정확한 1차 데이터 소비를 달성하기 위해 offset를 수동으로 제출하여 Kafka에서 적어도 하나의 데이터 소비를 실현한다. Elasticsearch는 멱등 쓰기를 지원하기 때문에 데이터에 대한 정확한 1차 소비가 가능하다. 수동으로 제출한 offset은 Redis에 저장된다. 마지막으로 비즈니스 요구 사항에 따라 처리 결과에 대한 구체적인 조회를 수행한다.