Responsive image
博碩士論文 etd-1118111-091828 詳細資訊
Title page for etd-1118111-091828
論文名稱
Title
Android資料封送編組研究:以雲端資料庫存取為例之實作探討
The Study of Marshalling in Android:Case Implementation of Data Retrieval from Cloud Database Service
系所名稱
Department
畢業學年期
Year, semester
語文別
Language
學位類別
Degree
頁數
Number of pages
71
研究生
Author
指導教授
Advisor
召集委員
Convenor
口試委員
Advisory Committee
口試日期
Date of Exam
2011-11-11
繳交日期
Date of Submission
2011-11-18
關鍵字
Keywords
智慧型手機、雲端、網路應用、Android、編組、資料封裝
Cloud computing, Smart phone, Networking application, Marshalling, Android, Data Retrieval
統計
Statistics
本論文已被瀏覽 5670 次,被下載 0
The thesis/dissertation has been browsed 5670 times, has been downloaded 0 times.
中文摘要
隨著手持智慧型裝置以及各項網路應用的快速發展,裝置間的資料交換成為第一個問題。有無數種方式可以把資料從一端傳送到另外一端,但什麼方法才是最好的?
這篇論文探討常見的幾種資料封裝方式,比較它們之間的特性、優缺點,並且測試不同方法對於資料封裝的成效、封裝後的資料量、封裝所需要的時間等。
另外,為了證明封裝方式的實用性,設計了一個「檔案同步系統」,利用Protocol Buffer做為資料交換的格式,並且實作於Android系統。
Abstract
With the smart handheld devices and the rapid development of network applications, data exchange between devices as the first problem. There are many ways the information can be transmitted from one end to the other end, but which one is the best way?
This paper examines several common data package method, compare their features, advantages and disadvantages, and to test the effectiveness of the data package, the size of data packaged, the package needed time.
In order to prove the practicality of packages, designed a "file synchronization system," using Protocol Buffer as data exchange formats, implementing the Android system.
目次 Table of Contents
序言
誌謝 i
中文摘要 ii
英文摘要 iii
目次 iv

正文
一.序論 1
1.1.研究動機與目的 1
1.2.論文大綱與架構 2
二.資料封裝與交換方法介紹 3
2.1. Serialization 3
2.2. XML 5
2.3. JSON 8
2.4. XDR 9
2.5. Protocol Buffer 11
2.5.1. Protocol Buffer Language 11
2.5.2. Protocol Buffer Binary Format 13
2.5.2.1. Base 128 Varints 13
2.5.2.2. Message Structure 14
2.5.2.3. Signed Integers 15
2.5.2.4. Strings 15
2.5.2.5. Embedded Messages 16
2.5.2.6. Optional And Repeated Elements 16
2.5.2.7. Field Order 16
三. Android Java Framework研究 17
3.1. Activity 17
3.2. Service 18
3.3. Message, Message Queue, Looper, Handler 18
4.1 現有的Android File Sharing方式 21
4.1.1 File Share 21
4.1.2 SwiFTP 24
4.1.3 Dropsync 26
4.1.4 Bluetooth File Transfer 29
4.1.5 Awesome Drop 30
4.2 預期設計的系統 32
五. 程式實作 34
5.1. Protocol Buffer資料結構 34
5.2. 裝置端Android程式設計 38
5.2.1. MainActivity:繼承自Activity 39
5.2.2. CCService:繼承自Service 40
5.2.3. MobileClient:繼承自HandlerThread 42
5.2.4. 裝置端程式流程 45
5.3. 伺服器端Server程式 47
六. 效能分析與成果 49
6.1. 資料封裝比較 49
6.2. 裝置同步系統成果 50
6.3. 結論 52
七. Future work 53

圖次
圖2-1 XML樹狀結構 7
圖3-1 Android執行緒、Message Queue、Looper、Handler間的關係 19
圖4-1 安裝File Share 21
圖4-2 設定File Share權限 22
圖4-3 設定File Share的public分享目錄 22
圖4-4 File Share指定目錄分享 23
圖4-5 File Share網頁端畫面 23
圖4-6 SwiFTP安裝 24
圖4-7 SwiFTP設定 25
圖4-8 SwiFTP啟動畫面 25
圖4-9 FTP電腦端畫面 26
圖4-10 Dropsync設定同步目錄 27
圖4-11 Dropsync設定 27
圖4-12 Dropsync省電設定 28
圖4-13 Dropsync統計資訊 28
圖4-14 Bluetooth File Transfer啟動畫面 29
圖4-15 Bluetooth File Transfer傳輸檔案 30
圖4-16 Awesome Drop安裝 30
圖4-17 Awesome Drop兩端配對 31
圖4-18 Awesome Drop等待傳輸 31
圖4-19 同步系統示意圖 30
圖5-1 裝置端使用者介面 38
圖5-2 MainActivity class diagram 39
圖5-3 CCService class diagram 40
圖5-4 MobileClient class diagram 42
圖5-5 裝置端程式的啟動與關閉 45
圖5-6 裝置端建立新檔案 45
圖5-7 裝置之間的檔案傳輸 46
圖5-8 CCServerHandler相關的class diagram 47
圖6-1 裝置端程式初始化完成 50
圖6-2 裝置端程式開始傳輸 51
圖6-3 裝置端程式傳輸完成 52

表次
表2-1 XML Entity References 7
表2-2 XDR data type 10
表2-3 Protocol Buffer欄位說明 12
表2-4 Protocol Buffer的Field Types 13
表2-5 Protocol Buffer wire types 14
表4-1 檔案傳輸系統的比較 33
表5-1 Command定義 35
表5-2 Reply定義 36
表5-3 FileInfo定義 36
表5-4 FileList定義 37
表5-5 ClientInfo定義 37
表5-6 ClientInfoList定義 38
表5-7 MainActivity處理的訊息 40
表5-8 CCService處理的訊息 41
表5-9 MobileClient相關的執行緒列表 43
表5-10 recvServerList所取得的列表示例 44
表6-1 模擬的資料 49
表6-2 10,000筆資料的封裝測試 49
表6-3 1,000,000筆資料的封裝測試 49
表6-4 XDR與Protocol Buffer的測試資料 50
表6-5 XDR與Protocol Buffer的測試結果 50

參考
參考資料 54

附錄
附錄一:XDR程式設計 56
附錄二:純文字、Serializaion、Protocol buffer、XML、JSON測試程式 57
參考文獻 References
[1] 周坤約、洪博文、歐翼德,專業XML程式設計,2002
[2] Tim Bray、Jean Paoli、C. M. Sperberg-McQueen、Eve Maler、Francois Yergeau,Extensible Markup Language (XML) 1.0 (Fifth Edition),2008
[3] Ecma International,ECMA-262 ECMAScript Language Specification,2011
[4] Request for Comments: 4627,The application/json Media Type for JavaScript Object Notation (JSON)
[5] Request for Comments: 1014,XDR: External Data Representation Standard
[6] 韓超、梁泉,深入淺出Android系統原理及開發要點,2010
[7] 蓋索林,Google!Android 2手機應用程式設計入門第三版,2010
[8] 楊丰盛,Android應用開發揭祕,2011
[9] 王建興、王舜正,Thinging in Java 4/e 中文版,2008
[10] http://java.sun.com/developer/technicalArticles/Programming/serialization/
[11] http://www.w3school.com.cn/xml/xml_intro.asp
[12] http://dom4j.sourceforge.net/
[13] http://www.json.org/
[14] http://blog.roodo.com/syshen/archives/1410294.html
[15] http://audi.tw/Blog/JavaScript/javascript.eval.asp
[16] http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.
aix.progcomm/doc/progcomc/xdr_usexdr_ex.htm
[17] http://code.google.com/intl/zh-TW/apis/protocolbuffers/docs/overview.html
[18] http://developer.android.com/reference/android/app/Activity.html
[19] http://developer.android.com/guide/topics/fundamentals/activities.html
[20] http://developer.android.com/reference/android/app/Service.html
[21] http://developer.android.com/guide/topics/fundamentals/services.html
[22]http://developer.android.com/guide/topics/fundamentals/processes-and-threads.html
[23] http://source.android.com/source/downloading.html
[24] http://ysl-paradise.blogspot.com/2009/01/service.html
[25] http://ysl-paradise.blogspot.com/2010/09/asynctask.html
[26] http://www.android1.net/Topic.aspx?BoardID=11&TopicID=625
[27] http://source.android.com/
電子全文 Fulltext
本電子全文僅授權使用者為學術研究之目的,進行個人非營利性質之檢索、閱讀、列印。請遵守中華民國著作權法之相關規定,切勿任意重製、散佈、改作、轉貼、播送,以免觸法。
論文使用權限 Thesis access permission:自定論文開放時間 user define
開放時間 Available:
校內 Campus:永不公開 not available
校外 Off-campus:永不公開 not available

您的 IP(校外) 位址是 3.128.78.41
論文開放下載的時間是 校外不公開

Your IP address is 3.128.78.41
This thesis will be available to you on Indicate off-campus access is not available.

紙本論文 Printed copies
紙本論文的公開資訊在102學年度以後相對較為完整。如果需要查詢101學年度以前的紙本論文公開資訊,請聯繫圖資處紙本論文服務櫃台。如有不便之處敬請見諒。
開放時間 available 已公開 available

QR Code