overview of android (part 2): middleware infrastructure layers … · 2 learning objectives in this...
TRANSCRIPT
![Page 1: Overview of Android (Part 2): Middleware Infrastructure Layers … · 2 Learning Objectives in this Part of the Lesson 1. Understand key elements in Android’s middleware infrastructure](https://reader034.vdocuments.net/reader034/viewer/2022052023/603905cf69795821012ab725/html5/thumbnails/1.jpg)
Overview of Android (Part 2):
Middleware Infrastructure Layers
Douglas C. Schmidt
www.dre.vanderbilt.edu/~schmidt
Professor of Computer Science
Institute for Software
Integrated Systems
Vanderbilt University
Nashville, Tennessee, USA
![Page 2: Overview of Android (Part 2): Middleware Infrastructure Layers … · 2 Learning Objectives in this Part of the Lesson 1. Understand key elements in Android’s middleware infrastructure](https://reader034.vdocuments.net/reader034/viewer/2022052023/603905cf69795821012ab725/html5/thumbnails/2.jpg)
2
Learning Objectives in this Part of the Lesson1. Understand key elements
in Android’s middleware infrastructure
• e.g., hardware abstractionlayer, Android runtime, &native libraries
ART|Dalvik Virtual Machine
C+
+/C
CJa
va/J
NI
Hardware components
Middleware infrastructure resides atop the OS & below the apps et al
![Page 3: Overview of Android (Part 2): Middleware Infrastructure Layers … · 2 Learning Objectives in this Part of the Lesson 1. Understand key elements in Android’s middleware infrastructure](https://reader034.vdocuments.net/reader034/viewer/2022052023/603905cf69795821012ab725/html5/thumbnails/3.jpg)
5
Overview of Android’s Middleware
Infrastructure
![Page 4: Overview of Android (Part 2): Middleware Infrastructure Layers … · 2 Learning Objectives in this Part of the Lesson 1. Understand key elements in Android’s middleware infrastructure](https://reader034.vdocuments.net/reader034/viewer/2022052023/603905cf69795821012ab725/html5/thumbnails/4.jpg)
6
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
ART|Dalvik Virtual Machine
C+
+/C
CJa
va/J
NI
![Page 5: Overview of Android (Part 2): Middleware Infrastructure Layers … · 2 Learning Objectives in this Part of the Lesson 1. Understand key elements in Android’s middleware infrastructure](https://reader034.vdocuments.net/reader034/viewer/2022052023/603905cf69795821012ab725/html5/thumbnails/5.jpg)
7
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
ART|Dalvik Virtual Machine
C+
+/C
CJa
va/J
NI
See source.android.com/devices/#Hardware Abstraction Layer
![Page 6: Overview of Android (Part 2): Middleware Infrastructure Layers … · 2 Learning Objectives in this Part of the Lesson 1. Understand key elements in Android’s middleware infrastructure](https://reader034.vdocuments.net/reader034/viewer/2022052023/603905cf69795821012ab725/html5/thumbnails/6.jpg)
8
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Shields Android stack from low-level hardware details
ART|Dalvik Virtual Machine
C+
+/C
CJa
va/J
NI
Hardware components
![Page 7: Overview of Android (Part 2): Middleware Infrastructure Layers … · 2 Learning Objectives in this Part of the Lesson 1. Understand key elements in Android’s middleware infrastructure](https://reader034.vdocuments.net/reader034/viewer/2022052023/603905cf69795821012ab725/html5/thumbnails/7.jpg)
9
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Shields Android stack from low-level hardware details
• Shields OEMs from GNUPublic License “virality”
ART|Dalvik Virtual Machine
C+
+/C
C
Hardware components
Java
/JN
I
See en.wikipedia.org/wiki/Linux_kernel#Licensing_terms
![Page 8: Overview of Android (Part 2): Middleware Infrastructure Layers … · 2 Learning Objectives in this Part of the Lesson 1. Understand key elements in Android’s middleware infrastructure](https://reader034.vdocuments.net/reader034/viewer/2022052023/603905cf69795821012ab725/html5/thumbnails/8.jpg)
10
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
ART|Dalvik Virtual Machine
C+
+/C
C
Hardware components
Java
/JN
I
This layer is composed of several middleware elements
![Page 9: Overview of Android (Part 2): Middleware Infrastructure Layers … · 2 Learning Objectives in this Part of the Lesson 1. Understand key elements in Android’s middleware infrastructure](https://reader034.vdocuments.net/reader034/viewer/2022052023/603905cf69795821012ab725/html5/thumbnails/9.jpg)
11
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
C
This element is composed of two parts
![Page 10: Overview of Android (Part 2): Middleware Infrastructure Layers … · 2 Learning Objectives in this Part of the Lesson 1. Understand key elements in Android’s middleware infrastructure](https://reader034.vdocuments.net/reader034/viewer/2022052023/603905cf69795821012ab725/html5/thumbnails/10.jpg)
12
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
C
A managed execution environment that efficiently
runs Java-based apps & some Android system services
See source.android.com/devices/tech/dalvik
![Page 11: Overview of Android (Part 2): Middleware Infrastructure Layers … · 2 Learning Objectives in this Part of the Lesson 1. Understand key elements in Android’s middleware infrastructure](https://reader034.vdocuments.net/reader034/viewer/2022052023/603905cf69795821012ab725/html5/thumbnails/11.jpg)
13
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
See sites.google.com/site/io/dalvik-vm-internals
ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
CThis managed execution
environment is optimized for mobile device constraints
![Page 12: Overview of Android (Part 2): Middleware Infrastructure Layers … · 2 Learning Objectives in this Part of the Lesson 1. Understand key elements in Android’s middleware infrastructure](https://reader034.vdocuments.net/reader034/viewer/2022052023/603905cf69795821012ab725/html5/thumbnails/12.jpg)
14
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
C
A copy of core Java class libraries & core Android class libraries
See en.wikipedia.org/wiki/Comparison_of_Java_and_Android_API
![Page 13: Overview of Android (Part 2): Middleware Infrastructure Layers … · 2 Learning Objectives in this Part of the Lesson 1. Understand key elements in Android’s middleware infrastructure](https://reader034.vdocuments.net/reader034/viewer/2022052023/603905cf69795821012ab725/html5/thumbnails/13.jpg)
15
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
C
We’ll discuss Java threading shortly
![Page 14: Overview of Android (Part 2): Middleware Infrastructure Layers … · 2 Learning Objectives in this Part of the Lesson 1. Understand key elements in Android’s middleware infrastructure](https://reader034.vdocuments.net/reader034/viewer/2022052023/603905cf69795821012ab725/html5/thumbnails/14.jpg)
16
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
C
Android’s core libraries provide key components that we’ll also cover shortly
Content
Provider
ServiceActivity
Broadcast
Receiver
![Page 15: Overview of Android (Part 2): Middleware Infrastructure Layers … · 2 Learning Objectives in this Part of the Lesson 1. Understand key elements in Android’s middleware infrastructure](https://reader034.vdocuments.net/reader034/viewer/2022052023/603905cf69795821012ab725/html5/thumbnails/15.jpg)
17
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
C
Android’s core libraries provide many other UI & persistence components
![Page 16: Overview of Android (Part 2): Middleware Infrastructure Layers … · 2 Learning Objectives in this Part of the Lesson 1. Understand key elements in Android’s middleware infrastructure](https://reader034.vdocuments.net/reader034/viewer/2022052023/603905cf69795821012ab725/html5/thumbnails/16.jpg)
18
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
See www.coursera.org/specializations/android-app-development
ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
CWe cover Android’s core libraries in the Android App Development Specialization
![Page 17: Overview of Android (Part 2): Middleware Infrastructure Layers … · 2 Learning Objectives in this Part of the Lesson 1. Understand key elements in Android’s middleware infrastructure](https://reader034.vdocuments.net/reader034/viewer/2022052023/603905cf69795821012ab725/html5/thumbnails/17.jpg)
19
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
C
Android—like Java—balances run-time performance & developer productivity
Productivity Performance
![Page 18: Overview of Android (Part 2): Middleware Infrastructure Layers … · 2 Learning Objectives in this Part of the Lesson 1. Understand key elements in Android’s middleware infrastructure](https://reader034.vdocuments.net/reader034/viewer/2022052023/603905cf69795821012ab725/html5/thumbnails/18.jpg)
20
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
C
See www.dre.vanderbilt.edu/~schmidt/PDF/wrapper-facade.pdf
Android’s core libraries are often implemented
as wrapper facades
![Page 19: Overview of Android (Part 2): Middleware Infrastructure Layers … · 2 Learning Objectives in this Part of the Lesson 1. Understand key elements in Android’s middleware infrastructure](https://reader034.vdocuments.net/reader034/viewer/2022052023/603905cf69795821012ab725/html5/thumbnails/19.jpg)
21
Overview of Android’s Middleware Infrastructure• Android’s middleware infrastructure provides reusable capabilities that
extend hardware-centric OS kernel & protocol mechanisms
• Hardware abstraction layer
• Runtime & libraries layer
• Android runtime
• Native C/C++ libraries ART|Dalvik Virtual Machine
Java
/JN
IC+
+/C
C
See developer.android.com/tools/sdk/ndk
These Java wrapper façade are implemented via native C/C++ code
![Page 20: Overview of Android (Part 2): Middleware Infrastructure Layers … · 2 Learning Objectives in this Part of the Lesson 1. Understand key elements in Android’s middleware infrastructure](https://reader034.vdocuments.net/reader034/viewer/2022052023/603905cf69795821012ab725/html5/thumbnails/20.jpg)
48
End of Overview of Android (Part 2): Middleware
Infrastructure