11a networking and mobile devices
Download
1 / 31

11a. Networking and Mobile Devices - PowerPoint PPT Presentation


  • 141 Views
  • Uploaded on

11a. Networking and Mobile Devices. Introduction Problems Patterns and considerations Sample techniques Mobile Java and web services Symbian OS and Bluetooth Maemo and WLAN Summary. Introduction. Fundamentally, mobile devices liberate from the restrictions associated with a location

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' 11a. Networking and Mobile Devices' - nalani


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
11a networking and mobile devices
11a. Networking and Mobile Devices

  • Introduction

  • Problems

  • Patterns and considerations

  • Sample techniques

    • Mobile Java and web services

    • Symbian OS and Bluetooth

    • Maemo and WLAN

  • Summary

Mobiiliohjelmointi

Kevät 2009


Introduction
Introduction

  • Fundamentally, mobile devices liberate from the restrictions associated with a location

    • Physical distribution

  • Basic laws of distributed systems development apply

  • Can be taken as yet another resource whose accessing can be slower

    • E.g. memory

  • Special issues

    • Basic connectivity; associated with numerous different technologies

      • Proxies, bridges, and gateways

    • Statefulness vs. statelessness; associated with restricted bandwidth

      • Each station can have its own state vs. no stored state

      • Testing related complications

      • Stateless can implement stateful by carrying all state information in transmissions

    • Infrastructure assisted or ad-hoc between peers via e.g. Bluetooth connection

      • Servers and registry components vs. dynamic service discovery and formation

Mobiiliohjelmointi

Kevät 2009


From fixed to wireless proxy approach

Station 2

Proxy

WirelessStation

Fixed

domain

Wireless

domain

Station 1

From Fixed to Wireless:Proxy approach

Mobiiliohjelmointi

Kevät 2009


Example proxy wireless corba

Corba invocations

object

object

GIOP

GIOP

GTP

GTP

IIOP

IIOP

Adaptation

and

transport

Adaptation

and

transport

TCP

TCP

Terminal

Access bridge

Other ORB

wireless

fixed

Example Proxy: Wireless Corba

Mobiiliohjelmointi

Kevät 2009


Example proxy wap

WAP device

Web server

WAP gateway

WAE

WAE

HTTP

WSP

WSP

HTTP

WTP

WTP

SSL

WTLS

WTLS

SSL

TCP

WDP

WDP

TCP

IP

Bearer

Bearer

IP

Example Proxy: WAP

Mobiiliohjelmointi

Kevät 2009


Wap stack in device

Application layer: Wireless application environment (WAE)

(includes WML and WMLScript)

Session layer: Wireless session protocol (WSP)

Transaction layer: Wireless transaction protocol (WTP)

bypassing apps

Security layer: Wireless transport layer security (WTLS)

Transport layer: Wireless datagram protocol (WDP)

Bearers (SMS, CSD, GPRS,...)

WAP Stack in Device

Mobiiliohjelmointi

Kevät 2009


Content and goals
Content and goals

  • Introduction

  • Problems

  • Patterns and considerations

  • Sample techniques

    • Mobile Java and Web Services

    • Symbian OS and Bluetooth

    • Maemo and WLAN

  • Summary

Mobiiliohjelmointi

Kevät 2009


Special characteristics induce some fundamental problems
Special characteristics induce some fundamental problems

  • Bandwidth restrictions (GPRS, WCDMA, WLAN, …)

  • Communication packet travel times

    • Different gateways etc. lead to an extended travel times in communication

  • Lack of an established specialized standard

    • Internet technologies copied, adapted, extended, etc.

    • Telecommunications originated technologies evolving to different directions, different contexts, and adapting properties from Internet communications

    • Different devices implement a different set of features, so implementing a system that works in all combinations is hardened

  • Cost of connection and passing information

    • Money

    • Energy

  • Service providers not interested in implementing numerous versions of the same service

    • Special tools for automatically configuring a service

Mobiiliohjelmointi

Kevät 2009


Content and goals1
Content and goals

  • Introduction

  • Problems

  • Patterns and considerations

  • Sample techniques

    • Mobile Java and Web Services

    • Symbian OS and Bluetooth

    • Maemo and WLAN

  • Summary

Mobiiliohjelmointi

Kevät 2009


Restrictions and disclaimers
Restrictions and disclaimers

  • We will mostly be looking inside mobile devices, not to

    • Network architectures

    • Individual protocols

    • Related consequences

  • Optimizations that are only available for a device manufacturer (or its subcontractors) are overlooked

    • In other words, these should not be something whose use can be restricted

  • Focus on what an application developer can do when composing a networking application

Mobiiliohjelmointi

Kevät 2009


Goals
Goals

  • Be prepared to hide long loading times; preserve the feeling of being in control from the user’s perspective

    • Proactiveness when applicable

  • Take into account adaptation needs associated with the facilities of a particular device

    • Installation base?

  • Always let the user know what is taking place regarding communications

    • Cost, no response, etc.

  • Fail with style!

Mobiiliohjelmointi

Kevät 2009


Design idioms and patterns
Design idioms and patterns

  • Use a networking wrapper that can be reimplemented if communication techniques/requirements change

    • Porting requirements

  • Treat networking features as yet another resource

    • Resource management and explict allocation

    • May not be always available, so certain dynamic characteristics must be built in

  • Allocate responsibility for networking operations to a some particular unit of the system

    • Async networking library may do this for you automatically

    • Manually: One thread for the network, one for UI

  • Stateless vs. stateful applications

    • Often predetermined by the requirements that originate from assumed user group

Mobiiliohjelmointi

Kevät 2009


Considerations
Considerations

  • Telephony or data communications?

    • Telephony

      • SMS, MMS

      • Commonly rapid connections (something may be taking place behind the curtains however)

      • Network push is ok

    • Data communications

      • GPRS, 3G, WLAN

      • Long connection time

      • How to make a network initated operation?

  • Push or pull?

  • Connection speed?

  • Cost?

Mobiiliohjelmointi

Kevät 2009


Content and goals2
Content and goals

  • Introduction

  • Problems

  • Patterns and considerations

  • Sample techniques

    • Mobile Java and web services

    • Symbian OS and Bluetooth

    • Maemo and WLAN

  • Summary

Mobiiliohjelmointi

Kevät 2009


Web services overview
Web Services Overview

UDDI

servicelookup

WSDL

servicedescription

Web service

device

serviceuse

Mobiiliohjelmointi

Kevät 2009


Web service cont d
Web Service (Cont’d)

  • Application model

    • No particular model; offers independent services

  • Finding web services

    • UDDI

    • WS Dynamic Discovery

  • Service use

    • Acts as a service, not as an object

  • Bearers

    • SOAP

    • Fundamentally bearer independent, practical implementations commonly use HTTP

Mobiiliohjelmointi

Kevät 2009


Midp java and web services
MIDP Java and Web Services

LocalApplication

  • Application calls stub

  • Stub calls WB via SPI

  • SPI opens a connection to remote WS

  • Remote computer serves the request

1

Stub

RemoteServices

2

Service ProviderInterface

3

Local Client

4

Network

Device

Mobiiliohjelmointi

Kevät 2009


Apis and tools
APIs and Tools

  • Java API for XML processing (JAXP)

    • Non-validating parser intended to parse incoming XML documents

  • Java API for XML-based RPC (JAX-RPC)

    • Implementation of RPC

  • Service Provider Interface (SPI)

    • Stub generation in a compatible fashion

  • Stub Generator

    • Generation of client-side proxy that can be called by the application to make calls to WS

Mobiiliohjelmointi

Kevät 2009


Architecture
Architecture

<<interface>>java.rmi.Remote

javax.microedition.xml.rpc.*

<<interface>>javax.xml.rpc.Stub

<<interface>>Service Interface

javax.xml.rpc.JAXRPCException

javax.xml.namespace.QName

<<interface>>java.rmi.Remote

Stub

Vendor-specific JAX-RPC classes

<<interface>>Service Interface

Application

Mobiiliohjelmointi

Kevät 2009


Content and goals3
Content and goals

  • Introduction

  • Problems

  • Patterns and considerations

  • Sample techniques

    • Mobile Java and web services

    • Symbian OS and Bluetooth

    • Maemo and WLAN

  • Summary

Mobiiliohjelmointi

Kevät 2009


Bluetooth architecture

BT HOST (Laptop, MCU)

app2

app1

UDP/TCPIP

PPP

RFCOMM

SDP

L2CAP

Host Controller Interface Driver

Physical connection (USB/UART/I2C...)

BT HW

Host Controller Interface Driver

Link manager

Baseband controller

Bluetooth Architecture

Mobiiliohjelmointi

Kevät 2009


Bluetooth cont d
Bluetooth (Cont’d)

  • Application model

    • No particular model; offers independent services

    • Bluetooth profiles define different applications

  • Finding BT services

    • SDP

  • Service use

    • RFCOMM, serial port emulating protocol, can be used as a bearer for more complex protocols

    • Other protocols for using certain standardized services (e.g. OBEX)

  • Bearers

    • Own radio technology (frequency 2,4000-2,4835GHz)

Mobiiliohjelmointi

Kevät 2009


Symbian bluetooth facilities
Symbian Bluetooth Facilities

  • Service Database

    • Hosts information that can be used by other devices

    • Used via Database Server API (RSdp), actual database characterized by RSdpDatabase

  • Service discovery

    • Used to find devices, services and service attributes

    • Discovery agent (CSdpAgent) for configuring and starting the search

    • Notifier interface (MSdpAgentNotifier) for callbacks

  • Service use

    • E.g. socket communication

Mobiiliohjelmointi

Kevät 2009


Service record creation
Service record creation

CBTApp

RSdp

RSpdDatabase

Connect()

Open()

CreateServiceRecordL()

UpdateAttributeL()

UpdateAttributeL()

UpdateAttributeL()

UpdateAttributeL()

Mobiiliohjelmointi

Kevät 2009


Bluetooth service discovery
Bluetooth service discovery

Framework

CBTApp

CSdpAgent

NewL()

ListServicesL()

SetRecordFilterL()

NextRecordRequestL()

NextRecordRequestComplete()

AttributeRequestL()

AttributeRequestResult()

AttributeRequestComplete()

NextRecordRequestL()

. . .

Mobiiliohjelmointi

Kevät 2009


Content and goals4
Content and goals

  • Introduction

  • Problems

  • Patterns and considerations

  • Sample techniques

    • Mobile Java and Web Services

    • Symbian OS and Bluetooth

    • Maemo and WLAN

  • Summary

Mobiiliohjelmointi

Kevät 2009


Infrastructure
Infrastructure

  • When active WLAN is visible to apps as network access

    • No need for further complications when the system is up and running

    • Selection of the framework and actions taken when something changes to be defined

  • Framework for selecting the correct network and managing the existence of the access

Mobiiliohjelmointi

Kevät 2009


On connection event
On Connection Event

// Define events that will occur as changes occur in networking conditions.

static void on_connection_event(ConIcConnection *connection,

ConIcConnectionEvent *event,

gpointer user_data)

{

switch(con_ic_connection_event_get_status(event)) {

case CON_IC_STATUS_CONNECTED:

connected = TRUE;

break;

case CON_IC_STATUS_DISCONNECTED:

case CON_IC_STATUS_DISCONNECTING:

default:

connected = FALSE;

break;

}

}

Mobiiliohjelmointi

Kevät 2009


Initialize networking
Initialize networking

// Initializes networking functionality. If a non-zero value is returned, the

// operation is considered successfull, otherwise a failure is assumed.

ConIcConnection * InitializeNetworking() {

ConIcConnection *myConnection = con_ic_connection_new();

if(myConnection) {

g_signal_connect(G_OBJECT (myConnection),

"connection-event",

G_CALLBACK (on_connection_event),

NULL);

g_object_set(myConnection, "automatic-connection-events", TRUE, NULL);

con_ic_connection_connect(myConnection,CON_IC_CONNECT_FLAG_NONE);

}

return myConnection; // The return value is simply used as a boolean value.

}

Mobiiliohjelmointi

Kevät 2009


Content and goals5
Content and goals

  • Introduction

  • Problems

  • Patterns and considerations

  • Sample techniques

    • Mobile Java and Web Services

    • Symbian OS and Bluetooth

    • Maemo and WLAN

  • Summary

Mobiiliohjelmointi

Kevät 2009


Summary
Summary

  • Network resources form yet another layer of facilities and resources for applications

    • Longish travel-through times

    • Restricted support for handovers can sometimes cause problems (e.g. IP address change)

    • Firewalls, etc.

  • Number of design patterns that apply to the design of the applications relying on the use of network

    • Interactivity is a key goal!

Mobiiliohjelmointi

Kevät 2009


ad