45
Note: The Copyrights of the referenced materials and photos go to its original authors. As a result, this slide is for internal reference only. For the contents created in this document, the Copyright belongs to William W.-Y. Liang. © 2005-2015 All Rights Reserved. Note: The Copyrights of the referenced materials and photos go to their original authors. As a result, this slide is for non-commercial reference only. For the contents created in this document, the Copyright belongs to William W.-Y. Liang. © 2005-2017 All Rights Reserved. 近年智慧應用與開源系統軟體發展趨勢 The Development Trend of Smart Applications and Open Source System Software during the Past Few Years William W.-Y. Liang (梁文耀), Ph. D. http://www.ntut.edu.tw/~wyliang 產業經驗分享 @ 2017/01/24 台大資工系

The development trends of smart applications and open source system software during the past few years for ntu csie 2017 01

Embed Size (px)

Citation preview

Note: The Copyrights of the referenced materials and photos go to its original authors. As a result, this slide is for internal reference only.

For the contents created in this document, the Copyright belongs to William W.-Y. Liang. © 2005-2015 All Rights Reserved.

Note: The Copyrights of the referenced materials and photos go to their original authors. As a result, this slide is for non-commercial reference only.

For the contents created in this document, the Copyright belongs to William W.-Y. Liang. © 2005-2017 All Rights Reserved.

近年智慧應用與開源系統軟體發展趨勢 The Development Trend of Smart Applications and

Open Source System Software during the Past Few Years

William W.-Y. Liang (梁文耀), Ph. D. http://www.ntut.edu.tw/~wyliang

產業經驗分享 @ 2017/01/24 台大資工系

© 2017 William W.-Y. Liang, All Rights Reserved.

大綱

智慧裝置與應用領域

雲端物聯網整合新趨勢

智慧應用平台的開源趨勢

結論

2 Trends for Smart Applications & OSSS (2017/01/24)

© 2017 William W.-Y. Liang, All Rights Reserved.

什麼是物聯網?

其實並沒有唯一且嚴格的定義!

物聯網是一個概念

也可以說是個『商業名詞』

物聯網 == 智慧聯網 智慧應用

Trends for Smart Applications & OSSS (2017/01/24) 3

© 2017 William W.-Y. Liang, All Rights Reserved.

『物聯網』的意義

『物聯網』代表相關基礎技術成熟

可以套用到生活裡面的許多實際應用之中

Trends for Smart Applications & OSSS (2017/01/24) 4

© 2017 William W.-Y. Liang, All Rights Reserved.

那,到底什麼是物聯網?

物聯網的基礎

嵌入式系統 無線感測網路

物聯網的目標

電子裝置 + 處理器 + 軟體

嵌入式系統 + 無線通訊 + 感測元件

Trends for Smart Applications & OSSS (2017/01/24) 5

© 2017 William W.-Y. Liang, All Rights Reserved.

智慧應用的四大組成 TICS

智慧終端 (Terminal)

使用者資訊擷取與控制平台

物聯網 (IoT)

數據傳遞:無線感測網路、

互聯網、數據通訊網

雲端運算 (Cloud)

資料分析:巨量資料、智慧分析

感測裝置 (Sensor Devices)

數據擷取:個人資訊、家庭資訊、環境資訊

6 Trends for Smart Applications & OSSS (2017/01/24)

http://edition.cnn.com/2013/05/02/travel/london-city-airport-internet-of-things/

© 2017 William W.-Y. Liang, All Rights Reserved.

物聯網裝置範例

7 Trends for Smart Applications & OSSS (2017/01/24)

https://www.kickstarter.com/projects/474570093/sentri-

welcome-to-a-smarter-home

© 2017 William W.-Y. Liang, All Rights Reserved.

智慧裝置應用場域

Smart Home, Smart Living, and Entertainment

E.g. Appliance Controllers, Smart TVs, Remote Control

Devices, E.g. Game Consoles, Portable Game Devices,

Smart Toys, Intelligent Assistant

8 Trends for Smart Applications & OSSS (2017/01/24)

http://www.greenpeak.com/Application/ResidentialApps.html

© 2017 William W.-Y. Liang, All Rights Reserved.

智慧裝置應用場域 (續)

Wearable Devices

E.g. Wearable Computers/Devices,

Sport Watches, Smart Watches,

Google Glasses, Smart Shoes

Information Device

E.g. Digital Photo Frames, Information Pads, Kiosks, Digital

Signage Systems, Smart Watches

9 Trends for Smart Applications & OSSS (2017/01/24) http://www.nexcom.com.tw/news/detail/digital-signage-responds-to-its-audience

© 2017 William W.-Y. Liang, All Rights Reserved.

智慧裝置應用場域 (續)

Surveillance

Video Camera, Monitoring Terminals, CMS,

Home Automation Control Center,

Car-Recording Systems

10 Trends for Smart Applications & OSSS (2017/01/24)

http://hunterkirk.livejournal.com/702857.html

http://www.securitycameraking.com/s

ecurityinfo/tag/home-camera-system/

http://www.realhomesmagazine.co.uk/expert

-advice/expert-advice/integrated-security

http://www.huffingtonpost.com/geoffrey-r-

stone/the-boston-bombing-the-ri_b_3223871.html

© 2017 William W.-Y. Liang, All Rights Reserved.

智慧裝置應用場域 (續)

Telematics Systems

PND & Dash Boards, In-vehicle Entertainment

Systems, Driving Assistant Systems, Auto-Pilot Systems

Industrial & Commercial

Machine Monitory and Control, Smart

Factory, Factory Automation,

Logistics, POS

11 Trends for Smart Applications & OSSS (2017/01/24)

http://www.technologyreview.com/photogallery/4

27652/building-tesla/

https://ec.europa.eu/digital-

agenda/en/embedded-systems

https://www.tesla.com/sites/default/files/styles/custom

er_2x_mobile_1200x816/public/media-

vimeo/154227644.jpg

© 2017 William W.-Y. Liang, All Rights Reserved.

智慧裝置應用場域 (續)

Robots, Autonomous Car, Unmanned Vehicles, UAV

Others: Medical Information

Systems and Health Care Devices,

Energy Saving, Agriculture,

Smart City, etc.

12 Trends for Smart Applications & OSSS (2017/01/24)

http://www.defenseindustrydaily.com/cv-ucavs-the-return-of-ucas-03557/

http://www.nasa.gov/mission_pages/msl/

multimedia/pia15090.html

http://www.forcesofgeek.com/2012/07/sdcc-exclusive-limited-i-robot-3d-blu.html

© 2017 William W.-Y. Liang, All Rights Reserved.

智慧裝置應用場域 (續)

13 Trends for Smart Applications & OSSS (2017/01/24)

Still Much More…

All kinds of Electronic Devices in our daily life could be

turned into some kinds of Smart Devices.

Limited only by your Imagination!

© 2017 William W.-Y. Liang, All Rights Reserved.

大綱

智慧裝置與應用領域

雲端物聯網整合新趨勢

智慧應用平台的開源趨勢

結論

14 Trends for Smart Applications & OSSS (2017/01/24)

© 2017 William W.-Y. Liang, All Rights Reserved.

傳統的計算機系統架構

很久以前開始,計算機系統是長這個樣子的

memory

CPU Input Output

Secondary

Storage

Trends for Smart Applications & OSSS (2017/01/24) 15

© 2017 William W.-Y. Liang, All Rights Reserved.

物聯網時代的新運算系統架構

I/O ⇒ IoT

CPU & Memory ⇒ Cloud Computing

Secondary Storage ⇒ Cloud Storage

Cloud

Storage

Cloud

Computing (CPU&Memory)

IoT Sensor

(Input)

IoT Control

(Output)

Trends for Smart Applications & OSSS (2017/01/24) 16

© 2017 William W.-Y. Liang, All Rights Reserved.

整個串起差不多是這個樣子…

https://www.openstack.org/software/

Trends for Smart Applications & OSSS (2017/01/24) 17

© 2017 William W.-Y. Liang, All Rights Reserved.

雲端與物聯網大架構下的分工

物聯網:資料擷取與受控端

運算相對簡單

雲端:豐富儲存與計算資源

數據收集與分析

終端:資訊可視化顯示

使用者智慧互動

http://jerrydrussell.com/business-2/ibms-cloud-

supercomputer-powers-artificially-intelligent-consumer-apps/ © William Liang, http://www.ntut.edu.tw/~wyliang

http://www.scientificamerican.com/article.cfm?id=yah

oo-supercomputer-google-open-source

Trends for Smart Applications & OSSS (2017/01/24) 18

© 2017 William W.-Y. Liang, All Rights Reserved.

雲端 -- 雲與端

The Clouds ✓Any where & Any time

✓Storage & Computing

✓Availability & Reliability

✓Security

Many of the smart devices will be connected to Clouds

Trends for Smart Applications & OSSS (2017/01/24) 19

© 2017 William W.-Y. Liang, All Rights Reserved.

大數據

大數據收集

Big Data (大數據) 是由

Small Data (感測網路 &

物聯網) 匯集而成

雲端與大數據分析

透過雲端進行數據

收集、追蹤、統計分析

對智慧應用的影響

大數據將提供更精確的用戶使用行為數據,

顛覆傳統的數據統計方式

20 Trends for Smart Applications & OSSS (2017/01/24)

https://upload.wikimedia.org/wikipedia/commons/e/e3/BigData_2267x1146_trasparent.png

趨勢:大數據、感知運算、人工智慧

© 2017 William W.-Y. Liang, All Rights Reserved.

感知運算與人工智慧

感知運算

為使用者進行環境估測與預測,

主動協助或提醒用戶日常工作並

提供建議

感知運算三到五年內將逐漸普及

透過各種智慧終端裝置實現於日常生活之中

人工智慧

感知運算持續演進後將更接近

人工智慧

21 Trends for Smart Applications & OSSS (2017/01/24)

http://www.nownews.co

m/n/2012/12/18/352477

https://upload.wikimedia.org/wikipe

dia/zh/7/73/%E4%BA%BA%E5%B

7%A5%E6%99%BA%E6%85%A7_

%E6%B5%B7%E5%A0%B12.jpg

4G/5G 行動網路頻寬逐步提昇

透過雲端進行AI 運算將更可行

© 2017 William W.-Y. Liang, All Rights Reserved.

終端與雲端之間 延遲更低、距離更近

區域網路的應用 將實現於移動裝置上

高速移動網路時代新趨勢

Trends for Smart Applications & OSSS (2017/01/24) 22

© 2017 William W.-Y. Liang, All Rights Reserved.

移動終端的未來

高速移動網路 + 成熟的雲端技術

⇒ 終端裝置雲端化! 程式與資料雲端化

應用程式資料雲端化, e.g. Apps

應用程式本身雲端化, e.g. Web Apps

平台雲端化

整合雲端的作業系統, e.g. Web-based OS

儲存系統的雲端化, e.g. HB Mobile

終端系統的雲端化, e.g. Thin-client for mobile

Trends for Smart Applications & OSSS (2017/01/24) 23

© 2017 William W.-Y. Liang, All Rights Reserved.

未來的重要趨勢

高速移動網路將使雲端實際成為 物聯網與終端裝置的大腦

智慧應用的架構面將有根本的改變 透過雲端進行 AI 運算將更可行

Trends for Smart Applications & OSSS (2017/01/24) 24

© 2017 William W.-Y. Liang, All Rights Reserved.

大綱

智慧裝置與應用領域

雲端物聯網整合新趨勢

智慧應用平台的開源趨勢

結論

25 Trends for Smart Applications & OSSS (2017/01/24)

© 2017 William W.-Y. Liang, All Rights Reserved.

智慧應用整體架構日趨複雜與多樣化

低複雜度運算(感測前端)

資料收集、資料前處理、裝置間通訊

中複雜度運算(使用者終端)

語音辨識、人臉偵測、多媒體與UI處理

高複雜度運算(雲端智能分析)

語意分析、影像辨識、感測資料處理、使用者

行為預測、商業需求分析、科學計算、人工智慧

26 Trends for Smart Applications & OSSS (2017/01/24)

http://www.scientificamerican.com/article.cfm?i

d=yahoo-supercomputer-google-open-source

NVIDIA_CES14_FINAL_published

如何解決複雜軟體平台問題? 站在開源軟體巨人的肩膀上!

https://en.wikipedia.org/wiki/Watson_(co

mputer)#/media/File:IBM_Watson.PNG

© 2017 William W.-Y. Liang, All Rights Reserved.

智慧裝置的硬體平台 -- 微處理器

低階(如感測節點)

Cortex-M, 8051, other MCUs

中階(如穿戴式裝置)

Cortex-R , Quark, MIPS, etc.

高階:

終端 – Cortex-A, x86/64, MIPS, etc.

雲端 – IA64, PowerPC, ARMv8, GP/GPU, etc.

27 Trends for Smart Applications & OSSS (2017/01/24)

© 2017 William W.-Y. Liang, All Rights Reserved.

作業系統與其開源趨勢

28 Trends for Smart Applications & OSSS (2017/01/24)

& Brillo

http://m.eettaiwan.com/ART_8800697488_676964_NT_57e14b60_2.HTM

感測端: e.g., TinyOS, mbed OS, Brillo, other RTOS, Linux

終端: e.g., Android, iOS, Linux, Web-based OS, Windows

雲端: e.g., Linux, Unix

作業系統之外的其他知名開源專案:Chromium, Firefox, PHP, Python, Apache Web Server, Eclipse, Gimp, Emacs, Vim, etc.

© 2017 William W.-Y. Liang, All Rights Reserved.

開源通用型作業系統範例 -- Linux

Open source and free

Maintained by numerous

volunteer experts and hackers

Robust, efficient, and reliable

Modular, configurable, and scalable

Tons of applications available

Lower hardware requirement and

BOM cost for mid-range to low-end products.

Also suitable for general purpose computers, especially

for high performance servers

29 Trends for Smart Applications & OSSS (2017/01/24)

© 2017 William W.-Y. Liang, All Rights Reserved.

開源通用型作業系統範例 -- Android

Consistent user experience and good UI design

Easy to be commercialized

Complete software framework

Lower App development cost

Already supported by millions Apps

Applicable for m high-end to mid-range devices

High portability for Apps and the OS itself

Suitable for resource-limited handheld devices

30 Trends for Smart Applications & OSSS (2017/01/24)

© 2017 William W.-Y. Liang, All Rights Reserved.

開源物聯網作業系統範例: mbed OS

31 Trends for Smart Applications & OSSS (2017/01/24)

Supports a wide range of ARM Cortex-M based hardware platforms from major MCU vendors

Provide a C++ Application Framework and component architecture

Automation of power management

Connectivity protocol stack support for BLE® , Cellular, Ethernet, Thread, Wi-fi® , Zigbee IP,

Zigbee NAN, 6LoWPAN, TLS & DTLS end-to-end IP secure communication channels, OMA

LWM2M protocol for device management

Software asset protection and secure firmware updates for device security & management

https://developer.mbed.org/blog/entry

/Announcing-our-plans-for-mbed-v30/

© 2017 William W.-Y. Liang, All Rights Reserved.

物聯網開源軟體與開放平台發展趨勢

吸引開發者,拓展更多商機。

在多樣化 IoT 的時代更顯得重要!

32 Trends for Smart Applications & OSSS (2017/01/24)

開源軟體 開放平台

Maker 創客世代來臨

http://en.wikipedia.org/wiki/Mbed_microcontroller

http://en.wikipedia.org/wiki/Raspberry_Pi

http://en.wikipedia.org/wiki/Arduino

http://www.intel.com.tw/content/ww

w/tw/zh/do-it-yourself/edison.html

http://www.actduino.org/?lang=zh-hans

© 2017 William W.-Y. Liang, All Rights Reserved.

多元化物聯網時代的挑戰與策略

挑戰:少量多樣

晶片廠與系統廠傳統客戶支持模式受到挑戰,無法支撐為數眾多但產品量少的客戶

解決方案 (Solution) 模式無法滿足來自客戶多樣化產品設計需求

對策與方法

以主流開源專案運行方式支持開源社群

透過開源社群,眾多少量多樣的創客型客戶可以更容易獲得相關資源以滿足其需求,同時成為社群的一份子

33 Trends for Smart Applications & OSSS (2017/01/24)

http://4.bp.blogspot.com/-R9vN24PYFeY/UdBigAZRscI/

AAAAAAAAAX8/BosVHS-pOps/s730/internet-of-things.png

© 2017 William W.-Y. Liang, All Rights Reserved.

創客與社群

多元創客的特質與需求

創客本身為即為應用開發者,

通常具備自我解決多數問題的能力

創客的需求:充分且公開的資源

持續維護的源碼與相關文件

不斷增加的周邊支援

開源社群優點

熱情的社群參與者激發更多創造力

開源分享的力量共同討論解決問題並成為開放知識庫

高手們的參與協助持續改善源碼品質

34 Trends for Smart Applications & OSSS (2017/01/24)

開源社群的特性與組成 通常是非營利組織 主要由貢獻者組成

系統層開發者 應用層開發者

開源人的特質 熱情、自由、普遍具備較佳的創造力 主動、積極、具深入探究技術的能力

© 2017 William W.-Y. Liang, All Rights Reserved.

開源 vs. 閉源

開源與閉源的原則

只保護最需要的部分

其他部分可考慮盡量開放

沒有技術含量的部分

技術含量太低的部分 (亦即別人也很容易實現的地方)

比較

不開源代表必須自行維護, 包括處理各式各樣客戶的需求 (會增加維護上的負擔與成本)

開源可借力使力, 可透過客戶或其他開發者協助改善軟體品質

35 Trends for Smart Applications & OSSS (2017/01/24)

© 2017 William W.-Y. Liang, All Rights Reserved.

貢獻源碼至上游 (Upstreaming) 的優點

Upstream 源碼

將源碼貢獻回開源源碼庫

一旦開源社群審核並接受 之後,

開發者將持續為該源碼進行維護。

以 Linux Kernel 為例,其優點包括:

較佳品質:被維護的驅動程式可能被開發者 (Kernel

Hackers) 改得更好

持續維護:如果原廠不再維護或開發人員離職時, 該驅動程式可以持續被維護及更新 (特別是對新版本的跟進)

對廠商來說,事實上可降低成本,亦可延長硬體銷售期。

提升公司能見度與 Credit

36 Trends for Smart Applications & OSSS (2017/01/24)

對開源的擔心與戒心並沒有必要 鼓勵開源 ≠ 全面開源 源碼可開放,被複製,但軟

體價值與差異化關鍵在設計者的創作靈感與對核心軟體技術的掌握度

© 2017 William W.-Y. Liang, All Rights Reserved.

如何兼顧開源優點與閉源優化:以硬體驅動為例

設計原則,盡量採開源以擴大適用場域,亦可降低長期維護成本,僅將最關鍵部分以閉源方式實作。

韌體實現方式

作法:以韌體運行於元件內建微控制器

優點:完全隔絕授權議題

缺點:可使用資源較受限

驅動軟體方式

作法:以驅動程式實現所有工作

優點:可運用主系統資源 (CPU & Memory)

缺點:需謹慎處理如 GPL 等授權問題

37 Trends for Smart Applications & OSSS (2017/01/24)

© 2017 William W.-Y. Liang, All Rights Reserved.

如何兼顧開源優點與閉源優化 (續)

中介服務方式

作法:透過中介軟體服務元件操作

優點:可隔絕授權相關問題

缺點:大量 IPC 影響運行效能

混合實作模式

作法:將不重要的程式邏輯開源,關鍵操作保留於韌體於元件控制器或中介服務方式實現

優點:可同時兼顧閉源與開源授權議題

缺點:需良好的設計配套以降低溝通及資料傳輸延遲

38 Trends for Smart Applications & OSSS (2017/01/24)

© 2017 William W.-Y. Liang, All Rights Reserved.

開源與閉源分界的設計原則

如何訂定開源閉源的分界點是一種藝術,如同手術一般,漂亮的一刀是術後讓疤痕最小化的關鍵!

考量重點:保護的價值 vs. 維護成本 vs. 運行效能

若有 GPL 開源授權考量,可考慮將閉源部分放在:

軟體服務元件 (如 Android 與其他 OS)

雲端的伺服器軟體 (如雲端應用與 WebApp 做法)

獨立處理器的韌體 (如微控制器韌體)

驅動軟體的設計通常可將閉源程式邏輯實現於微控制器韌體與上層軟體服務之中 (前述混合實作模式)

39 Trends for Smart Applications & OSSS (2017/01/24)

© 2017 William W.-Y. Liang, All Rights Reserved.

開源授權議題的處理原則

GPL 相關部分必須開放

其他部分能開放盡量開放

閉源而以 binary 呈現的部分,

於不違反 GPL 的前提下,應具備

合理再散播之授權條款 (如 MIT 或 BSD Licenses)

40 Trends for Smart Applications & OSSS (2017/01/24)

認識 GPL 開源 ≠ GPL (General Public License) 強制開源的時機:GPL 軟體重新散佈(redistribution)時 GPL 的感染性

直接修改 GPL 源碼或靜態連結時必然發生 動態連結 (.so & .ko)則需由衍生作品角度來判定

正確運用 GPL:適當拿捏開源與閉源可兼顧開放與保護的目的 GPL 塑造了開源巨人,讓我們可站在其肩膀向前大步邁進!

© 2017 William W.-Y. Liang, All Rights Reserved.

開源的安全性議題

何謂安全 (Security) ?

沒有無法破解的安全體系,只是時間問題!

安全性評估指標:破解時間或代價 >> 破解所得利益

閉源不會比較安全

切勿低估駭客的能力 (舉例…)

開源直接公開接受檢驗

愈多人參予愈能找出漏洞,強化安全性

如何選擇較安全的開源專案

方法1:具備正規化驗證之開源實作 (如:NSA、NICTA)

方法2:商業級開源系統 (如 IBM、Redhat、Canonical)

方法3:越多人積極參予的開源專案安全漏洞將會越少

41 Trends for Smart Applications & OSSS (2017/01/24)

© 2017 William W.-Y. Liang, All Rights Reserved.

大綱

智慧裝置與應用領域

雲端物聯網整合新趨勢

智慧應用平台的開源趨勢

結論

42 Trends for Smart Applications & OSSS (2017/01/24)

© 2017 William W.-Y. Liang, All Rights Reserved.

結論 (1/2)

智慧裝置將可實現於生活中的各種應用場域。

大數據收集與雲端資料分析將顛覆傳統統計方式,提供更精確的預測與判斷,感知運算與AI應用將更為普遍與實際。

雲端與智慧應用密不可分,終端雲端前後台整合與異質架構將成為高效能智慧應用系統設計主流。

高速移動網路逐漸成熟與普及,行動終端、物聯網與雲端將再進一步整合

新的智慧應用生態體系將引發一連串的破壞式創新應用,大幅改變我們的生活方式。

43 Trends for Smart Applications & OSSS (2017/01/24)

© 2017 William W.-Y. Liang, All Rights Reserved.

結論 (2/2)

智慧應用的基礎 – SoC 與 OS 平台正快速演進當中,其中匯集全世界眾多專家打造的開源軟體已成為開發主流。

站在開源巨人肩膀上有機會較容易且快速地解決複雜問題, 而且更安全。

透過貢獻源碼與支持開源社群,能提升軟體品質並使源碼受到長期持續維護,進而降低企業成本。

開源與閉源並非互相牴觸,從架構面進行適度的設計可同時兼顧開源優點與閉源優化的目的。

44 Trends for Smart Applications & OSSS (2017/01/24)

© 2017 William W.-Y. Liang, All Rights Reserved.

Q&A

其他分享:

http://www.cc.ntut.edu.tw/~wyliang/#sharing

http://www.slideshare.net/williamwyliang

Home: http://www.ntut.edu.tw/~wyliang

FB: http://www.facebook.com/william.wyliang

Email: [email protected]

關於講者:梁文耀 (William W.-Y. Liang) • 和沛移動技術長 (2016.04~2017.01) • 顧問 / 開源貢獻者 (2014.10~2016.03) • 鴻海科技集團創新數位系統事業群資深處長 (2013.01~2014.09) • 安佐立科技技術總監 (2012.08~2013.07) • 國立台北科技大學資訊工程系專任助理教授 (2005.02~2012.07) • 先前經歷: 聚興科技研發處協理、晶慧資訊研發副總經理、

晶慧資訊研發部經理、晶慧資訊資深工程師、美商 Avant! 軟體工程師 • 專長領域:作業系統、嵌入式系統、計算機結構、平行與分散式系統 Linux 系統軟體 (1993~Now) Android 與 Linux 嵌入式系統核心及軟硬整合開發 (2001~Now)

• 國立台灣大學資訊工程博士、國立清華大學資訊科學碩士

Trends for Smart Applications & OSSS (2017/01/24) 45