Cross Platform
Total Page:16
File Type:pdf, Size:1020Kb
2/4 Featured Sessions, Kandroid S/W Fundamentals Study Group A History of Android Technology www.kandroid.org 운영자 양정수 ([email protected]) 목 차 Technology History : Two Approaches • Source Code and Derivative Works : Git & Gerrit • Reinterpretation and Standard : Google IO & APIs Since 2007, The Direction of Evolution • Platform : Architecture, Measurement f/w, Programming Models • Application : Compatibility, Performance, Memory • Convergence : Android & Chrome, Platform & Service, Cross Platform All History is Contemporary History • Lesson : What must we learn from last 6 years? • Forecast : What is the future of Android Technology? • Action : What must we act as a developer right now? Technology History : Two Approaches “All history is contemporary history” History as thought and as action, Benedetto Croce (1938) gerrit Gerrit Code Review 1. 2008 (May 28–29) 2. 2009 (May 27–28) 3. 2010 (May 19–20) 4. 2011 (May 10–11) 5. 2012 (June 27–29) 6. 2013 (May 15–17) 7. 2014(June 25-26) 2014, 13th Kandroid minmax - www.kandroid.org 3 Technology History : Git & Gerrit Total : 416 / External : 194 (KitKat 기준) Source : 2012, 10th Kandroid Seminar Android Externals & Git Technology 中에서 (JB기준) 200 - 조병호 350 307 etc 180 300 250 platform/bootable 160 200 platform/device 150 140 platform/frameworks 100 151 platform/hadware 50 120 0 platform/packages 100 platform/prebuilts platform/tools 80 platform/system platform/external 60 40 20 0 2014, 13th Kandroid minmax - www.kandroid.org 4 Technology History : Git & Gerrit Code Review System It is intended to find and fix MISTAKES overlooked. - Wikipedia Source : 2013, 11th Kandroid Seminar Goal is COOPERATION, Gerrit – 코드 리뷰 시스템 도입의 필요성 및 사용 中에서 - 차영호 not fault-finding. from Guido Google Employees 안드로이드 코드를 한줄이라도 바꿔본 직원 수 Google 전체 직원수 600여명 37000여명 Framework Commiters Apps/Extra Commiters 20% time 68명 Google Employees 69명 2014, 13th Kandroid minmax - www.kandroid.org 5 Technology History : Google I/O & Standard API 1. 2008 (May 28–29, 2008) : OpenSocial, App Engine, Android… 2. 2009 (May 27–28, 2009) : Android, App Engine, Chrome… 3. 2010 (May 19–20, 2010) : Android, App Engine, Chrome, Google TV… 4. 2011 (May 10–11, 2011) : Android, Chrome, Chrome OS 5. 2012 (June 27–29, 2012) 1. Day 1 : Android, Google+, Project Glass 2. Day 2 : Chrome, Cloud, Project Glass 3. Day 3 : Mobile App Analytics 6. 2013 (May 15–17, 2013) 1. Day 1 : Android, Chrome OS, Chrome, Google Play 2. Day 2 : Google Glass Apps, Google+ Development Session Types • 101: 101 sessions don't require previous knowledge of a particular product or technology. They include overviews of a technology and introductions into new areas. That doesn't mean they aren't technical, because most are. If you are new to a product, start with the 101 sessions and progress to 201s. • 201: 201 sessions provide a deeper dive into a technology or product. These sessions go beyond the basics and are aimed at developers already familiar with a technology. • Code Labs: Code Labs walk developers through their first experience with a product or particular aspect of a product. They are 2 hour, more hands-on sessions where engineers will walk you through actual code. • Fireside Chats: Q&A is often the best part of a session, as it gives developers a chance to ask what's on their minds. Fireside chats are a chance to talk to the product engineering teams. • Tech Talks: Google has a tradition of holding informative Tech Talks on campus that offer insight into an area. In that tradition, Google I/O features Tech Talks on subjects of interest to developers, such as computer science problems and programming languages. 2014, 13th Kandroid minmax - www.kandroid.org 6 Technology History : Google I/O & Standard API 2008 2009 2010 2011 2012 2013 2014 AOSP M C D E F G H I J K Branch SDK 1 23 45 6 7 8 9 10 13 1415 16 17 1819 (API Level) NDK 1 2 3 4 5 6 7 8 9 9c (Revision) RenderScript android.support.v8.renderscript Extras android-support-v13.jar android-support-v7.jar Support Lib. (+USB Drivers) r1 r2 r3 r4 r6 r8r9 r10 r11 r13 r18 android-support-v4.jar Open Handset Alliance (OHA) T-Mobile USA SKT Mobile Operators Open Access Traffic Qualcomm MSM7201a Semiconductor Multi-Core GPU / 64Bit Companies HTC G1 Handset Partnership New Platform Manufacturers with Google Inc. Strategy 2014, 13th Kandroid minmax - www.kandroid.org 7 목 차 Technology History : Two Approaches • Source Code and Derivative Works : Git & Gerrit • Reinterpretation and Standard : Google IO & APIs Since 2007, The Direction of Evolution • Platform : Architecture, Measurement f/w, Programming Models • Application : Compatibility, Performance, Memory • Convergence : Android & Chrome, Platform & Service, Cross Platform All History is Contemporary History • Lesson : What must we learn from last 6 years? • Forecast : What is the future of Android Technology? • Action : What must we act as a developer right now? Platform : Architecture Since 2007, The Direction of Evolution User Phone & Nfc(JB) App Space DRMServer (JB) Launcher Platform (User App) • Architecture MediaServer • Measurement f/w SurfaceFlinger • Programming Models SystemServer Application • Compatibility • Performance Framework Service • Memory • System Services • Hardware Services Convergence • Android & Chrome Dalvik VM Service • Platform & Service Manager • Cross Platform Native Service • Sersor Service ( Binder • Surface Flinger Context Manager ) libbinder.so (libcutils.so, libutils.so) /dev/binder Kernel Binder Ashemem Space 2014, 13th Kandroid minmax - www.kandroid.org 9 Platform : Architecture Since 2007, The Direction of Evolution Application Test Thread Case test.apk Platform Instrumentation • Architecture • Measurement f/w • Programming Models TLS Application Hello Application Android • Compatibility Activity Activity .apk • Performance H • Memory Thread dispatchMessage() Window Views Convergence Views • Android & Chrome Views • Platform & Service Looper • Cross Platform Choreographer Service $FrameHandler Threaded Binder dispatchMessage() Task Object Message Queue ContentProvider Receiver Intent Binder AsyncTask Android Resources Thread Thread Manifest.xml Pool Pool 2014, 13th Kandroid minmax - www.kandroid.org 10 Platform : Architecture Since 2007, The Direction of Evolution Move Engineers from PalmSource (Dianne Hackborn, etc…) Platform • Architecture • Measurement f/w • Programming Models Application • Compatibility • Performance OpenBinder Binder • Memory next generation BeOS Cobalt system Linux Android Convergence • Android & Chrome • Platform & Service • Cross Platform 2001 2005 The Binder communicates between processes using a small custom kernel module. This is used instead of standard Linux IPC facilities so that we can efficiently model our IPC operations as "thread migration". That is, an IPC between processes looks as if the thread instigating the IPC has hopped over to the destination process to execute the code there, and then hopped back with the result. Source : http://www.angryredplanet.com/~hackbod/openbinder/docs/html/BinderIPCMechanism.html 2014, 13th Kandroid minmax - www.kandroid.org 11 Platform : Architecture Since 2007, The Direction of Evolution Main Event Loop and IPC Thread Migration Platform • Architecture • Measurement f/w Context TLS • Programming Models Activity Thread Application bindService() H • Compatibility handleMessage() • Performance Looper • Memory Service Connection Convergence • Android & Chrome onService Service • Platform & Service Connected Message • onCreate() • Cross Platform (IBinder) • onBind() Queue • onUnbind() • onDestory() IService.Stub. Custom 구현 asInterface Binder (IBinder); Thread IService.stub() { • getValue() BT #1 • setValue() IService.Stub. } Proxy() { } BT #N HelloAndroid.apk User application Process User application Process 2014, 13th Kandroid minmax - www.kandroid.org 12 Platform : Measurement Framework Since 2007, The Direction of Evolution General Performance Performance Monitoring Sensitive Paths Tools / APIs Platform • Architecture • Measurement f/w • Programming Models Application Event StrictMode • Compatibility • Performance • Memory Bitmap Networking • systrace Convergence Invalidate Adapter • Android & Chrome Decoding and I/O • TraceView • Platform & Service • Cross Platform • getView() Measurem ent - Dump • HierarchyViewer - Recycling - ViewHolder • Tracer for OpenGL ES • Setting App (Dev Opt.) Layout Update Draw Swap Draw dumpsys DisplayList DisplayList Buffers 2014, 13th Kandroid minmax - www.kandroid.org 13 Platform : Measurement Framework Since 2007, The Direction of Evolution Platform • Architecture • Measurement f/w • Programming Models Tracing Point Application Java Native • Compatibility • Performance • Memory atrace ATRACE_CALL() android.os.Trace Convergence ATRACE_INT() • Android & Chrome start stop dump • Platform & Service Trace Trace Trace jni • Cross Platform android_os_Trace ScopedTrace adbd Tracer systrace (python) tracing_on … trace trace_marker adb Linux Kernel (ftrace feature) 2014, 13th Kandroid minmax - www.kandroid.org 14 Platform : Measurement Framework Since 2007, The Direction of Evolution Activity Platform Set • Architecture Something Event Property Invalidate • Measurement f/w Happens • Programming Models Value Application • Compatibility • Performance Draw • Memory Display List Convergence • Android & Chrome • Platform & Service Measure Prepare Update Draw Swap • Cross Platform & Draw DisplayList DisplayList Buffers Layout Dequeue Enqueue Buffer Buffer Display Composite Post Windows Buffer SurfaceFlinger 2014, 13th Kandroid minmax -