逐頁講義原文 / Slide-by-slide source text
以下為講義英文文字的自動提取,讓你逐頁核對上方中英筆記及搜尋細節;它不是逐頁中文翻譯。圖表、公式排版及部分旋轉文字可能缺失,請以原 PDF 為準。
Automatically extracted English lecture text for checking the bilingual explanations. Figures, formula layout and some rotated text may be missing; consult the original PDF.
講義第 1 頁 / Lecture slide 1
Wireless Mobile Internet
講義第 2 頁 / Lecture slide 2
Outline
Wireless mobile Internet architecture
Key components
Proxy services (Transcoding, Caching)
Mobile data management講義第 3 頁 / Lecture slide 3
Wireless Mobile Internet Architecture
Wireless mobile Internet applications are based on the
mobile client-server model with the three- tier architecture
Client tier: Mobile devices (smartphones, tablets, IoT sensors)
Proxy tier: Gateways, proxies
Server tier: Application servers, synchronization server, messaging
server, data storage
Client Tier Proxy Tier Server Tier
Application
Wireless Server
Wireless Gateway
Network Wired Synchronization
🌐🌐 Network Server
Mobile Base
Device Station Messaging Data Storage
Server講義第 4 頁 / Lecture slide 4
Wireless Internet Architecture
Two architecture types
Thin client architecture
Use the same c/s architecture as Internet application.
Business logic and data are stored on the fixed server side.
Client-side mobile device uses a microbrowser to display the
information; no other software is required on the client device.
Client-side device needs a persistent connection to networks; The
microbrowser handles the communication with wireless networks.
Typically used for information service applications.
Thick client (smart client) architecture
Application software is installed on the client device.
It incorporates mobile database technology to provide persistent data
storage management and data synchronization to enterprise systems.
Client application can have some “smarts” or business logic to process
data.
It can access application data even when disconnected from the network.
Most suitable for applications in ‘occasionally connected’ environments.講義第 5 頁 / Lecture slide 5
Thin Client Advantages
Extend internet computing applications to mobile
environments.
Need minimal to zero software deployment
configuration.Applications are deployed without any additional client-side
Entire configuration, adaptation and updating only take place on the
server.
Keep fresh data
All of the data used are the latest version; no stale data.
Provide high data security
client side.All the data is stored on the server side; no data is stored on the講義第 6 頁 / Lecture slide 6
Thin Client Disadvantages
Need persistent wireless connectivity
Hard to maintain persistent connectivity when a user moves
between different locations.
Application performance is highly affected by network
conditions
Each request being transferred over a wireless network is affected
by the network throughput and latency.
Availability
If a problem occurs on the server side, all users will be blocked.
Application testing is difficult
Testing the application is difficult on the full range of microbrowsers.
Emulators are not accurate representations of the end user’s
experience since it is not executed over a wireless network.講義第 7 頁 / Lecture slide 7
Thick Client Advantages
Offline data access
Even when no wireless is available, the user can still access and
modify the application data. This overcomes the limitations of thin
client architecture.
Performance
Performance is known and determined by the mobile device’s
processor speed, data access, etc.
Distributed computing
Executing and processing data on the client side reduces server
load.
Security
Control user data on both the client side and the server side; no
third-party systems are involved.講義第 8 頁 / Lecture slide 8
Thick Client Disadvantages
Application deployment
As the application needs to be deployed to mobile devices,
deployment and management of applications become a burden.
Development complexity
Developing apps for various mobile devices with different mobile OS
is difficult.
Security risk
Mobile OS opens doors to viruses.講義第 9 頁 / Lecture slide 9
Outline
Wireless mobile Internet architecture
Key components
Proxy services (Transcoding, Caching)
Mobile data management講義第 10 頁 / Lecture slide 10
Mobile Device Platform
Mobile device features
Form & usage
Portable, lightweight, small screen; always with the user; wide variation
in design and usage.
Hardware
Limited CPU computation, small memory/storage, limited battery, rich
graphics display.
Input, output & sensing
Touchscreen/multi-touch, physical or virtual keyboard, voice, camera,
microphone, speakers.
GPS, accelerometer, gyroscope, compass, fingerprint sensor.
Connectivity & communication
Network access: cellular 4G/5G, Wi-Fi, Bluetooth, NFC;
Frequent planned or unplanned disconnections and short connection
periods.
Security
High security risks; easily lost, stolen; exposed to unauthorized access.講義第 11 頁 / Lecture slide 11
Mobile Device Platform
A mobile operating system (MOS) is installed on client-side
mobile devices.
MOS provides a platform for app developers with various
functions
User interface
Application execution
Multitasking
Storage and memory management
Wireless networking
Power management
I/O control
Etc.
Dominant MOS platforms
Android: ~75% global market share, over 3.5 billion active users
Wei Lou @ Department ofiOS: ~25% market Computing, Hong Kong Polytechnshare, approximately 1.3 billion iPhone usersic Univ. Slide 11講義第 12 頁 / Lecture slide 12
MOS Platform: Android vs. iOS
Android – Open and flexible
Advantages
Largest user base globally.
Customization options; third-party apps from non-Google stores.
Challenges
Fragmentation: only ~10% of devices run the latest OS version.
Longer quality assurance (QA) cycles, higher development costs.
iOS – Controlled ecosystem
Advantages
Faster development cycles, easier QA (fewer device variants).
Long-term support for iOS updates.
Consistent user experience across devices.
Users are more willing to pay for apps and subscriptions.
Challenges
Closed ecosystem: limited customization; no third-party app stores.
macOS/Xcode and Apple hardware required for development.講義第 13 頁 / Lecture slide 13
Smart Client Application
Smart client applications run at the client side
Provide a rich and customized user interface to the end user.
Execute client-side application logic and messaging
Client-side application logic dictates how the client application acts.
Where the application gets the data (from local storage or server).
How the data is presented, processed, and stored on the device.
What set of data is sent back to the enterprise system for data consistency.
Client-side application logic can reduce the transmission overhead.
Have persistent data storage to store data locally to provide offline
data access
Persistent data storage is a key component of a smart client application.
Store the application’s data locally on the device.
Provide fast, reliable access to the data without wireless connectivity.
Communicate to the server via a wireless connection.講義第 14 頁 / Lecture slide 14
Wireless Gateway
What is a wireless gateway?
A wireless gateway is a device or software component that connects
mobile devices to the wired Internet or other networks.
It serves as the bridge between the wireless and wired worlds.
It allows a mobile user to access Internet service and data through the
same entry.
Main components
Protocol gateway/emulation engine: Encapsulation/de-encapsulation of
data.
Administration and maintenance module.
User cache: Stores user subscription info, access lists, QoS policies.
Queuing engine: Manages data buffers for transmission.
Data storage: Persistent storage for configuration and logs.講義第 15 頁 / Lecture slide 15
Wireless Gateway
Key gateway functions
Protocol conversion
Translate between different wireless/wired Internet protocols.
e.g., wireless protocol ↔ IP, WAP ↔ HTTP, HTML ↔ WML etc.
State management
Track connection states of multiple user devices.
Access control
Enforce bandwidth limits and QoS policies for mobile users.
Optimize communication streams
Data compression and packaging for transport over wireless networks
Routing
Direct data to the correct access point and user device.
Push messages to wireless clients
Enhance security講義第 16 頁 / Lecture slide 16
Wireless Application Server
What is a wireless application server?
A server platform that hosts and delivers applications to mobile
devices.
Key functions
Application hosting for content providers.
Content adaptation: Format content for different device capabilities
Support content download via Over-the-Air (OTA) protocol.
OTA distribution: Push content to devices over the air.
Application management: Upload, version control, deployment.
Traffic tracking and billing
Monitor application traffic usage and generate billing data.
Security: Authentication, encryption, access control
Scalability: Support for large numbers of concurrent users.講義第 17 頁 / Lecture slide 17
Synchronization Sever
Smart client applications need data synchronization.
What is data synchronization?
A procedure that keeps application data consistent between backend
systems and mobile devices.
Synchronize multiple copies of the same data across clients and the server.
Data synchronization includes
Backup from client devices to the server.
Data updates to/from client devices.
Propagation of data updates from the server to all client devices.
Why need synchronization?
Maintain data consistency across devices
Users access the same data from multiple devices (phone, tablet, laptop);
Mobile devices may be offline when changes are made;
Data changes on one device must be reflected on others;
Need for conflict detection and resolution.講義第 18 頁 / Lecture slide 18
Synchronization Sever
Data synchronization is mostly executed on the
synchronization server.
The client application also knows certain synchronization
information:
Sync server location.
Data to be synchronized.
Main components
Protocol manager module
Handles data preprocessing for synchronization
Uses Open Mobile Alliance (OMA) DS / SyncML standards
Synchronization manager module
Determines sync policies
Detects data changes and conflicts
Database manager module
Extracts and stores synchronization data講義第 19 頁 / Lecture slide 19
Synchronization Sever
Key functions
Integration with mobile devices.
Receive data from client application
Support disconnected operations
Optimize data transferred over wireless
Support multiple data formats
Ensure both client and server can decipher transferred data
Synchronization logic
Determine how to manipulate data
e.g., data subsetting, data transformation, data compression, etc
Detect and resolve data conflicts
Simple: apply updates to data storage; server wins, client wins
Advanced: complex updates to detect and resolve conflicts
Integration with the back-end data source
Uses standard DBMS to access back-end data sources
Keeps back-end and mobile data aligned講義第 20 頁 / Lecture slide 20
Synchronization Sever
Sync types
Two-way sync: Full bidirectional synchronization
One-way sync: Client updates server, or vice versa
Features
Scalability
Sync time increases smoothly with data volume and client count
Transmission granularity
Field-level transmission outperforms record-level for partial updates講義第 21 頁 / Lecture slide 21
Messaging Server
What is a messaging server?
A computing system configured to generate and transmit notifications
to mobile client devices
Components
Storage backends: Memory, file system, or database
Message queue: For temporary message storage
Push notification connectors:
Firebase Cloud Messaging (FCM): For Android push notifications
Apple Push Notification Service (APNS): For iOS push notifications
Key functions
Sending push notifications, emails, SMS
Managing message queues
Handling delivery retries for offline devices
Tracking delivery status講義第 22 頁 / Lecture slide 22
Messaging Server
Features
Push vs. poll
Push: The message server pushes the message to the client.
Suitable for real-time delivery without client polling
Poll: The client polls the server for messages.
Initiated by the client; adapt for intermitted connections
Can be periodic or ad hoc
Delivery guarantees
Offline messages are stored temporarily in a message queue
Delivery retries with exponential backoff
Message server management
Multiple message servers handle traffic with push services
Various message types
Notifications, alerts, transaction confirmations, chat messages講義第 23 頁 / Lecture slide 23
Outline
Wireless mobile Internet architecture
Key components
Proxy services (Transcoding, Caching)
Mobile data management講義第 24 頁 / Lecture slide 24
Mobile Internet Proxy Services
The proxy problem: Why do we need proxies for mobile?
Mobile devices have diverse capabilities:
Varying screen sizes and resolutions
Different bandwidth availability
Different processing power and memory
Servers cannot handle this diversity alone
Solution
Add intermediate proxies that adapt content to client capabilities.
Proxies are essential for bridging the gap between servers
and heterogeneous mobile devices.
Significantly improve client-side applications’ performance講義第 25 頁 / Lecture slide 25
Proxy Services:
Transcoding and Caching
Transcoding: Transform content to match device capabilities
What is transcoded?
Images: Resized, compressed, format changed
Video: Bitrate adjusted, resolution reduced
HTML: Simplified for small screens
Transcoding decision-making
Proxy decides how to transcode the content
E.g., desktop page or mobile page, via WiFi or cellular network
Caching: Storing frequently accessed content closer to users
Caching decision-making
Proxy decides to use content locally or fetch content from the server
Benefits for mobile
Reduces latency for accessing popular objects locally
Saves bandwidth on expensive cellular connections
Improves user experience for repeated visits講義第 26 頁 / Lecture slide 26
Outline
Wireless mobile Internet architecture
Key components
Proxy services (Transcoding, Caching)
Mobile data management講義第 27 頁 / Lecture slide 27
Mobile Data Access
Why mobile data access?
With increasing wireless connectivity and the popularity of portable devices
popularity, mobile users are enabled to access and share online data.
Mobile users can carry extracts of enterprise databases with them to have
continuous access.
Characteristics of mobile data access
The bandwidth of the wireless channel is asymmetric
The BW of downlink >> the BW of uplink
Sending data from the server to clients is much faster than vice versa
The energy consumption is an important issue
The mobile device in active mode consumes more energy than in sleep mode; the
difference is by orders of magnitude
The wireless connection is unreliable
Frequent disconnections can occur; it can make data inconsistent during an update
transaction
The number of mobile devices is much larger compared to the number of
servers講義第 28 頁 / Lecture slide 28
Approaches to Mobile Data Access
Approaches
Pull-based mechanisms (on -demand mode)
Client actively requests data from the server
Push-based mechanisms (publish -subscribe mode)
Client subscribes to the service and the server actively pushes data to the
client
Hybrid mechanisms (hybrid mode)
Two channels between devices and server - front channel for push
and back channel for pull講義第 29 頁 / Lecture slide 29
Pull- based Mechanisms
Relevant data is sent to the user only when the user asks
for it
No unsolicited or irrelevant data will arrive at the device
The best option when the server has very little contention
and can respond to many device requests within expected
time intervals
i.e., music album server, ringtones server, video clips server, or
bank account activity server
client client
client
client server client
client client講義第 30 頁 / Lecture slide 30
Pull- based Mechanisms
Features
Bandwidth used for the uplink channel depends upon the number of
pull requests
Assume one uplink bandwidth of 100kbps and the server channel
capacity of 2Mbps; only 20 pull requests can be accepted by the server
If the number of pull requests is larger, the uplink bandwidth has to be
reduced to 50kbps or 25kbps
Pull cannot scale beyond the capacity of the server or the network
Define a pull threshold to limit the number of pull requests in a given
period of time講義第 31 頁 / Lecture slide 31
Push- based Mechanisms
Server decides what data is appropriate to be sent and how
the data is to be sent
Server selects a structure of data items to be pushed
Use an adaptable mechanism to push data items uniformly or non-
uniformly according to their relative importance
Server determines time intervals to push the selected data
For devices that were previously disconnected, pushing data at periodic
intervals provides them a chance to get the data when it is pushed again
Server allocates bandwidth in the downlink for pushing data
Higher bandwidth is allocated to data items with a larger number of
subscribers or higher access probabilities
client client
client server client
client client講義第 32 頁 / Lecture slide 32
Push- based Mechanisms
Suitable when commonly interested data is transmitted to a
large number of clients
i.e., advertisers or generators of traffic congestion, weather reports,
stock quotes, and news reports
Features
The server saves bandwidth and is prevented from being
overwhelmed by client requests
Push operation is scalable; it does not depend on the number of
clients講義第 33 頁 / Lecture slide 33
Hybrid Mechanisms
Two channels between devices and server - front
channel for push and back channel for pull
Bandwidth is shared and adapted between the two channels
Bandwidths adapted in downlink and uplink channels depend on
the number of active devices receiving data from the server and
the number of devices requesting data pulls from the server
client
client client
client server
client
client
client講義第 34 頁 / Lecture slide 34
Disconnected Operations
A client application may work in a mobile environment that
suffers from weak or intermittent connectivity.
Weak/intermittent wireless links subject to disturbances and failures
Users in areas with no coverage (remote areas, underground)
Wireless connectivity may be unavailable (failure, congestion, roaming)
What is a disconnected operation?
Disconnected operation
A mode of operation that enables a client to continue accessing critical data
maintained at the server during temporary interruption of network
connection
Weakly connected operation
Network condition is poor (radio signal is at a lower level, connectivity is
intermittent, channel noise)
Disconnected operation is the extreme of weakly connected operation.
Disconnection can be involuntary or voluntary.講義第 35 頁 / Lecture slide 35
Disconnected Operations
Disconnected operation is essential for real-world
mobile computing apps
Why need support for disconnected operations?
Client apps can provide data availability under mobile
circumstances
User mobility
Unpredictable network conditions
Client’s choice:
Extends battery life by avoiding wireless transmission and reception
Reduces network charges
Allows radio silence - a vital capability in military applications講義第 36 頁 / Lecture slide 36
Support Disconnected Operations
Objectives
Ensure data availability even under disconnection
Make a trade-off between data consistency and data
availability
Store the most probable data item locally for best future use, given
a limited amount of storage and potential changes in data item
values
Solutions
Provide replicated copies at several places to achieve data
availability
Caching
Prefetching
Hoarding講義第 37 頁 / Lecture slide 37
Support Disconnected Operations
Caching refers to the maintenance of a copy of data item
previously obtained from the server in client storage for
potential future use.
E.g., cache data in memory; cache remote data at local disk.
Normally, caching is done on an on-demand basis. Client requests a
needed item and keeps a local copy.
If there is no immediate need for an item but client still
requests for it and keeps a copy for future need, this is
called pre-fetching.
Prefetching occurs on an anticipatory basis.
If prefetching is done in anticipation of future disconnection,
this is called hoarding.
Consistency of cached data item needs to be ensured.
This is hard for hoarding, since the client is disconnected and cannot
receive any notification about the potential inconsistency.講義第 38 頁 / Lecture slide 38
Cache Invalidation
What is cache invalidation?
The value of the data may have changed since caching.
Cache invalidation ensures that copies of a data item are identical at
the server and in the device cache.
Traditional invalidation
Server sends an invalidation msg to client to revoke the privilege to
access a cached item.
Client removes the invalidated item and replies with an invalidation
ACK msg.
The problem of invalidation in mobile environments:
Server can broadcast an invalidation msg to many clients, but they
may be facing different states (some may be sleeping).
Server may not know the identity of some clients.
Client may miss some invalidation reports.
Client may be disconnected.講義第 39 頁 / Lecture slide 39
Cache Invalidation
How can the server ensure that invalidation is done
properly?
The server needs to decide
When to send invalidation reports: synchronous or asynchronous?
To whom are the invalidation reports sent: stateful or stateless?
How to send the invalidation reports: pulling or pushing?
What to send?
Invalidation: only which items were updated
Propagation: the values of updated items are sent講義第 40 頁 / Lecture slide 40
Cache Invalidation
Two ways to send reports:
Synchronous: broadcast invalidation reports periodically to
clients.
A client needs to wait and listen for reports periodically.
If there is a query, the client needs to wait till the report comes to
ensure that the cached item can be used.
Alternatively, the client can initiate a pull request to the server.
Asynchronous: broadcast an invalidation report to clients
when there is a change in the data item value.
a pull from the server.The client listens for the next report to answer a query or initiates
update update invalid
valid
query query講義第 41 頁 / Lecture slide 41
Cache Invalidation
Cache state maintenance
Stateful:
The server maintains information about its clients, e.g., the
contents of their cache and when it was last validated.
The server sends the invalidation reports to affected clients.
Stateless:
The server does not maintain information about its clients.
The server broadcasts the invalidation to everyone.講義第 42 頁 / Lecture slide 42
Cache Invalidation
Cache consistency maintenance
Pulling mechanism (client-initiated case):
The client checks with the server about the state of the data item:
valid/invalid (expired, modified), etc.
Pushing mechanism (server-initiated case):
When a cached data item becomes invalid and thus unusable, the
server sends invalidation reports, either synchronously or
asynchronously.講義第 43 頁 / Lecture slide 43
Pulling Methods
Each cached data item is checked whenever required.
If the data copy becomes invalid on the device or has been modified
on the server, the device requests the modified data for replacement.
Time-to-live mechanism
Each cached item is assigned a TTL (time-to-live).
The TTL assignment is adaptive (adjustable) to previous update
intervals of that item.
After the TTL expires, the client device polls for an invalid or modified
state.
If an invalid or modified state is found, then the device requests the
modified data from the server to replace the previous one.
If TTL is set to 0, the TTL mechanism is equivalent to the polling
mechanism.講義第 44 頁 / Lecture slide 44
Pushing Methods
Pushing methods
Stateless asynchronous
Stateless synchronous
Stateful asynchronous
Stateful synchronous講義第 45 頁 / Lecture slide 45
Stateless Asynchronous
How it works
The server does not maintain client cache states and advertises the
invalidation reports when the cache state changes.
On receiving an invalidation report, the client requests the new data item.
Advantages
Guaranteed synchronization: Even clients that missed an earlier report can
detect the miss and request it.
Bounded waiting time: Clients know the maximum delay before the next
invalidation arrives.
Cache consistency: The clients send requests for invalid data promptly,
keeping cache consistency through regular exchanges.
Energy efficiency: The client can enter power-saving mode and wake only
during scheduled times.
Disadvantages
Unnecessary delivery of data invalidation reports: Every client device gets an
invalidation report, whether that client requires that copy or not.
Data consistency issue: The client presumes that as long as there is no
invalidation report received, the cached copy is valid for use.講義第 46 頁 / Lecture slide 46
Stateless Synchronous
How it works
The server does not maintain client cache states and periodically advertises
invalidation reports.
The client requests the data item when receiving the invalidation report.
If no invalidation report is received by the end of the period, the client
requests the report.
Advantages
Cache consistency: The client receives periodic information about the
invalidity of the caches, keeping cache consistency through periodic
exchanges.
Low server state overhead: The server does not maintain cache state for
every client.
Disadvantages
Unnecessary delivery of data invalidation reports: every client gets an
invalidation report periodically, irrespective of whether it has a copy of the
invalidated data or not.
Data consistency issue: During the period between two invalidation reports,
the client may have inconsistent data.講義第 47 頁 / Lecture slide 47
Stateful Asynchronous
How it works
The server keeps track of device cache states
The server transmits an invalidation report to concerned devices when an
update occurs.
The client requests new data when receiving the invalidation report and sends
its new state after caching the new record from the server.
Advantages
Bandwidth efficient: Only affected clients receive the invalidation reports and
other devices are not flooded with irrelevant reports.
Low client overhead: Clients do not need to listen to periodic invalidation
reports, saving energy and processing.
Immediate consistency for connected clients: Updates trigger invalidation right
away, minimizing staleness for online clients.
Disadvantages
Data consistency issue: The client presumes that, as long as there is no
invalidation report, the copy is valid for use. When a link fails, the client uses
invalidated data.
High server state overhead: The server must maintain cache state for every
Wei Lou @ Department ofclient, causing a scalability bottleneck. Computing, Hong Kong Polytechnic Univ. Slide 4747講義第 48 頁 / Lecture slide 48
Stateful Synchronous
How it works
The server maintains device cache states and periodically transmits an
invalidation report to the concerned devices.
If no report is received by the end of the period, the client requests the report.
The client requests new data when receiving the invalidation report and sends
its new state after caching the new data.
Advantages
Guaranteed consistency: The server can synchronize the client in time when
invalid data gets modified.
Reduced client overhead: Avoid sending unnecessary invalidation reports to
clients that do not hold the data.
Disadvantages
High server complexity and bandwidth: The server maintains state for every
client; the server requires high bandwidth to send periodic reports to each
client.
Periodic server overhead: Even when no data changes, the server still sends
periodic reports (wasteful in a stable environment).講義第 49 頁 / Lecture slide 49
Summary
Architecture: Multi-tier system with specialized components for mobile
support
Thin client, thick client
Mobile device platforms: iOS and Android dominate the MOS market, each
with distinct characteristics
Servers: Application, Sync, and Messaging servers handle different service
needs.
Proxy services: Transcoding and caching adapt content to device
capabilities
Mobile data management: Mobile data access mechanisms and
disconnected operation mechanisms ensure data availability and
consistency.