Overview

• Web and Mobility • HTTP and HTML Chapter 11 • Mobile Web Architectures Mobile Web • Wireless Application Protocol WAP •WML •WMLScript •WTAI Distributed Mobile Computing Computing Group Summer 2002

Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/2

World Wide Web and Mobility WWW example

• Request to port 80 • Protocol (HTTP, Hypertext Transfer Protocol) and language GET/HTTP/1.0 (HTML, Hypertext Markup Language) of the Web have not been • Response from server designed for mobile applications and mobile devices. HTTP/1.1 200 OK Date: Fri, 20 Jun 2002 14:52:12 GMT • Typical transfer sizes Server: Apache/1.3.26 – HTTP request: 100-350 byte Connection: close – responses avg. <10 kbyte, header 160 byte, GIF 4.1kByte, JPEG Content-Type: text/html 12.8 kbyte, HTML 5.6 kbyte Distributed Computing Group

– many hyperlinks, automatic loading and reloading, redirecting
– a single click might have big consequences!

Distributed Computing Group

Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/3 Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/4 HTTP 1.0 and mobility HTTP 1.0 and mobility

•Characteristics • Caching – stateless, client/server, request/response – quite often disabled by information providers to be able to create user – needs a connection oriented protocol (TCP), one connection per profiles, usage statistics, etc. request (some enhancements in HTTP 1.1) – dynamic objects (counters, time, date, personalization) – primitive caching and security – mobility quite often inhibits caches • Problems – security problems (how to use SSL/TLS together with proxies?) – designed for large bandwidth (compared to wireless access) – today: many user customized pages, dynamically generated on request and low delay via CGI, ASP, ... – big and redundant protocol headers (readable for humans, • Sending to a server with POST method stateless, therefore big headers in ASCII) – can typically not be buffered – uncompressed content transfer – very problematic if currently disconnected – using TCP (3-way-handshake, slow-start) – DNS lookup by client causes additional traffic • Many unsolved problems!

Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/5 Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/6

HTML and mobile devices Approaches toward WWW for mobile devices

•HTML • Application gateways, enhanced servers – designed “high” performance computers: color high-resolution – simple clients, pre-calculations in the fixed network display, mouse, hard disk – compression, filtering, content extraction – web pages optimized for design, not for communication – automatic adaptation to network characteristics • Mobile devices •Examples – small, low-resolution displays, very limited input interfaces – picture scaling, color reduction, transformation of the document (small touch-pads, soft-keyboards) format (e.g., PS to TXT), detail studies, clipping, zoom • Many web pages assume existence of additional features – headline extraction, automatic abstract generation – animated GIF, Java applets, Frames, ActiveX, Shockwave, – HDML (handheld device markup language): simple language movie clips, audio, ... similar to HTML requiring a special browser – HDTP (handheld device transport protocol): transport protocol for HDML, developed by Unwired Planet • Web pages ignore the heterogeneity of end-systems • Problems – proprietary approaches, require special enhancements for browsers – heterogeneous devices make approaches more complicated

Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/7 Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/8 Some new issues that might help mobility? WWW in a mobile world: Architectures

• Push technology mobile client – real pushing, not a client pull needed, channels etc. • Enhanced browsers integrated – Caching, off-line use enhancement • HTTP/1.1 – Examples: Internet Explorer, browser – client/server use the same connection for several request/response Netscape transactions – multiple requests at beginning of session, several responses in web same order server – enhanced caching of responses (useful if equivalent responses) – semantic transparency not always achievable: disconnected, mobile client performance, availability -> most up-to-date version... • Additional, accompanying application – several more tags and options for controlling caching browser – Pre-fetching, caching, off-line use (public/private, max-age, no-cache etc.) additional – Example: original WebWhacker application – relaxing of transparency on app. request or with warning to user – encoding/compression mechanism, integrity check, security of proxies, authentication, authorization... web •Cookies server

Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/9 Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/10

WWW in a mobile world: Architectures WWW in a mobile world: Architectures

• Client Proxy mobile client • Client and network proxy mobile client – Pre-fetching, caching, off-line use – combination of benefits plus client browser browser simplified protocols proxy – Examples: Caubweb, TeleWeb, client Weblicator, WebWhacker, WebEx, proxy – Examples: MobiScape, WebMirror, etc. WebExpress, Mowgli web network web server proxy server

mobile client • Network Proxy – adaptive content transformation browser • Additionally many proprietary server extensions possible for bad connections, pre-fetching, – channels caching – content negotiation – Examples: TranSend, Digestor network proxy web server

Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/11 Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/12 Wireless Application Protocol WAP WAP reference model and protocols

• Goals Internet WAP – deliver Internet content and enhanced services to mobile devices A-SAP and users (mobile phones, PDAs) HTML, Java Application Layer (WAE) additional services – independence from wireless network standards and applications S-SAP – open for everyone to participate, protocol specifications will be

proposed to standardization bodies Session Layer (WSP) [J. Schiller] HTTP – applications should scale well beyond current transport media and TR-SAP TCP device types and should also be applicable to future developments Transaction Layer (WTP) •Platforms SEC-SAP – e.g., GSM (900, 1800, 1900), CDMA IS-95, TDMA IS-136, 3rd generation systems (IMT-2000, UMTS, W-CDMA) SSL/TLS Security Layer (WTLS) • Challenger i-mode T-SAP – A big hit in Japan, now coming to the rest of the world UDP Transport Layer (WDP) – Standardized user interface, designed by provider; thus not open IP media – “SMS” is seen as (most successful) part of i-mode Bearer Services (GSM, CDPD, GPRS, SMS)

Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/13 Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/14

WAP network elements Wireless Application Environment WAE

fixed network wireless network • Goals – network independent application environment for wireless devices WML Binary WML Internet HTML WAP – integrated Internet/WWW programming model with high interoperability filter proxy – device and network independent, international support – manufacturers can determine look-and-feel, user interface HTML WML HTML – considerations of slow links, limited memory, low computing power, small filter/ Binary WML display, simple user interface (compared to desktop computers) WAP web HTML proxy server • Components – architecture: application model, micro browser, gateway, server WTA Binary WML – WML: XML-Syntax, based on card stacks, variables, ... server – WMLScript: procedural, loops, conditions, ... (similar to JavaScript) PSTN – WTA: telephone services, such as call control, text messages, phone [J. Schiller] book, ... (accessible from WML/WMLScript) – content formats: vCard, vCalendar, Wireless Bitmap, WML, ...

Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/15 Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/16 WAE logical model (WML)

Origin Servers Gateway Client • WML follows deck and card metaphor – WML document consists of many cards, cards are grouped to decks WTA web response encoded – a deck is similar to an HTML page, unit of content transmission user agent server with response – WML describes only intent of interaction in an abstract manner content with content – presentation depends on device capabilities encoders WML other content & user agent • Features server push decoders encoded content push – text and images: only limited capabilities, depends on client content – user interaction: text or password input, options, depends on client other WAE – Navigation: store already visited sites user agents request encoded – context management: global variables request

Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/17 Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/18

WML functionality WML example

• Tags as in HTML

­ < etc. • Links as in HTML Test This is a simple first card! – link to x On the next you can choose ... • Supported URL protocols – http, https, file, ftp, gopher, mailto, news, telnet • Other features ... your favorite pizza: – Tables

and – Input – Events … – Variables

Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/19 Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/20 WMLScript WMLScript functionality

• Complement to WML • Data types • Provides general scripting capabilities – Boolean, Integer, Real, String, invalid – Data types have no fixed type • validity check of user input – check input before sending it to server • Control structures similar to Java (and C, for that matter) • access to device facilities – if (condition) {…} else {…} – hardware and software (phone call, address book etc.) – while (condition) {…}; (with break/continue, and other features) • local user interaction – function f (parameters) {… return result}; – interaction without round-trip delay • extensions to the device software • External call – configure device, download new functionality after deployment – use url money “http://wap.money.com/money.wmlsc”; – function CHFtoUSD (CHF) {return money#CHFtoUSD(CHF)};

Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/21 Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/22

WMLScript main libraries: function examples WMLScript example

• The dialogs library: – Dialogs.alert() = create an alert message function pizza_test(pizza_type) { – Dialogs.confirm() = create a confirmation dialog var taste = "unknown"; • The float library: if (pizza_type = "Margherita") { – Float.ceil() = return equal or nearest bigger integer taste = "well... "; – Float.int() = return the integer part of the value } • The lang library: else { – Lang.exit() = exit function – Lang.float() = test if the device supports floating numbers if (pizza_type = "Vulcano") { • The String library: taste = "quite hot"; – String.length() = display the length of the string }; – String.trim() = remove extra spaces before and after a string }; • The URL library: return taste; – URL.escapeString() = encode string as URL }; – URL.getScheme() = return the used protocol • The WMLBrowser library: – WMLBrowser.getCurrentCard() = return the address of the current card – WMLBrowser.go() = move to another address

Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/23 Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/24 WMLScript is not type-safe Wireless Telephony Application (WTA) extern function allsum(i) { • Collection of telephony specific extensions var j,sum; • Extension of basic WAE application model sum = 0; //attention: if you remove this line, then – content push //allsum(5)="12345" :-) • server can push content to the client for (j=1;j<=i;j++) { • client may now be able to handle unknown events sum = sum + j; – handling of network events } • table indicating how to react on certain events from the network Dialogs.alert("Summe = "+sum); – access to telephony functions return sum; • any application on the client may access telephony functions } •Example – calling a number (WML) wtai://wp/mc;07216086415 – calling a number (WMLScript) WTAPublic.makeCall("07216086415");

Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/25 Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/26

WTA logical architecture Voice box example

other telephone networks WTA client WTA server mobile network voice box server WTA Origin Server incoming voice Client indicate new voice message message WML Scripts generate mobile WTA WTA & WML push deck new deck network user agent server display deck; WML user selects request decks WAE WAP Gateway wait for call translate WTA services play requested voice message services encoders & setup call call indication setup call network operator decoders trusted domain other origin accept call servers accept call accept call voice connection third party firewall origin servers

Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/27 Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/28 WTAI example with WML only WTAI example with WML and WMLScript

function voteCall(Nr) { var j = WTACallControl.setup(Nr,1); Please vote for your champion! if (j>=0) { WMLBrowser.setVar("Message", "Called"); WMLBrowser.setVar("No", Nr); else { Please choose: WMLBrowser.setVar("Message", "Error!"); }

Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/29 Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/30

WTAI example with WML and WMLScript

Please vote for your champion! Please choose: Distributed Computing Group Status of your call: $Message $No

Distributed Computing Group MOBILE COMPUTING R. Wattenhofer 11/31