Вы находитесь на странице: 1из 29

Notes for Unit 5

Mobile Computing Architecture


The n/w centric mobile computing architecture uses a three –tier architecture. The first tier is
User Interface or Presentation Tier. This layer deals with user interfacing, device handling, and
rendering. The user system interface provides user services such as session, text input, dialog
and display management.

The Second Tier is Process Management or Application Tier. This layer is for application
programs or process management where business logic and rule are executed. This layer is
capable of accommodating hundreds of users. In addition , the middle process management
tier controls transactions and asynchronous queuing to ensure reliable completion of
transactions.

The Third Tier is Database Management or Data Tier which is for database access and
management.

Mobile Computing Architecture

In case of Mobile Computing the system will be used through any network, any bearer, any
agent and any device. The system should be connected to a ubiquitous network like
Internet.

Presentation Layer

 Responsible for presenting the information to the end user.


 Runs on the client machine and provides all the user interfaces.
 Includes the web browser, WAP browser and the client programs.
Mobile Computing Architecture

Application Tier
This tier is independent of presentation and database Management. It is the engine of a
ubiquitous application. It performs the business logic of processing user input, obtaining
data and making decisions. It addition to business logic it handles additional management
functions (decision related to rendering, n/w management, security, data store access etc.).
These additional functions are handled using middleware. Middleware-layer of software is
the one which is sitting between OS and user interface of the software. There are many
types of Middleware- Message oriented Middleware, Transaction Processing Middleware,
communication Middleware, Distributed Objects and components, Transcoding
Middleware, Web Services etc.

Message oriented Middleware


Loosely connects different applications through asynchronous exchange of messages.
Works independently of platform or processor configuration. This is generally asynchronous
and peer to peer and works in Publish/subscribe fashion. Examples include MQ series from
IBM, Java Message Service (JMS) etc.
Transaction Processing Middleware
This middleware provides tools and environment for developing transaction based
distributed applications. This is capable of providing services to thousands of clients in a
distributed Client-Server environment. This middleware is independent of database
architecture. Example-CICS (Customer Information Control System) from IBM

This maps numerous client requests through application service routines to different
application tasks as show in the figure below.

Communication Middleware
This middleware is used to connect one application to another. This is quite useful in the
telecommunication world. It uses mediation server to automate the telnet protocol to
communicate to nodes in the network. Example- using telnet to connect one application to
another.

Distributed Objects and Components


Handles open distributed object computing infrastructure. Example- Common Object
Request Broker Architecture (CORBA). CORBA is a vendor independent infrastructure. It is
highly interoperable across heterogeneous platforms

Transcoding Middleware
Used to transcode one format of data to another suiting the network of the client. This is
useful for content adaptation to fit the needs of device. For example if we want to access a
website using a mobile phone then the HTML page has to be transcoded to WML page
Example- Internet Content Adaptation Protocol (ICAP) from IETF.
Data Tier
This tier is used to store data needed by the application and acts as a repository for both
temporary and permanent data. It can use XML for interoperability of data with other
systems and data sources. This tier might incorporate the use of Database Middleware and
SyncML.

Database Middleware
It interfaces application programs and database. It allows the business logic to be
independent and transparent of the database technology and database vendor. These are
sometimes called database connectors eg. ODBC, JDBC, etc.

Design Considerations for Mobile Architecture


The Mobile Computing Environment needs to be context-independent as well
as context-sensitive. Context information is the information related to the
surrounding environment of an actor in that environment. Mobility implies
that attributes associated with devices and users will change constantly. Such
changes shall mean that content and behaviour of applications should be
adapted to suit the current situation
Some examples are:
• Content with context awareness (Ex. Mobile Banking where different content is made
for different target devices based on the context/ characteristics of the target devices/
agents )
• Content switch on context (Service is provided with intelligent code with identifies the
agent and does the transcoding/ route the request)
• Content transcoding on context (middleware does the transcoding)
Mobile Database
A mobile database is either a stationary database that can be connected to by a mobile
computing device - such as smart phones or PDAs - over a mobile network, or a database which
is actually carried by the mobile device.

Many applications require the ability to download information from an information repository and
operate on this information even when out of range or disconnected. The need to manipulate larger
amounts of data, combined with the slow speeds—and often the unavailability—of current
wireless data networks leads many applications to require a local relational database on the
mobile device.

Functionality required of mobile DBMSs includes ability to:

 Communicate with centralized database server through modes such as wireless or Internet
access;
 Replicate data on centralized database server and mobile device;
 Synchronize data on centralized database server and mobile device;
 Capture data from various sources such as Internet;
 Manage/analyze data on the mobile device;
 Create customized mobile applications.

Why Mobile Databases ?

 Smart client applications have emerged as the architecture of choice over browser-based
wireless Internet applications, as they enable access to data while the mobile user is
disconnected from the network—wireless or otherwise.
 This capability is best implemented by incorporating persistent data storage using a mobile
database in the application.
 The main advantage of using a mobile database in the application is offline access to data.
 The ability to read and update data without a network connection.
 This helps avoid problems such as dropped connections, low bandwidth, and high latency
that are typical on wireless networks today.

Possible Applications
• Traffic control
• Taxi dispatch
• Emergencies services: police, medical, fire, …
• Car navigation
• Location-aware search and recommendation
• Social applications: information / opinion sharing and search among community
• …
Mobile database offerings from traditional database powerhouses
The traditional database powerhouses—IBM, Oracle, Sybase, and Microsoft—have all
developed mobile database products that work in conjunction with their enterprise database
products. Several popular mobile database products have emerged including Sybase SQL
Anywhere Studio 8.0, Oracle9i Lite, Microsoft SQL Server CE, and the PointBase RDBMS.
These products include support for a variety of programming languages, operating
environments and include synchronization support for replicating data to/from enterprise data
sources.

Mobile Database Architecture of Oracle9i Lite

Mobile Database System Architecture

Mobile databases typically involve three parties: fixed hosts, mobile units, and base stations.
Fixed hosts perform the transaction and data management functions with the help of database
servers.
Mobile units are portable computers that move around a geographical region that includes the
cellular network (or "cells") that these units use to communicate to base stations. (Note that
these networks need not be cellular telephone networks.)
Base stations are two-way radios, installations in fixed locations, that pass communications
with the mobile units to and from the fixed hosts.
When a mobile unit leaves a cell serviced by a particular base station, that station transparently
transfers the responsibility for the mobile unit's transaction and data support to whichever
base station covers the mobile unit's new location.

Issues in Mobile Databases

i. Data management

How to improve data availability to user queries in mobile database systems?

Data caching
• Results of previous queries are cached on mobile clients
 Cache size
 Cache freshness/update frequency
 Cache consistency
• Query log can be further used in personalization and recommendation
– User preference learning
• keywords, categories, location
– Collaborative filtering for content recommendation

Representation and storage of mobile data


 Spatial data management
 Location information
 Data volume, update frequency, persistency
 Indexing and retrieval schemes
 High-dimensional feature space
 Structure for improving retrieval efficiency
Data classification
 Location-dependent
o Location-based services
 E.g. nearby gas stations or restaurants within 1km, available paths to the
park, …
o Database distribution or replication must take location into consideration
 Distributed vs. centralized
 Location-independent
o Personal name, account information, plate number, …

ii. Transaction Management Issues


1. Mobile query processing
Query types
• Location dependent query
• Location aware query
• Location independent query

Location dependent query


A query whose result depends on the geographical location of the query origin
– E.g.
• What are the 3 nearest gas stations or restaurants?
• What is the shortest path to the park?
– GPS can facilitate this
• Outdoor only
• WLAN could cover most of the indoor locality
Location aware query
A query whose context might be related to locations
– E.g.
• Find out all the car plates passing through the traffic light between 7:00-8:00pm
• Find out the current location of the bus on route #212
• Find out the top 5 road segments that have the most traffic in Delhi (the
slowest car speed)

Query Constraints
 Query response time
o Realtime query
 Search-result accuracy
o Distance, time, path, traffic flow, …
 Throughput: number of queries per time unit
o Scalability: large number of simultaneous queries

Concurrency control
 Similar to the issues of concurrency control in distributed systems
o Time synchronization
 Timestamps, clocks
o Latency in mobile queries
o Similar issues to cache consistency
 Size of query results

Transaction and error recovery


A transaction is the execution of interrelated instructions in a sequence for a specific operation on a
database.
Conventional transaction properties
 Atomicity: All operations of a transaction are assumed to be one indivisible unit. If all operations of a
transaction cannot be completed then it must be rolled back. Eg. Transfer of Rs 1000 fro account A to
B.
 Consistency: Data must not be in a contradictory state after the transaction. Eg after transfer the sum
total of the balances in A and B accounts should be equal.
 Isolation: If two transactions are performed simultaneously there should not be any interference
between them i.e. they have to be isolated. Eg. balance transfer from A to B and then balance transfer
from C to A. It the transactions are not isolated then balance from C and previous balance in A should
get transferred to B.
 Durability- after a transaction is complete, it must persist and cannot be aborted or discarded. For eg.
Once an amount has been transferred from account A to B it should not be rolled back.
Conventional transaction properties are too rigid for mobile database
•Flexibility can be introduced

Replication Strategies
1. Synchronous Data Replication
Synchronous replication is a technique for replicating the data between databases where the system
being replicated waits for the data to have been recorded on the duplicate systems before proceeding.
Under synchronous data replication (SDR) strategy, updates are applied to all the database replicas of an
object as a part of the original transaction. The database replicas are then kept in a state of
synchronization at all the network nodes by updating all the replicas as a part of one atomic transaction.
That is, when one copy is updated, all other copies need to be updated as well.

Advantage:
Synchronous replication guarantees that all copies have the same data.
Disadvantage
In write-all approach if a transaction tries to write to all copies of replicated system and one copy is not
available, the transaction can’t commit.
This doesn’t provide availability and prevents replication from occurring.
Due to an increase in response time and communication delays, this scheme is often impractical unless
the secondary systems are close to the primary system
2. Asynchronous Data Replication (ASDR)
Asynchronous Replication is a technique for replicating data between databases where the system being
replicated does not wait for the recording of the data on other duplicate systems. With asynchronous
replication in a multi-master of peer-to-peer environment, an update is done in one database, and when
it is committed the transaction is propagated to other masters. This way it requires less networking and
hardware resources than synchronous replication. However, ASDR does not enforce consistency
between the replicated databases.

A conflict might occur, as for a period of time, data might be different in different master sites. The
delay in regaining consistency may range from a few seconds to several hours or even days.
Asynchronous replication has the advantage of speed at the risk of data loss during communication or
duplicate system failure. But this is the latest technology to provide fault tolerance for server and
network storage. Asynchronous replication technology works by capturing changes in files at the
operating system level whereas technique works at the application level.

3. Snapshot Replication
Snapshot replication is in all replication types as initial base copy of the database to subscribers. A
snapshot is a copy of a database in a single point of time. Entire snapshot is initially copied from the
distributor to subscribers by the distribution agent. From thereon, the data in the published tables is
refreshed periodically. This can be a long process as database snapshots can be large in size and can take
lot of resources. Therefore careful planning and scheduling is required. Generally, snapshot replication is
used mostly in read-only data distribution setting, where data is updated infrequently. It is the simplest
replication type SQL Server offers.

4. Push and Pull Data Replication Strategies


 Push data replication strategy includes both snapshot replication and near-real time replication
schemes. Snapshot data replication is best suited to applications not in need of current data. Such
applications are found in data warehousing, or data mining as well as non-real time decision support
systems.
 A near real time replication employs triggers that are stored at each local database and executes
each time a part of the replicated database is updated propagating the changes to the other remote
databases.
 In the push strategy, the source data/ publisher site controls the data replication procedures while
with pull data replication schemes, the local databases/ subscriber site determine when they wish
to receive replication transactions.
 These schemes are preferred as they are less disruptive.
Constant Data Availability (CODA)
WHAT IS IT?
CODA is a Distributed File System and a descendent of the Andrew File System 2. It was designed to be:
 Highly secure
 Available
 Transparent to its users.
Andrew File System:
 Architecture of Coda is based on Andrew File System
 AFS was developed at Carnegie Mellon University
 It was designed to support the CMU community that meant serving 10, 000 workstations

CODA was designed to overcome the Limitations of AFS which include:


 Limited form of replication posed scaling problems
 Non-availability of services when servers and network components failed
 Did not cater to the mobile use of Mobile devices

Design Rationale
 CODA major objectives were
o Using off-the-shelf hardware
o Preserving transparency
 Other considerations included
o Need for scalability
o Advent of portable workstations (mobile devices)
o Balance between availability and consistency

Coda has many features that are desirable for network file systems, and several features not found
elsewhere
 Disconnected operation for mobile computing.
 Is freely available under a liberal license
 High performance through client side persistent caching
 Server replication
 Security model for authentication, encryption and access control
 Continued operation during partial network failures in server network
 Network bandwidth adaptation
 Good scalability
 Well defined semantics of sharing, even in the presence of network failures

How Does CODA Work?

It works by implementing two COMPLEMENTARY functionalities which facilitate:


1. Availability of files by replicating a file volume across many servers . The set of replication sites
for a volume is its Volume Storage Group (VSG). The set of a VSG that is currently accessible to a
client is referred to as Accessible VSG (AVSG)

2. Disconnected mode of operation by caching files at the client machine

The Coda architecture is based on AFS: The Andrew File System

AFS is divided into two types


of nodes:
1. Vice nodes: dedicated file
servers
2. Virtue nodes: client
machines
Venus: A process that is hosted on each Virtue system.

VFS: Virtual File System, intercepts the calls from client application or user processes and forwards them
either to the local file system or Venus.

Coda uses a local cache to provide access to server data when the network connection is lost.

 During normal operation (Hoarding State) a user reads and writes to the file system normally, while
the client fetches, or "hoards", all of the data the user has listed as important in the event of
network disconnection.

 If the network connection is lost, the Coda client's local cache serves data from this cache and logs
all updates. This operating state is called disconnected operation (Emulating State).

 Upon network reconnection, the client moves to reintegration state; it sends logged updates to the
servers. Then it transitions back to normal connected-mode operation.

Client Structure
 Venus is a user-level process which intercepts Unix file system calls via Sun Vnode
interface.
 The Vnode forwards the system call to the Coda Mini Cache.
 If the file is found in the Mini Cache serves the file and the control returns to
Application.
 Otherwise the Mini Cache contacts Venus to service the call.
 This in turn may involve contacting the CODA servers.
 Control returns from Venus to application via mini-cache, updating the mini-cache
state as a side effect.
 Measurements from the implementations confirm that Mini-cache is critical for
good performance.

Venus States
1. Hoarding: Normal operation mode
2. Emulating: Disconnected operation mode
3. Reintegrating: Propagates changes and detects inconsistencies

Hoarding state
In Hoarding state, Venus hoards the useful data in anticipation of disconnection. Venus manages its
cache in such a way that it balances the need of connected and disconnected operations. It uses Priority
Algorithm for cache updation.
Many factors complicate the implementation of hoarding :
 File reference behaviour especially in the distant future cannot be predicted with certainty.
 Disconnection and reconnection are often unpredictable.
 Since cache space is finite, the availability of less critical objects may have to be sacrificed in favour
of more critical objects.
Emulating State
In Emulating State Venus performs many actions normally handle by servers. When the no. of services in
the client AVGS (Accessible Volume Storage Group) drops to zero then Venus transits to the Emulating
State. Venus emulated the behaviour of server and handles all the file requests using the locally
cached copy of the file.

Reintegration State
This is a transitory state through which the Venus passes in changing roles from pseudo-server to cache
manager. In this state Venus propagates changes made during emulation and updates its cache to
reflect current server state. Reintegration is performed one volume at a time. During this state
conflicts/inconsistencies are detected and resolved. During Reintegration if the connection with the
server is lost then the client is brought back to Emulating State.
Mobile Agents
What is a mobile agent?
Agent: Program that acts autonomously on behalf of a user (usually communicating with other
agents) i.e. “an independent software program, which runs on behalf of a network user”.
Mobile agent: Agent that migrates from machine to machine in an autonomous manner.
A mobile agent is a program that, once it is launched by a user, can migrate from node to node
autonomously in a heterogeneous network and can continue to function/ work on behalf of the
user/creator/author of the agent even if the user is disconnected from the network.

An agent is an object, hence it contains state/ data and methods. Among the instance data is an
itinerary of the sites to be visited, which may be dynamically constructed or adjusted. Other
data may include an agent ID or other authentication data. The agent’s behavior at each stop
can be pre-programmed and dynamically adjusted.
A mobile agent is not bound to the system on which it begins execution. It is free to travel
among the hosts in the network. Created in one execution environment, it can transport its
state and code with it to another execution environment in the network, where it resumes
execution. The term “state” typically means the attribute values of the agent that help it
determine what to do when it resumes execution at its destination. Code in an object-
oriented context means the class code necessary for an agent to execute.
This ability allows it to move to a system containing an object with which it wants to
interact and then to take advantage of being in the same host or network as the object.

Life Cycle of a Mobile Agent

1. The mobile agent is created in the Home Machine.


2. The mobile agent is dispatched to Host Machine A for execution
3. The agent executes on Host Machine A
4. After execution the agent is cloned to create two copies one copy is dispatched to Host
Machine B and the other is dispatched to Host Machine C.
5. The cloned copies execute on their respective hosts.
6. After execution, Host Machine B and C send the mobile agents back to Home Machine.
7. The Home Machine retracts the agents and analyses the data brought by them. Then
the agents are disposed.

Events in the Life Cycle of a MA


Creation: When a new agent is created and its state initialized.
Dispatch: An agent travels to new host
Cloning: A twin agent is born and the current state of the original is duplicated in the clone.
Deactivation: An agent can be put to sleep and its state stored on a disk of the host.
Activation: A deactivated agent is brought back to life and its state is restored from disk.
Retraction: An agent is brought back from remote host along with its state to the source or
Home Machine.
Disposal: An agent is terminated

Properties of Mobile Agent


• Mobility: Have the ability to move from one host to another in the network.
• Adaptive Learning: Mobile agents can learn from experience and adapt themselves to
the environment. They can monitor traffic in large networks and learn about the trouble
spots in the network. Based on their experience they can choose better routes to reach
the next host.
• Autonomy: They can take decisions on their own for example they are free to choose
their next host and when to move. These remain transparent to the user but they are
taken in the interest of the user.

Reasons for Using Mobile Agents


1. MA reduce the network load
• Distributed systems often rely on communication protocols involving multiple
interactions to accomplish a given task. The result is a lot of network traffic.
• Mobile agents allow users to package a conversation and dispatch it to a destination
host where interactions take place locally.
• Mobile agents are also useful when reducing the flow of raw data in the network. When
very large volumes of data are stored at remote hosts, that data should be processed in
its locality rather than transferred over the network.
• The motto for agent-based data processing is simple: Move the computation to the
data rather than the data to the computation.
2. They Overcome Network Latency
Critical real-time systems, such as robots in manufacturing processes, need to respond in real
time to changes in their environments. Controlling such systems through a factory network of
substantial size involves significant latencies. For critical real-time systems, such latencies are
not acceptable. Mobile agents offer a solution, because they can be dispatched from a central
controller to act locally and execute the controller’s directions directly.

3. They Encapsulate Protocols


When data is exchanged in a distributed system, each host owns the code that implements the
protocols needed to properly code outgoing data and interpret incoming data. However, as
protocols evolve to accommodate new requirements for efficiency or security, it is
cumbersome if not impossible to upgrade protocol code properly. As a result, protocols often
become a legacy problem. Mobile agents, on the other hand, can move to remote hosts to
establish channels based on proprietary protocols.

4. They execute Asynchronously and Autonomously


Mobile devices often rely on expensive or fragile network connections. Tasks requiring a
continuously open connection between a mobile device and a fixed network are probably not
economically or technically feasible. To solve this problem, tasks can be embedded into mobile
agents, which can then be dispatched into the network. After being dispatched, the agents
become independent of the process that created them and can operate asynchronously and
autonomously. The mobile device can reconnect at a later time to collect the agent.

5. They are naturally heterogeneous


Network computing is fundamentally heterogeneous, often from both hardware and
software perspectives. Because mobile agents are generally computer- and transport layer-
independent (dependent on only their execution environments), they provide optimal
conditions for seamless system integration.

There are no mobile agent applications, but there are plenty of applications that
benefit from using mobile agents.
i. E-commerce
Mobile agents are well suited for commerce. A commercial transaction may require real-time
access to remote resources, such as stock quotes and perhaps even agent-to-agent negotiation.
Different agents have different goals and implement and exercise different strategies to
accomplish them. We envision agents embodying the intentions of their creators, acting and
negotiating on their behalf. Mobile agent technology is a very appealing solution for this kind of
problem.

ii. Personal assistance


Mobile agents’ ability to execute on remote hosts makes them suitable as assistants performing
tasks in the network on behalf of their creators. Remote assistants operate independently of
their limited network connectivity; their creators can even turn off their computers. For
example, to schedule a meeting with several other people, a user can send a mobile agent to
interact with the agents representing each of the people invited to the meeting. The agents
negotiate and establish a meeting time.

iii. Distributed information retrieval


Instead of moving large amounts of data to the search engine so it can create search indexes,
agent creators can dispatch their agents to remote information sources where they locally
create search indexes that can later be shipped back to the system of origin. Mobile agents can
also perform extended searches that are not constrained by the hours during which a creator’s
computer is operational.

iv. Telecommunication networks services


Support and management of advanced telecommunication services are characterized by
dynamic network reconfiguration and user customization. The physical size of these networks
and the strict requirements under which they operate call for mobile agent technology to
function as the glue which keeps the systems flexible as well as effective.

v. Workflow applications and groupware


The nature of workflow applications includes support for the flow of information among co-
workers. Mobile agents are especially useful here, because, in addition to mobility, they provide
a degree of autonomy to the workflow item. Individual workflow items fully embody the
information and behaviour they need to move through the organization independent of any
particular application.
vi. Monitoring and notification
An agent can monitor a given information source without being dependent on the system from
which it originates. Agents can be dispatched to wait for certain kinds of information to become
available.

vii. Information dissemination


Mobile agents embody the so-called Internet push model. Agents can disseminate information,
such as news and automatic software updates, for vendors.The agents bring the new software
components, as well as installation procedures, directly to customers’ computers where they
autonomously update and manage the software.

viii. Parallel processing


Given that mobile agents can create a cascade of clones in the network, another potential use
of mobile agent technology is to administer parallel processing tasks. If a computation requires
so much processor power that it must be distributed among multiple processors, an
infrastructure of mobile agent hosts can be a plausible way to allocate the related processes.

Security in Mobile Agent Systems


Security concern is the primary deterrent of deploying the mobile-agent technology. There are
concerns for both the agent hosts and the mobile agents.
Agent host concerns
 Malicious/unauthorized agents can misuse/destroy system resources (e.g., worms).
Agent concerns
 Malicious hosts can destroy or alter an agent’s logic, ( e.g., Mobile agent’s route can be
altered.)

Security Measures:
 Authentication – an agent must authenticate itself to the host, and an agent server must
authenticate itself to the agent.
 Encryption – an agent encrypts its sensitive data.
 Resource access – a host enforces strict access control to its resources.

Mobile-agent Framework Systems


Distributed Java architectures have been designed to address security concerns and other
issues. These are collectively called Mobile Agent Architectures. Some examples are
 IBM's Aglets Architecture and ObjectSpace's Voyager System. These systems are
specifically designed to allow and support the movement of Java objects between JVMs,
carrying their data along with their execution instructions.”
 Concordia (developed by Mitsubishi EIT): Concordia is a full-featured framework for the
development and management of network-efficient Mobile Agent applications which
extend to any device supporting Java. Concordia consists of multiple components, all
written wholly in Java, which combine together to provide a complete, robust environment
for applications. The main applications include Mobile computing, Database, Internet and
Information Management.
Overview of Android OS
Android is an operating system based on the Linux kernel and designed primarily for touchscreen mobile
devices such as smartphones and tablet computers. Android is a software stack for mobile devices that
includes an operating system, middleware and key applications.

Android, Inc. was founded in Palo Alto, California in October 2003 by Andy Rubin, Rich Miner, Nick
Sears and Chris White. Google acquired Android Inc. on August 17, 2005. Android was unveiled in 2007
along with the founding of the Open Handset Alliance—a consortium of hardware, software, and
telecommunication companies devoted to advancing open standards for mobile devices.

The first android phone was HTC G1. “It looked like a weapon. It was so sharp and jagged and full of hard
lines. It looked like you could cut yourself on the edges”.

Android is the fastest growing mobile OS with Over 300,000 Android activations a day. Over 1 million
applications are available in Google store with 1 billion downloads for these application.

Each Android version is named after a dessert (in alphabetic order)


 Cupcake (1.5)
 Donut (1.6)
 Éclair (2.0 -2.1)
 Froyo (Frozen Yoghurt) (2.2)
 Gingerbread (2.3)
 Honeycomb (3.0)
 Ice Cream Sandwich (4.0)
 Jelly Bean (4.1- 4.3)
 Kitkat (4.4) October 31, 2013

Hardware Platform for Android

 The main hardware platform for Android is the ARM architecture.


 There is support for x86 from the Android x86project
 Google TV uses a special x86 version of Android

Hardware
Android devices incorporate many optional hardware components, including still or video cameras, GPS,
hardware orientation sensors, dedicated gaming controls, accelerometers, gyroscopes, barometers,
magnetometers, proximity sensors, pressure sensors, thermometers, and touchscreens.

Some hardware components are not required, but became standard in certain classes of devices, such
as smartphones, and additional requirements apply if they are present.

Android Open Source Project (AOSP) is led by Google


The Android Open Source Project (AOSP) is led by Google, and is tasked with the maintenance and
development of Android.According to the project "The goal of the Android Open Source Project is to
create a successful real-world product that improves the mobile experience for end users.“

AOSP also maintains the Android Compatibility Program, defining an "Android compatible" device "as
one that can run any application written by third-party developers using the AndroidSDK and NDK", to
prevent incompatible Android implementations..

Android Software Stack


The Android Software Stack consists of Linux Kernel, Middleware (Libraries, Dalvik Virtual Machine and
Application Framework) and Applications.
Android Software Stack

Linux Kernel

The Linux kernel is the operating system kernel used by the Linux family of Unix-like operating systems.
It is one of the most prominent examples of free and open source software.) version 2.6. In computing,
the kernel is the main component of most computer operating systems; it is a bridge between
applications and the actual data processing done at the hardware level.

Android consists of a kernel based on the Linux kernel. Android relies on Linux Kernel 2.6 for core system
services

 Memory and Process Management


 Network Stack
 Driver Model
 Security
This is an abstraction layer between the H/W and the rest of the S/W stack.
Middleware

Middleware is computer software that provides services to software applications beyond those available
from the operating system. It can be described as "software glue". Middleware makes it easier for
software developers to perform communication and input/output, so they can focus on the specific
purpose of their application.

Android provides a middleware layer including libraries that provide services such as data storage,
screen display, multimedia, and web browsing. As the middleware libraries are compiled to machine
language, services execute quickly. Middleware libraries also implement device-specific functions, so
applications and the application framework need not concern themselves with variations between
various Android devices. Android's middleware layer also contains the Dalvik virtual machine and its
core Java application libraries

Android S/W Stack - Libraries


The libraries include a set of C/C++ libraries used by components of the Android system. These are
exposed to developers through the Android application framework.

Core Libraries
The core libraries provide most of the functionality available in the core libraries of the Java language.
These APIs include support for

 Data Structures
 Utilities
 File Access
 Network Access
 Graphics

Dalvik Virtual Machine

Provides an environment on which every Android application runs. Each Android application runs in its
own process, with its own instance of the Dalvik VM. Dalvik has been written such that a device can run
multiple VMs efficiently.

While most Android applications are written in Java, there is no Java Virtual Machine in the platform and
Java byte code is not executed. Java classes are compiled into Dalvik executables and run on Dalvik, a
specialized virtual machine designed specifically for Android and optimized for battery-powered mobile.
.dex format is optimized for minimal memory footprint. Android uses the Dalvik virtual machine with
just-in-time compilation to run Dalvik dex-code (Dalvik Executable), which is usually translated from Java
bytecode. Dalvik VM runs the application relying on the Linux Kernel for Threading and Low-level
memory management.

Application Framework
This framework enables and simplifies the reuse of components. Developers have full access to
the same framework APIs used by the core applications. Users are also allowed to replace
components. The features of this framework and their respective roles are as given below
Feature Role

View System Used to build an application, including lists, grids, text


boxes, buttons, and embedded web browser

Content Provider Enabling applications to access data from other


applications or to share their own data

Resource Manager Providing access to non-code resources (localized strings, graphics, and
layout files)

Notification Manager Enabling all applications to display customer alerts in the status bar

Activity Manager Managing the lifecycle of applications and providing a common


navigation back stack

Applications
Android provides a set of core applications:
 Email Client
 SMS Program
 Calendar
 Maps
 Browser
 Contacts
 Etc
All applications are written using the Java language. The Android SDK tools compile your code—along
with any data and resource files—into an APK: an Android package, which is an archive file with
an .apk suffix. One APK file contains all the contents of an Android app and is the file that Android-
powered devices use to install the app.

Once Installed on a Device, each Android App Lives in its Own Security Sandbox:
The Android operating system is a multi-user Linux system in which each app is a different user. By
default, the system assigns each app a unique Linux user ID (the ID is used only by the system and is
unknown to the app). The system sets permissions for all the files in an app so that only the user ID
assigned to that app can access them. Each process has its own instance of virtual machine (VM), so an
app's code runs in isolation from other apps. By default, every app runs in its own Linux process. Android
starts the process when any of the app's components need to be executed, then shuts down the process
when it's no longer needed or when the system must recover memory for other apps.

Features
1. Handset layouts
The platform is adaptable to larger, VGA, 2D graphics library, 3D graphics library based on OpenGL
ES 2.0 specifications, and traditional smartphone layouts.

OpenGL for Embedded Systems (OpenGL ES or GLES):OpenGL for Embedded Systems (OpenGL ES or
GLES) is a subset of the OpenGL computer graphics rendering application programming interface
(API) for rendering 2D and 3D computer graphics such as those used by video games, typically
hardware-accelerated using a graphics processing unit (GPU). It is designed for embedded systems
like smartphones, computer tablets, video game consoles and PDAs.

2. Storage
SQLite, a lightweight relational database, is used for data storage purposes.

3. Connectivity
Android supports connectivity technologies including GSM/EDGE, CDMA, EV-DO, UMTS,
Bluetooth, Wi-Fi, LTE,NFC and WiMAX.

4. Messaging
SMS and MMS are available forms of messaging, including threaded text messaging
Android Cloud To Device Messaging (C2DM) is also a part of Android Push Messaging
service.

5. Search
Search is a core feature in android which enables a user to search any data on device or internet. It
has a feature to gives Search suggestions based on recent queries. It provide custom search
suggestions that match actual results in application data. It also has Voice Search feature based on
voice recognition which makes search quite convenient.
6. Locations & Maps
This is one of the most popular and compelling apps for mobile devices. Google Maps provides free
navigation which allows applications to access location services supported by device. Google
provides Maps external library. This application supports built-in downloading, rendering and
caching of Maps tiles, and other display options and controls.

7. Memory Management
Android is designed to manage memory (RAM) to keep power consumption at a minimum, in
contrast to desktop operating systems which generally assume they are connected to unlimited
mains electricity. When an Android app is no longer in use, the system will automatically suspend it
in memory – while the app is still technically "open", suspended apps consume no resources (for
example, battery power or processing power) and sit idly in the background until needed again. This
has the dual benefit of increasing the general responsiveness of Android devices, since applications
do not need to be closed and reopened from scratch each time, and also ensuring that background
applications do not consume power needlessly.

When memory is low, the system will begin killing apps and processes that have been inactive for a
while, in reverse order since they were last used (oldest first). This has the dual benefit of increasing
the general responsiveness of Android devices, since applications do not need to be closed and
reopened from scratch each time, and also ensuring that background applications do not consume
power needlessly.

Android manages the apps stored in memory automatically: when memory is low, the system will
begin killing apps and processes that have been inactive for a while, in reverse order since they were
last used (oldest first). This process is designed to be invisible to the user, such that users do not
need to manage memory or the killing of apps themselves.

8. Multiple language support : Android supports multiple languages.


9. Web browser: The web browser available in Android is based on the open-source WebKit
layout engine, coupled with Chrome's V8 JavaScript engine.
10. Multi-touch
Android has native support for multi-touch which was initially made available in handsets
such as the HTC Hero
11. Bluetooth
voice dialing and sending contacts between phones. Keyboard, mouse and joystick support
is available in Android 3.1 and later versions, and in earlier versions through manufacturer
customizations and third-party applications
12. Video calling
13. Tethering
Android supports tethering, which allows a phone to be used as a wireless/wired Wi-Fi
hotspot. Before Android 2.2 this was supported by third-party applications or manufacturer
customizations.
14. Media Support
Android supports the following audio/video/still media formats: WebM, H.263, H.264 (in
3GP or MP4 container), MPEG-4 SP, AMR, AAC, HE-AAC (in MP4 or 3GP container), MP3,
MIDI, FLAC, WAV, JPEG, PNG, GIF, BMP.
15. Streaming media support
RTP/RTSP streaming (3GPP PSS, ISMA), HTML progressive download (HTML5 <video> tag),
Adobe Flash Streaming (RTMP), HTTP Dynamic Streaming are supported by the Flash plugin,
Apple HTTP Live Streaming is supported by RealPlayer for Android and by the operating
system in Android 3.0

Вам также может понравиться