lecture 3 middleware fundamentals wireless and mobile systems design
Post on 20-Dec-2015
215 views
TRANSCRIPT
Lecture 3Middleware Fundamentals
Wireless and Mobile Systems Design
Middleware Fundamentals 2
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 3
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 4
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 5
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
Operating Systemand Networking Services
Middleware
Application ProgramsAPI
Middleware Fundamentals 6
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 7
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 8
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 9
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 10
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 11
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 12
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 13
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 14
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
WAPInternet Wireless
Middleware Fundamentals 15
WAP – Programming Model
● WAP gateway or proxy■ Content encoders and decoders■ Protocol gateways, e.g. for WAP protocols to HTTP and
TCP/IP
Client
WebBrowser
Server
HTTPServer
CGI,etc.
Gateway
EncodersDecoders
encodedrequest
encodedresponse
request
responseProtocol
Gateways
wireless
Middleware Fundamentals 16
WAP and Wireless Web Access (1)
● Data transformation■ WAP gateway performs data
transformation between WML (or XHTML) and HTML
● Data compression■ Technique are used for dealing
with images and other graphics
● Adaptability■ User profile and device
characteristics are stored in the WAP gateway
WebServer
WAP Gateway
Encodedrequest
Request(e.g., HTTP)
Response(e.g., HTML)
EncodedResponse(WML)
Middleware Fundamentals 17
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 18
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○ For example, a MIDlet created
based on the MIDP API■ Pre-verification at compile time to
verify if an application can run with J2ME’s Kilobyte Virtual Machine (KVM)
Byte-code JavaApplications
(e.g., MIDlets)
Middleware Fundamentals 19
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 20
J2ME Architecture (1)
From S. Helal, “Pervasive Java,” IEEE Pervasive Computing, Vol. 1, No. 1, Jan.-March 2002, pp. 82-85.
Middleware Fundamentals 21
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 22
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
PocketPC
Jeode JVM(Personal Java)
ME4SE(J2ME emulator)
J2ME applications(MIDP)
Middleware Fundamentals 23
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 24
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 25
.NET Component Framework (1)
C. Neable, “The .NET Compact Framework,” IEEE Pervasive Computing, Vol. 1, No. 4, Oct.-Dec. 2002, pp. 84-87.
Platform adaptation layer (PAL) tailored for a specific platform
CLR runs MSIL and uses a just-in-time (JIT) compiler to convert MSIL to native code
CLI-compliant base class libraries provide building block functionality for all applications (basic file I/O, networking, XML handling)
Middleware Fundamentals 26
.NET Component Framework (2)
C. Neable, “The .NET Compact Framework,” IEEE Pervasive Computing, Vol. 1, No. 4, Oct.-Dec. 2002, pp. 84-87.
Available to applications in .NET CF
Windows forms library XML web services ADO.NET (for remote
data-access)
Middleware Fundamentals 27
Mobile Data Access in .NET CF
● 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
SQL Server
Internet Information Server (IIS)
Internet
SQL Server CE
• Caching• Synch
Middleware Fundamentals 28
.NET CF Functionality (1)
● Platform independence■ The same .NET MSIL-code
application can be downloaded and executed by CLR enabled devices
● Optimization■ Proxy protocols can be
designed to optimize performance using techniques such as forms differencing
MSIL-code.NET Applications
dynamically deliveredto CLR-enabled devices
Middleware Fundamentals 29
.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 30
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 31
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 32
Pocket PC User Interface Controls
● Buttons● Check boxes● Option buttons● Command bars● Tool bars● ToolTips● Menus● Pop-up menus● Message boxes● Property sheets● Tabs● Text boxes● List boxes
● Combo boxes● Up/Down controls● Date/Time pickers● MonthCal controls● List views● Header controls● Tree views● Group Line Separators● Scroll bars● Sliders● Status bars● Progress bars
Middleware Fundamentals 33
.NET CF and VS .NET
● NET Compact Framework – add-in for Visual Studio .NET 2003
● Uses C#● Write managed .NET code
Middleware Fundamentals 34
Summary
● Basics of middleware and unique requirements for wireless and mobile devices
● Example middleware: WAP, J2ME, and .NET CF