Download ECE/CS 4984: Lecture 1

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Wireless and Mobile Systems Design
Lecture 3
Middleware Fundamentals
Lecture Objectives
● Understand the role of middleware
● Understand the unique requirements of wireless and
mobile applications that middleware should address
● Understand mobile computational models and
functionality supported by various middleware
platforms
Middleware Fundamentals
2
Resources
● S. Helal, “Pervasive Java,” IEEE Pervasive
●
●
●
●
Computing, Vol. 1, No. 1, Jan.-March 2002, pp. 82-85.
S. Helal, “Pervasive Java, Part II,” IEEE Pervasive
Computing, Vol. 1, No. 2, April-May 2002, pp. 85-89.
C. Neable, “The .NET Compact Framework,” IEEE
Pervasive Computing, Vol. 1, No. 4, Oct.-Dec. 2002,
pp. 84-87.
A. Tripath, “Challenges in designing next-generation
middleware systems,” Communications on the ACM,
Vol. 45, No. 6, June 2002, pp. 39-42.
Open Mobile Alliance,
http://www.openmobilealliance.org/, 2003.
Middleware Fundamentals
3
Agenda
● Overview of middleware
● Middleware for wireless and mobile wireless
applications
● Example mobile middleware
■ Wireless Access Protocol (WAP)
■ Java 2 Micro-Edition (J2ME)
■ Microsoft .NET Compact Framework (.NET CF)
Middleware Fundamentals
4
Middleware (1)
● Middleware is a somewhat overloaded term
● Generally speaking, middleware provides software
services for application programs above the basic
operating system and networking services
● Accessed via an application program interface (API),
but more than an API
API
Application Programs
Middleware
Operating System
and Networking Services
Middleware Fundamentals
5
Middleware (2)
● Goal is to simplify development effort and increase
application functionality and robustness
■ Allow code to run across different platforms
■ Provide higher level abstractions of services
● Example functions
■ Messaging
■ Distributed object management
■ Directory services
■ Location services
■ User-defined and composite data types
■ Remote procedure calls (RPC)
■ Alternate communication abstractions
Middleware Fundamentals
6
Role of Middleware
● Middleware is a layer between the operating system
and applications that provides a set of services
● Middleware presents an abstract interface to the
application that provides the application developer
with a uniform view of lower-level operating systems
and networks
● In wireless mobile environments, middleware must
be flexible to enable adaptation to changes in…
■ the underlying operating systems and networks, and
■ application requirements
Middleware Fundamentals
7
Wireless and Mobile Applications (1)
● “Resource-poor” mobile devices
■ Limited memory and buffer space (typically no disk)
■ Small screen
■ Low processing capabilities
■ Limited battery life
● Location of a mobile device may change frequently
due to mobility
■ Relative to network and other services
■ Relative to other hosts
Middleware Fundamentals
8
Wireless and Mobile Applications (2)
● Capacity of the wireless channel is limited and may
vary
● Communication is often unreliable
■ Short-term “fades” – high bit errors
■ Long-term disconnects – disconnected operationForced or
voluntary disconnection
● Disconnected operation (read/write) requires system
support
■ Data caching
■ Pre-fetching
■ Integration
Middleware Fundamentals
9
Desirable Middleware Functionality (1)
● Optimization – data compression
● Transformation – data format transformation to suit
various device specifications
■ HTML pages to WML (for WAP 1.0 devices) and vice versa
■ SOAP/XML for web services
○ From XML to xHTML (for WAP 2.0 and future i-mode
devices)
○ From XML to cHTML (for existing i-mode phone devices)
● Support for security and privacy
● Support for mobility
■ Location transparency (ad hoc communication) versus
awareness
Middleware Fundamentals
10
Desirable Middleware Functionality (2)
● Support for service discovery
● Support for disconnected operation
● Context-aware adaptability
■ Status of the host device, the user, the surrounding
environment, and the interactions between the host device
and other devices
■ Essential for pervasive (ubiquitous) computing
● Platform independence
■ Same program can be run on a wide variety of devices and
platforms
Middleware Fundamentals
11
Example “Mobile” Middleware (1)
● Client-server model
■ Wireless Application Protocol (WAP)
■ Web services
○ Server
 Microsoft’s Mobile Internet Toolkit (MIT)
○ Client
 Microsoft’s eMbedded Visual Toolkit (eVT)
 Microsoft’s .NET Compact Framework (.NET CF)
 Sun’s Java 2 Micro Edition (J2ME)
Middleware Fundamentals
12
Example “Mobile” Middleware (2)
● Peer-to-peer and ad hoc model
■ Intel/Microsoft Universal Plug and Play (UPnP)
■ Jini/J2ME
■ Service Location Protocol (SLP)
Middleware Fundamentals
13
WAP – Objectives
● Enable wireless terminals, especially digital cellular
phones, to access Internet content and advanced
data services
● Specify a protocol that will work across differing
global wireless network systems
● Enable creation of content and applications that
scale across different networks and devices
● Where possible, use and extend existing standards
and technologies
Internet
Middleware Fundamentals
WAP
Wireless
14
WAP – Programming Model
Client
encoded
request
Web
Browser
Gateway
request
Server
Encoders
Decoders
HTTP
Server
Protocol
encoded
Gateways response
response
CGI,
etc.
wireless
● WAP gateway or proxy
■ Content encoders and decoders
■ Protocol gateways, e.g. for WAP protocols to HTTP and
TCP/IP
Middleware Fundamentals
15
WAP and Wireless Web Access (1)
● Data transformation
■ WAP gateway performs data
transformation between WML (or
XHTML) and HTML
Encoded
request
● Data compression
■ Technique are used for dealing with
images and other graphics
● Adaptability
■ User profile and device
characteristics are stored in the
WAP gateway
Middleware Fundamentals
Encoded
Response
(WML)
WAP Gateway
Request
(e.g., HTTP)
Response
(e.g., HTML)
Web
Server
16
WAP and Wireless Web Access (2)
● Security
■ Secure Enterprise Proxy (SEP) using 128-bit encryption in
WAP 1.2
● Service discovery and mobility support
■ WAP’s “walled garden” – WAP gateways are provided by ISP
such as AOL
Middleware Fundamentals
17
J2ME – Java for Hand-Held Devices (1)
● Platform independence
■ The same byte-code Java
application can be downloaded and
executed by all Java-enabled
devices
Byte-code Java
○ For example, a MIDlet created
Applications
based on the MIDP API
(e.g., MIDlets)
■ Pre-verification at compile time to
verify if an application can run with
J2ME’s Kilobyte Virtual Machine
(KVM)
Middleware Fundamentals
18
J2ME – Java for Hand-Held Devices (2)
● Data compression
■ A MIDlet application comes with a Java Application
Descriptor (JAD) metafile containing instructions for
uncompressing the application in compressed Java Archive
(JAR) format
● Security
■ Java Card technology using public key
■ A downloaded Java program must have a legal digital
signature to execute
● Service discovery
■ JINI based on Java service objects
Middleware Fundamentals
19
J2ME Architecture (1)
From S. Helal, “Pervasive Java,” IEEE Pervasive Computing, Vol. 1, No. 1, Jan.-March 2002, pp. 82-85.
Middleware Fundamentals
20
J2ME Architecture (2)
● Profile layer
■ Minimum set of APIs available for the specified underlying
configuration
● Configuration layer
■ Defines a minimum set of JVM features and core Java class
libraries available on a particular category of devices
● JVM layer
■ Virtual machine layer (bottom layer)
Middleware Fundamentals
21
J2ME/MIDP Runtime on a PocketPC
● Sun Microsystems has
released JVM with MIDP for
PalmOS PDAs, but is not
continuing development of
JVM for PocketPC
● J2ME can be run on a
PocketPC
■ Jeode JVM provides Personal
Java 1.2 support.
■ me4se emulates MIDP devices
using Personal Java
J2ME applications
(MIDP)
ME4SE
(J2ME emulator)
Jeode JVM
(Personal Java)
PocketPC
Middleware Fundamentals
22
Microsoft’s .NET CF (1)
● .NET Compact Framework (.NET CF) is part of
Microsoft’s larger .NET Framework
■ Targets PocketPC, WindowsCE, Windows Mobile, etc.
● .NET CF is based on Microsoft’s Common Language
Infrastructure (CLI) standard
■ Source code and complied binaries in Microsoft Intermediate
Language (MSIL) can run across CLI-based heterogeneous
devices
■ Microsoft’s Common Language Runtime (CLR), like Sun’s
JVM, has the objective of platform independence
Middleware Fundamentals
23
Microsoft’s .NET CF (2)
● .NET CF allows small form-factor devices to easily
access remote (server) data using the Internet
standard protocols
■ XML-based Simple Object Access Protocol (SOAP)
■ Web Service Description Language (WSDL)
■ XML web services are central to Microsoft’s .NET framework
Middleware Fundamentals
24
.NET Component Framework (1)

CLI-compliant base class
libraries provide building block
functionality for all applications
(basic file I/O, networking, XML
handling)

CLR runs MSIL and uses a justin-time (JIT) compiler to convert
MSIL to native code

Platform adaptation layer (PAL)
tailored for a specific platform
C. Neable, “The .NET Compact Framework,” IEEE Pervasive Computing, Vol. 1, No. 4, Oct.-Dec. 2002, pp. 84-87.
Middleware Fundamentals
25
.NET Component Framework (2)
 Available
to applications in
.NET CF
 Windows forms library
 XML web services
 ADO.NET (for remote
data-access)
C. Neable, “The .NET Compact Framework,” IEEE Pervasive Computing, Vol. 1, No. 4, Oct.-Dec. 2002, pp. 84-87.
Middleware Fundamentals
26
Mobile Data Access in .NET CF
SQL Server CE
• Caching
• Synch
Internet
Internet
Information
Server (IIS)
SQL Server
Middleware Fundamentals
● Active Data Object (ADO) .NET
■ Mobile applications can access
Microsoft SQL Server 2000 on remote
servers or access a SQL Server CE
locally on the device
● Disconnected mode support
■ SQL Server CE lets applications cache
large volumes of data (tens of
megabytes), read, and update in
disconnected mode
● SQL Server CE provides
synchronization mechanisms for
changes made upon reconnection
27
.NET CF Functionality (1)
● Platform independence
■ The same .NET MSIL-code
application can be downloaded
and executed by CLR enabled
devices
MSIL-code
.NET Applications
dynamically delivered
to CLR-enabled devices
● Optimization
■ Proxy protocols can be
designed to optimize
performance using techniques
such as forms differencing
Middleware Fundamentals
28
.NET CF Functionality (2)
● Data Transformation
■ XML transformed automatically to HTML, XHTML, cHTML, or
WML (at the server end)
● Disconnected operations
■ Data caching, pre-fetching, and synchronization available
using Microsoft SQL Server 2000 on the remote server and
SQL CE on the local device
Middleware Fundamentals
29
PocketPC User Interface Design (1)
● User Interface design constraints
■ A small, portrait-oriented, touch-sensitive screen
■ User input with an input panel and the stylus (pointer)
○ Single-tap opens an item
○ A tap and hold displays a pop-up menu or a tip
● Normally no “Close” button is necessary
■ PocketPC automatically closes idle applications as more
memory is needed
● Normally no “Save” button is necessary
■ PocketPC relies on application’s “autosave” to retain user
data
Middleware Fundamentals
30
PocketPC User Interface Design (2)
● System-level and
navigation actions at
the top of the screen
■ Start Menu
■ Navigation Bar (top)
● Application-level and
editing actions at the
bottom of the screen
■ Menu bar (also called
command bar)
■ Input Panel Button
Middleware Fundamentals
31
Pocket PC User Interface Controls
● Buttons
● Combo boxes
● Check boxes
● Up/Down controls
● Option buttons
● Date/Time pickers
● Command bars
● MonthCal controls
● Tool bars
● List views
● ToolTips
● Header controls
● Menus
● Tree views
● Pop-up menus
● Group Line Separators
● Message boxes
● Scroll bars
● Property sheets
● Sliders
● Tabs
● Status bars
● Text boxes
● Progress bars
● List boxes
Middleware Fundamentals
32
.NET CF and VS .NET
● NET Compact Framework – add-in for Visual Studio
.NET 2003
● Uses C#
● Write managed .NET code
Middleware Fundamentals
33
Summary
● Basics of middleware and unique requirements for
wireless and mobile devices
● Example middleware: WAP, J2ME, and .NET CF
Middleware Fundamentals
34