§ 瀏覽學位論文書目資料
  
系統識別號 U0002-0607201714345100
DOI 10.6846/TKU.2017.00204
論文名稱(中文) 基於 Lambda 架構於 Apache Mesos 之推薦系統實作
論文名稱(英文) Implementation of Lambda Architecture Recommender System on Apache Mesos
第三語言論文名稱
校院名稱 淡江大學
系所名稱(中文) 資訊工程學系碩士班
系所名稱(英文) Department of Computer Science and Information Engineering
外國學位學校名稱
外國學位學院名稱
外國學位研究所名稱
學年度 105
學期 2
出版年 106
研究生(中文) 李忠和
研究生(英文) Chung-Ho Lee
學號 603410142
學位類別 碩士
語言別 繁體中文
第二語言別
口試日期 2017-06-20
論文頁數 53頁
口試委員 指導教授 - 林其誼
委員 - 許輝煌(hsu@gms.tku.edu.tw)
委員 - 林昌鴻(chlin@mail.ntust.edu.tw)
關鍵字(中) Lambda Architecture
Apache Spark
Apache Mesos
recommender system
關鍵字(英) Lambda Architecture
Apache Spark
Apache Mesos
recommender system
第三語言關鍵字
學科別分類
中文摘要
由於現今網路發展迅速,產生許多新型的雲端服務,卻也造成許多問題。在上網人口急速上升的同時,企業必須有能力處理大量的資料。企業為了要獲取更高的收益和留住使用者,開始注重分析資料以取得使用者的偏好,能夠推薦使用者有興趣的商品,如:著名音樂串流平台Spotify,透過分析使用者的聆聽紀錄,推薦其他歌曲與歌手,越精確的推薦將讓使用者花更多時間在 Spotify 聽音樂。隨著多樣化的數據與數據產生的速度不斷加快,之前的框架已經不能滿足需求,複雜事件處理CEP (Complex Event Processing)或即時處理,也因此被提出。
在本研究將依照Lambda架構,在自行建構的叢集中,部署服務,Lambda架構中,資料處理主要分為兩層,批次處理層(Batch Layer)與即時處理層(Speed Layer),批次處理層運行大量資料的運算,因此用於非即時性的應用,即時處理層運行小型的工作,單一資料量小,而且運算複雜度較低,能在短時間內算出結果,適合即時性的應用。為了部署Lambda架構,我們必須安裝許多服務,用來建構主要的兩個運算層,造成叢集的複雜性提高,也更加難以維護。
因此我們使用Apache Mesos作為叢集管理核心,Mesos 擁有動態配置資源,簡單的增加運算節點,對於未來系統擴展有益處,此外在 Mesos 上運行 Lambda 架構不僅可以讓服務共享資源,而且幫助容錯機制,本系統所使用的框架 Apache Hadoop、Apache Spark、Apache Kafka,都是透過Mesos部署到各個節點,集中管理這些框架,大量簡化工作量與提高資源使用率。
我們實際運行應用與部署服務,用來驗證系統的運作情況,也進行不同的實驗,在批次運算層部署推薦系統,並透過四種資源設定,來了解批次處理層運行的情況,即時運算層則進行即時的資料分析,運行即時的機器學習法,進行資料分類,並評估即時分析層的效能,經過這些實驗與服務建置,我們相信使用容器化技術,未來將會越來越熱門。
英文摘要
In nowadays, the rapid development of the Internet not only has fostered various kinds of innovative cloud services, but also created many new problems. For example, because the number of Internet users has largely increased, enterprises face the problems of how to handle so many users at the same time and how to manage the big data created by the users. To increase the business revenue and decrease the churn rate of the customers, many enterprises have begun paying attention to user behavior analytics. Specifically, enterprises can derive the preference of a specific customer from user behavior analytics, and then can recommend items to the customer who may be interested in those items. Spotify, the famous music streaming company, has the ability of analyzing the personal history of played music, and then recommend similar songs or singers to the customer. As long as the recommendation meets the customer’s expectation, the stickiness of the customer can be increased. However, the volume of data is increasing extremely fast and the data types are heterogeneous. Therefore, the technologies of complex event processing (CEP) and real-time processing were introduced to solve this problem because traditional computational frameworks cannot fit in this application domain.
   In this research, we will follow the Lambda architecture to design our data analytics system. In the Lambda Architecture, there are two different Layer in the system, one is Batch Layer, other one is Speed Layer. Batch Layer processed the large data and it usually used for the offline data processing. The Speed Layer processed the small computing job. The data size of the job is small. So, we can get the result in short time. Speed Layer usually used for the real-time application. For deploy the Lambda Architecture on our cluster, we need to install many services and frameworks. Because of many services installed on the server, it’s very difficult to manage and maintain the server.
We use Mesos as the kernel of the cluster manager. Mesos can manage the resources of the cluster dynamically. It can allocate cluster resources dynamically and scale up or down easily. Deploying Lambda architecture on Mesos has the advantage of resource sharing and fault tolerance. Specifically, using Mesos we can deploy Apache Spark nodes and Apache Kafka nodes efficiently in the cluster. With the Mesos, we manage these services efficiently and easily.
  We deployed our applications and experiments to evaluate the system. We also did the different experiments on the system. The Batch Layer ran the Recommender System with the 4 different resources configuration. Like the different number of CPU and amount of Memory. This experiment help us understand the of the batch job in Mesos. The real-time job ran on the Speed Layer. The Speed Layer also perform the real-time machine learning algorithm. Like the real-time classification or prediction for evaluate the performance of the Speed Layer. We believed that the container technology will become more and more popular in recent years.
第三語言摘要
論文目次
目錄
第一章 緒論	1
1.1	研究背景	1
1.2	研究目的與重要性	2
1.3	論文架構	4
第二章 相關技術介紹	5
2.1	Lambda Architecture	5
2.2	Apache Mesos	7
2.3	Apache Kafka	9
2.4	Apache Spark	10
第三章 系統架構	11
3.1	Application	12
3.2	API Server	13
3.3	Batch Layer	15
3.4	Speed Layer	16
第四章 系統實作	17
4.1	叢集硬體	18
4.2	叢集軟體	19
4.3	Mesos與DC/OS	21
4.4	服務部署	22
4.4.1	HDFS	22
4.4.2	Spark	26
4.4.3	Kafka	27
4.5	後端	28
4.6	前端系統	32
4.7	Batch Layer	35
4.8	Speed Layer	39
第五章 實驗	41
5.1	工作啟動時間	41
5.2	推薦系統效能	42
5.3	即時串流效能	43
第六章 結論與未來展望	45
參考文獻	46
附錄-英文論文	47

圖表目錄
圖 1 Lambda架構	5
圖 2 Apache Mesos	7
圖 3 Apache Kafka	9
圖 4 系統架構	11
圖 5 iOS Application	12
圖 6 API Server Design	13
圖 7 Batch Layer	15
圖 8 Speed Layer	16
圖 9 系統架構實作	17
圖 10 叢集硬體資源	18
圖 11 Mesos之叢集資源	20
圖 12 DC/OS Web介面	21
圖 13 HDFS	22
圖 14 hdfs.sh	23
圖 15 HDFS在Marathon的設定	24
圖 16 HA HDFS on Mesos	25
圖 17 Kafka Broker列表	27
圖 18 Route設定	28
圖 19 取得店家資料API	29
圖 20 Nginx設定	30
圖 21後台管理介面-店家管理	31
圖 22後台管理介面-使用者管理	31
圖 23 Podfiles設定	32
圖 24 iOS App介面	33
圖 25 App菜單介面	34
圖 26 build.sbt	36
圖 27 讀取HDFS資料	37
圖 28 切割資料集	37
圖 29 進行模型訓練	38
圖 30 計算測試集的RMSE	38
圖 31 Twitter即時分析架構	39
圖 32 Tweet即時串流	40
圖 33 執行即時的分類演算法	40
圖 34 Replicas與啟動時間	41
圖 35 不同資源與運行時間	43
圖 36 即時串流處理時間	44
參考文獻
[1]	Dong-Ki Kang, Gyu-Beom Choi and Seong-Hwan Kim. “Workload-aware resource management for energy efficient heterogeneous Docker containers.” Region 10 Conference (TENCON), 2016 IEEE
[2]	“Apache Mesos” http://mesos.apache.org
[3]	Dragos Dena, Mihai Bucicoiu and Mircea Bardac. “A managed distributed processing pipeline with Storm and Mesos”. Networking in Education and Research, 2013 RoEduNet International Conference 12th Edition
[4]	“Apache Spark” https://spark.apache.org
[5]	Mariam Kiran, Peter Murphy, Inder Monga. “Lambda architecture for cost-effective batch and speed big data processing” 2015 IEEE International Conference on Big Data (Big Data)
[6]	“Marathon” https://mesosphere.github.io/marathon/
[7]	Meng Wang ; Jun Liu ; Wenli Zhou “Design and Implementation of a High-Performance Stream-Oriented Big Data Processing System” 2016 8th International Conference on Intelligent Human-Machine Systems and Cybernetics (IHMSC)
[8]	N. Marz and J. Warren, Big Data: Principles and best practices of scalable realtime data systems, Manning Publications Co., 2015.
[9]	C.-H. Lee, “淡江呷蝦咪 iOS App,” 2016; https://itunes.apple.com/us/app/danjiang-ga-xia-mi-zui-dao/id933531742?ls=1.
[10]	M.D. Ekstrand, et al., “Collaborative Filtering Recommender Systems,” Found. Trends Hum.-Comput. Interact., vol. 4, no. 2, 2011, pp. 81-173; DOI 10.1561/1100000009.
[11]	 “MovieLens dataset,” 2016; http://grouplens.org/datasets/movielens/.
論文全文使用權限
校內
校內紙本論文立即公開
同意電子論文全文授權校園內公開
校內電子論文於授權書繳交後2年公開
校外
同意授權
校外電子論文於授權書繳交後2年公開

如有問題,歡迎洽詢!
圖書館數位資訊組 (02)2621-5656 轉 2487 或 來信