Upload
others
View
5
Download
0
Embed Size (px)
Citation preview
webOS for Smart Devices
2013. 06. 24
LG Electronics / CTO Software Platform Lab.
Seung Kyoon Woo
1. webOS History
2. webOS Architecture
3. webOS Features
4. webOS Future
1/36
1. webOS History
1996 ~ 2005 ~ 2007
Palm OS는 간결한 디자인과 많은 응용 SW로 폭발적으로 판매 (다수 업체와 라이센스를 맺음)
하지만 오래된 OS인 Palm OS의 한계로 새로운 독자적인 플랫폼 개발 필요
Palm OS의 역사
분사
Wrist PDA
(Fossil)
인수
Treo 700W
(Windows
Mobile)
PC guys are not going to just figure this out. They're not going to just walk in
Ed Colligan (Handspring) 영입
Apple이 Phone을 만들 거라는 소문이
돌기 시작함
Apple iPhone을 출시, 아직 AppStore가 열리
기 전으로 그 impact를 인지하지 못함
우수한 인재들을 영입함 (Paul Mercer,
Matias Duarte, Jon Rubinstein)
2/36
1. webOS History
2008 2009 2010
Webkit의 장점을 활용한 webOS 탄생, Best of CES 2009를 수상하며 큰 반향을 일으킴 하지만,
비즈니스적인 실패 (사업자 선택, 출시 일정, 시장 분석)로 webOS 기반 디바이스는 큰 빛을 보지 못함
webOS의 탄생 그리고 시련
Verizon에서
Palm Pre Pulses / Pixi Pulses 출시
(Motorola Droid에 밀려
Headline Device 에서 제외)
“The 3G smartphone smart enough for mom”
Prima vs webOS (Luna)
• Prima: Palm의 첫 번째 차세
대 OS (여러 결점으로 많은
내부 비판에 직면)
• webOS: 코드명 Luna, Greg
Simon과 Andy Grignon은
Webkit 기반의 새로운 OS
제안
CES 6개월 전 Prima 포기
Palm의 차세대 OS로 webOS
선정
1월 webOS기반
Palm Pre 발표
(CES 2009)
“iPhone Killer”
7월 Sprint 독점으로 Palm Pre 출시
비슷한 시기에 경쟁사 제품 출시
(Motorola DROID, iPhone 3GS)
‘저가 스마트폰’ Palm Pixi 출시
3/36
1. webOS History
2010 2011 2012
HP가 Palm을 인수하여 HP 제품에 webOS를 탑재하려는 많은 시도가 이어졌으나 사업적으로 실패
webOS기반 Device는 개발이 중단되고, webOS는 Open Source화 함
HP, webOS 인수
Open webOS Project 공표
webOS Project 발표 이틀 전에
Rubinstein 사임
“This has been a four and half year
burn. … I don't think people
understand that what we did
accomplish during that time frame
was amazing.”
4월 HP가 Palm을 인수함
HP 제품에 webOS를 탑재하려
는 많은 시도가 이어짐
7월 TouchPad 출시
8월 Device 개발 중단을 발표
TouchPad 제고는 $99에 판매
HP webOS를 외부에 판매하겠다는
발표를 함
webOS on Printer
(제품 개발 완료,
가격 경쟁력이
없어 출시 못함)
webOS for Windows
“A lot of people left, and they’re bringing the spirit with them. A thousand webOSes will bloom, I hope.” (Pre to postmortem: the inside story of the death of Palm and webOS (The Verge))
4/36
webOS의 부활 1. webOS History
'웹OS'의 소스코드, 개발인력, 관련 문서 등 인수 자체 스마트TV 플랫폼 기술혁신 지원 및 차세대 웹 기반 스마트TV 기술 트렌드에 신속한 대응 가능 LG전자가 HP로부터 '웹OS(webOS)'를 인수하며 스마트TV 소프트웨어 역량을 강화 … HP의 오픈소스 프로젝트를 지속 추진할 계획 … LG전자 CTO 안승권 사장은 … "웹OS와 LG전자의 기술력이 만나 전 세계 소비자들에게 LG 스마트 TV의 차별화된 경험을 제공할 것“ … HP COO 빌 베트는 … "LG전자가 갖춘 혁신성과 소비자 가전 분야에서의 명성이 이를 가능하게 할 것“… 조선일보 (2013.02.26)
Enda McGrath의 트위터 인증샷 (webOS Evangelist)
5/36
Philosophy 2. webOS Architecture
Simple, Beautiful User Experience
Web-Centric, Cross Platform, Open Standards
Extensible, Pluggable Architecture
Leverage Open-Source Technologies
Keep It Simple
Open webOS
6/36
Architecture 2. webOS Architecture
• Enyo-based applications
• Qt-based system manager
• QtWebKit-based browser “ISIS”
• Luna bus-based components
• Node.js-based javascript services
• No-sql DB “DB8”
• Platform portability layer “Nyx”
• OpenEmbedded-based Build System
http://www.openwebosproject.org/
7/36
Application Example
An application of webOS consists of UI and non-UI parts
• UI part: Web (html, javascript, css, enyo), Native (QT, SDL)
• Non-UI part (service): JavaScript (mojo service framework), Native (c/c++)
HelloWorld.Service
UI part of HelloWorld Application
IPC/BUS
Non-UI part of HelloWorld Application
HelloWorld Application Package
xxx.Service
yyy.Service
…
…
Application Services
System Services
2. webOS Architecture
8/36
UI part of an application draws UI components by communicating with
services <html>
<body>
<script type="text/javascript"> new enyo.HelloWorld().renderInto(document.body); </script>
</body>
</html>
enyo.kind({ name: "enyo.HelloWorld", … components:[ // Define services { kind: "PalmService", name: “HelloWorld", service: "palm://com.palm.helloworld", method: “hello“, onResponse: “printHelloWorld”} ], create: function() { this.$.HelloWorld.call({}); // Communicate with service }, printHelloWorld: function(inSender, inResponse) { enyo.log(inResponse); // Draw UI (response) }, })
HelloWorld.html
HelloWorld.js
2. webOS Architecture Application Example
9/36
Javascript service supports less LOC (lines of code) through service framework
based on Node.js
var HelloWorldAssistant = function() { } // Service implementation HelloWorldAssistant.prototype.run = function(future) { future.result = {reply: "Hello World !"}; }
static char *SERVICE_NAME = (char *) "com.palm.helloworld"; static char *SERVICE_CATEGORY = (char *) “/”; static LSMethod Methods[] = {{ “hello", print_hello_world}}; // Service implementation static bool print_hello_world(LSHandle *sh, LSMessage *msg) { retVal = LSMessageReply(sh, msg, “Hello World !”, &lserror); } void main(){ … // Register Service (com.palm.helloworld) LSRegisterPubPriv(SERVICE_NAME, &gServiceHandle, false ,&gLserror); // Register Service API (com.palm.helloworld/hello) LSRegisterCategory(gServiceHandle, SERVICE_CATEGORY, Methods, NULL, NULL, &gLserror); … }
HelloWorld.c (Native Service)
HelloWorldAssistant.js (JavaScript Service)
2. webOS Architecture Application Example
10/36
Web app framework supporting - Cross-Platform (OS, Device) - HTML5 - Native Quality
1. Cross-platform
2. Optimized for mobile Enyo has roots in mobile
3. Lightweight and fast Enyo is small (core is <25k gzipped)
4. Highly customizable and extensible
With a small, rock-solid core, Enyo is modular and designed to be
extended
5. Built to enable maintenance and reuse
Elegant component model
6. Free and open-source Apache License, Version 2.0
http://enyojs.com
3. webOS Features Enyo
11/36
3. webOS Features Enyo
Enyo 1.0은 webOS 3 (HP TouchPad)을 위한 app framework로 개발됨
HP webOS는 full-featured HTML5 apps을 개발할 수 있는 framework가 필요했음
Mail, Contacts, Calendar, Messages 등 개발
Release history
July 2011: Enyo 1.0 officially released
December 2011: Open-source announcement made
January 2012: Enyo 2.0 beta released
– First open-source, cross-platform release, core only
February 2012: Enyo 2.0b2 released
– Base UI added to core and Fittable added to Layout library
March 2012: Enyo 2.0b3 released
– Added Onyx UI widget library
April 2012: Enyo 2.0b4 released
– Added List to Layout library
June 2012: Enyo 2.0b5 released
– Added Panels to Layout library and Bootplate starter
July 2012: Enyo 2.0GA released
– Full QA cycle and Sampler app released
12/36
3. webOS Features Enyo
Enyo 2 공식 사이트
http://enyojs.com
다양한 문서와 링크 제공
– http://enyojs.com/docs
Enyo 2 Sampler
http://enyojs.com/sampler
공식 Sample App 모음
Sampler도 Enyo Application임
각 Sample은 jsFiddle에서 소스 수정과 테스트 가능
– http://jsfiddle.net
Community Gallery
http://enyojs.com/gallery
커뮤니티 멤버가 자싞이 개발한 Enyo Component를 공유하는 곳
Gallery도 Enyo Application임
13/36
Programming Style
HTML Mark-up Driven JavaScript Driven
Framework JQuery, Dojo Sencha Touch, Enyo
Pros. • Javascript를 몰라도 간단한 화면 구성 가능 • 기존 사이트를 쉽게 변경 가능
• 다양한 앱 개발 용이 • 객체 지향적 개발 및 코드 재사용 용이
Cons. • 확장성이 어려움 • 동적이고 다양한 어플리케이션 개발 부족
• 마크업 기반 프레임워크 대비 진입장벽이 높음
3. webOS Features
<div data-role="header">
<h1>Header</h1>
</div>
<div data-role="content">
<p>Hello World!</p>
</div>
<div data-role="footer">
<h2>Footer</h2>
</div>
enyo.kind({
name: "App",
kind: enyo.Control,
components: [
{kind: enyo.Header, components: [
{content: "Header"}
]},
{kind: "Control", content: "Hello World!"},
{kind: enyo.Footer, components: [
{content: "Footer"}
]},
]
});
Enyo
14/36
Luna Bus
Browser Server
Node.js
V8
Rendering Sub-System
SysMgr
QT 5.0
WebAppMgr
Webkit / QT
Luna Bus
Powerd DB8 Activity Manager
File Cache
contacts
calendar
im
Enyo
Apps
Standard Linux Kernel
Connman-adapter
DBus
ConnMan
Bus System Clients Services
3. webOS Features
15/36
A B C
< Luna Bus > < D-Bus >
Luna Bus is a clone of D-Bus
A (Luna Bus Only)
More Performance (See below picture)
Service Security & Policy
One Request & Multiple Reply
B (Luna Bus and D-Bus)
Service, Object, Method Addressing
Asynchronous API & Signal API
C (D-Bus Only)
Synchronous API
Interface Addressing
Per User Bus (== Session Bus)
Native Type Arguments
Code Generator & Introspection
Load Balance mechanism
D-Bus Daemon
Client A
Client B
Service A
Service B
Client A
Client B
Service A
Service B
Luna Bus Daemon
3. webOS Features Luna Bus
16/36
3. webOS Features Service
webOS에서 서비스란?
기능 제공의 단위
한 Process가 여러 서비스를 가질 수 있음
Luna-bus를 이용해 다른 App 및 서비스와 연결
Luna-bus
Service 1 Service 2
Service 3 Service 4
App 1 App 2 App 3
17/36
Service 4. webOS Features
Luna bus-based non-UI middleware components
Scalability (easy plug-in), faster performance, offloaded processing, shared processing
< Just Type WepApp >
Audio Service Application Manager
Service
Luna-bus
1
2
3
4
1. Request sound output for Key input
2. Return output result
3. Request App List for the input
4. Return App List
Sound-related service
(ex. key, ringtone)
Application-related service
(ex. Installation, launch, search, update)
18/36
Luna-bus
Static Service
Dynamic Service
Services launched by bus (when necessary
(ex. a client calls the service))
• Terminated after some time
Features
• Slow first response time
• Efficient memory usage (on-demand)
Services run in booting time
Features
• System daemon (Always running…)
• High response time
Init/Upstart Process
Fork
Fork
4. webOS Features Service
19/36
Luna-bus
Native Service
JavaScript Service
Services implemented by JavaScript
• Node.js based services
Features
• See next page…
Services implemented by C/C++
Features
• Low memory usage
(compared with JS service)
• Fast response time
4. webOS Features Service
20/36
Node.js
• V8 기반 JavaScript 기반 플랫폼 (Server-side JavaScript Platform)
3. webOS Features JavaScript Service
<HTTP Server 구현 예>
Node.js Android
http 모듈 활용 ……..
……..
21/36
JS Service 장점 (vs Native)
개발 편의성
• 네이티브 서비스 대비 작은 LOC
(lines of code) 가능
• 활발한 node.js modules eco-
system (npm) 활용 가능
• 앱과 서비스 개발 시 동일한 환경
및 API 사용 가능
관리 편의성
• 다양한 디바이스에 쉽게 포팅 가능
• 네이티브 서비스 대비 쉬운
업데이트 가능
3. webOS Features
Node Runtime
Web Apps
Luna Bus
Services Framework
Foundations
Services
JS Service
webOS Node.js Add-ons
JavaScript Service
22/36
3. webOS Features JavaScript Service
Service 종류 별 응답 시갂 비교 (단위 : 초)
Service 종류 별 메모리 사용량 비교 (단위 : MB)
– RSS 기준이므로 실제 메모리 사용량은 더 적음
Native Service JavaScript Service JavaScript Service with fork server
Static Service
0.31 0.32 0.32
Dynamic Service
0.33 1.09 0.59
Native Service JavaScript Service JavaScript Service with fork server
메모리 사용량 1.56 9.52
20.70 ( node_spawner 1.56 +
JS Service 9.34 + fork_server 9.8 )
23/36
Synergy
Javascript service framework for 3rd party developers to add more cloud services
to the built-in applications (ex. Contacts, Calendar, Messaging)
< Contacts with Synergy >
-Account Template (json) -DB (json) -Service (javascript)
(Built-in Contact App) (3rd Party Contact List in Built-in Contact App)
3. webOS Features
24/36
Touch2Share
Seamless connectivity solution between webOS devices
By tapping one device against the other, a user can share data between two
Touch2Share-enabled devices over Bluetooth connection
3. webOS Features
25/36
DB8
빠르고 가벼운 Key-Value 기반 (no-sql) DB 서비스
• Data stored as JSON objects in collections
• Designed for syncing with cloud computing and apps
• Optional support for backup-restore from cloud
• Change notification support.
• App-aware access control.
• Paging support for queries that can retrieve up to 500 objects at a time.
• LevelDB as backend
3. webOS Features
26/36
ISIS Browser
Fast, standards-compliant, cross-platform web browser
• QtWebKit 기반 Rendering Engine
• 빠른 성능과 표준 호환성 보장
• Enyo 기반 Browser UI
• Browser UI 구성과 테마 변경 용이
• Client-server 기반 Rendering Process
Browser UI (client)와 Rendering Process (server)
를 분리하여 Web Site가 Loading 중일 때도
화면 Scroll 사용 가능 (반응성이 좋음)
3. webOS Features
Client Process (Webkit 기반)
Enyo
Framework
Server Process (Webkit 기반)
Shared
Memory
+
Web Page
Renderer
Browser UI
/ Web App
Browser
Web Page
To Frame Buffer
27/36
3. webOS Features
Ares
Browser-based, web-hosted development environment for the creation of webOS
applications
SDK
* Pallete - IDE상에서 다양한 visual component 를 지원함
* IDE Menu - WYSIWYG 및 Code Editor 화면 전환 - Create Project - Save - Launch Emulator - Help
* Non-Visual Component - Pallete 상에 표시된 component들 중 화면에 표시될 수 없는 component 들을 표시
* Property Menu - Project 전체에 적용 되는 속성 - Settings - Styles - Events - Help
* 편집 Menu - file 경로 - Editor 전환 - undo/redo - cut/copy/paste
* Layout View - 가로모드 보기 - 세로모드 보기
* View 설정 - Pallete - View - Files
28/36
SDK
Plug-In Development Kit (PDK)
Easy porting of C/C++ applications to webOS, especially games that use SDL or
OpenGL ES (1.1 or 2.0) for 3D graphics
Easy integration of C/C++ components to enhance the capabilities of webOS
applications
3. webOS Features
iPhone App over webOS Game Developers Conference, 2010
(Need for Speed Undercover, The Sims3,
MONOPOLY, Asphalt5, Let's Golf!, Glyder 2,
X-Plane, …)
* https://developer.palm.com/content/api/dev-guide/pdk/overview.html
29/36
Nyx
Platform Portability Layer
A layer of abstraction between the higher layers and the physical hardware
To be built on any standard Linux kernel
3. webOS Features
Device Type Constant Device Type String
NYX_DEVICE_BATTERY Battery
NYX_DEVICE_BLUETOOTH_INPUT_DETECT BluetoothInputDetect
NYX_DEVICE_CHARGER Charger
NYX_DEVICE_DISPLAY Display
NYX_DEVICE_HAPTICS Haptics
NYX_DEVICE_KEYS Keys
NYX_DEVICE_LED Led
NYX_DEVICE_MEDIA_CAMERA Camera
NYX_DEVICE_MEMORY Memory
NYX_DEVICE_SENSOR_ACCELERATION SensorAcceleration
NYX_DEVICE_SENSOR_ANGULAR_VELOCITY SensorAngularVelocity
NYX_DEVICE_SENSOR_GRAVITY SensorGravity
NYX_DEVICE_SENSOR_MAGNETIC_FIELD SensorMagneticField
NYX_DEVICE_SENSOR_ORIENTATION SensorOrientation
NYX_DEVICE_SENSOR_PROXIMITY SensorProximity
NYX_DEVICE_SENSOR_ROTATION SensorRotation
NYX_DEVICE_TOUCHPANEL Touchpanel
30/36
Build System
Desktop build
• For enhancing the webOS user experience with new features and integrating state of
the art open source technologies
• Developers can now use all their desktop tools on powerful development
machines.
OpenEmbedded build
• For porting webOS to new and exciting devices
OpenEmbedded
• Widespread community adoption
• Excellent cross-compiling support
for embedded platforms
• Support for multiple hardware
architectures
3. webOS Features
31/36
Development Roadmap
We will continue to innovate and develop for Open webOS over the
coming months, including the following planned enhancements:
• webOS Core
• Qt5 / WebKit2
• New media architecture
Open sourced media and
audio components
• New optimized rendering
architecture
No custom IPC and
rendering mechanism
• New middleware components
BlueZ Bluetooth stack
ConnMan network management
4. webOS Future
32/36
• Enyo
• Data model integration and binding
• Optional model-view-controller library
• Application UI templates for common app layouts
• Ares
• Improvements to the Designer component for greater ease of use
• More code completion and context-sensitive documentation
• Additional Hermes components to extend the local and cloud file storage options
• ISIS
• Implement essential features
• Improve performance and stability
• Adhere to web standards
• Deliver new user experience innovations
4. webOS Future Development Roadmap
33/36
4. webOS Future Web App Performance
http://vimeo.com/55486684#t=32
http://www.slideshare.net/corp/alejandro-villanueva-google-inc
34/36
Vision
The best web-standards operating system
on the planet.
Your content, whenever, where ever you
want it.
Simple, beautiful user experience.
4. webOS Future
35/36
Vision
How do we get there?
Do a few things, but do them really well.
Seamless cloud integration.
Grow our cross-platform eco-system.
Drive web-standards adoption.
4. webOS Future
36/36
Q & A