networking and mobile devices. content and goals introductionintroduction application...
Post on 22-Dec-2015
219 views
TRANSCRIPT
Networking and Mobile Networking and Mobile DevicesDevices
Content and goalsContent and goals
• IntroductionIntroduction• Application partitioningApplication partitioning• Concerns in networkingConcerns in networking• Sample techniquesSample techniques
– Web ServicesWeb Services– BluetoothBluetooth
• MIDP Java and web servicesMIDP Java and web services• Symbian OS and BluetoothSymbian OS and Bluetooth• SummarySummary
IntroductionIntroduction
• Fundamentally, mobile devices liberate from the Fundamentally, mobile devices liberate from the restrictions associated with a location -> Physical restrictions associated with a location -> Physical distributiondistribution
• IssuesIssues– ResourcesResources– Transparency (off-line working, cost awareness, energy Transparency (off-line working, cost awareness, energy
consumption, travel-through time, ...)consumption, travel-through time, ...)
• Can be taken as yet another resource whose accessing Can be taken as yet another resource whose accessing can be slowercan be slower– E.g. memoryE.g. memory
• Separate thread often needed for UI and Separate thread often needed for UI and communicationscommunications
Networking SystemNetworking System
Station 1
Station 2
Station 3
transmissions
Adding a ProxyAdding a Proxy
Station 1
Station 2
WirelessStation
Proxy
Fixeddomain
Wirelessdomain
Example Proxy: Wireless CorbaExample Proxy: Wireless Corba
GIOP
GTP
Adaptationand
transport
object
Terminal
GTP
Adaptationand
transport
IIOP
TCP
GIOP
IIOP
TCP
objectCorba invocations
Access bridge Other ORBwireless fixed
Wireless Application ProtocolWireless Application Protocol WAP WAP
Example Proxy: WAPExample Proxy: WAP
WAP device
WAE
WSP
WTP
WTLS
WDP
Bearer
WAP gateway
WSP
WTP
WTLS
WDP
Bearer
Web server
WAE
HTTP
SSL
TCP
IP
HTTP
SSL
TCP
IP
(WAP Stack in Device)(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)
Security layer: Wireless transport layer security (WTLS)
Transport layer: Wireless datagram protocol (WDP)
Bearers (SMS, CSD, GPRS,...)
bypassing apps
Infrastructure vs. Ad Hoc Infrastructure vs. Ad Hoc NetworksNetworks
• InfrastructureInfrastructure– Managed structure; control on who is allowed to Managed structure; control on who is allowed to
participateparticipate– Somewhat staticSomewhat static– Commonly relies on e.g. servers and registry Commonly relies on e.g. servers and registry
componentscomponents
• Ad-HocAd-Hoc– Members enter and leave uncontrollablyMembers enter and leave uncontrollably– Dynamic in natureDynamic in nature– Commonly relies on e.g. dynamic service Commonly relies on e.g. dynamic service
discovery and formation rather than serversdiscovery and formation rather than servers
Ad-hoc networkAd-hoc network
A
C
B A
C
B
D
A
D
Stateful vs. Stateless Systems Stateful vs. Stateless Systems
• StatefulStateful– Each station can have its own stateEach station can have its own state– Global state is the combination of all local statesGlobal state is the combination of all local states– Complicates e.g. testingComplicates e.g. testing
• StatelessStateless– No stored stateNo stored state– Usually one controlUsually one control– Eased testingEased testing
• Dilemma: Stateless can implement stateful by Dilemma: Stateless can implement stateful by carrying all state information in transmissionscarrying all state information in transmissions– Serious communication overheadSerious communication overhead– Needed in practice if no support from underlying Needed in practice if no support from underlying
infrastructureinfrastructure
Design patterns for networking Design patterns for networking environment environment
• Use a network wrapperUse a network wrapper
• Consider treating networking features Consider treating networking features similar to resourcessimilar to resources
• When implementing server, keep it When implementing server, keep it separate from clientseparate from client
• Be prepared for loading timesBe prepared for loading times
• Consider proactivenessConsider proactiveness
Content and goalsContent and goals
• IntroductionIntroduction• Application partitioningApplication partitioning• Concerns in networkingConcerns in networking• Sample techniquesSample techniques
– Web ServicesWeb Services– BluetoothBluetooth
• MIDP Java and web servicesMIDP Java and web services• Symbian OS and BluetoothSymbian OS and Bluetooth• SummarySummary
Program-Oriented Approach Program-Oriented Approach using Client-Server Paradigmusing Client-Server Paradigm
Client 3
Client 1
Client 2
Server 1
Services
Server 2
Services
Client-Server Architecture in a Client-Server Architecture in a Mobile Device Only SystemMobile Device Only System
Device 1
Device 2
Device 3
ServerApp 1
ClientApp 1
ServerApp 2
ClientApp 2
ClientApp 2
ClientApp 2
Browser-based ApproachBrowser-based Approach
• Only requests and replies used, stateless Only requests and replies used, stateless protocol is enoughprotocol is enough– WML, HTTP, XHTML, ...WML, HTTP, XHTML, ...
• Downloading of executables that run on the Downloading of executables that run on the flyfly
• Problems Problems – Convenient use may require redesign of web Convenient use may require redesign of web
systems in any casesystems in any case– Travel-through time can be difficult to hideTravel-through time can be difficult to hide– Proxy?Proxy?
Web Browsing ProxyWeb Browsing Proxy
Computerat home
Web server
Services
Mobiledevice
Wireless access- Screen shots- Link information
Broadband access- HTTP- Java
Telephony or Data Telephony or Data Communications?Communications?
• TelephonyTelephony– SMS, MMS (SMIL)SMS, MMS (SMIL)– Commonly rapid connections (something may be taking Commonly rapid connections (something may be taking
place behind the curtains however)place behind the curtains however)– Network push is okNetwork push is ok
• Data communicationsData communications– GPRSGPRS– Long connection timeLong connection time– How to make a network initated operation?How to make a network initated operation?
• Some issuesSome issues– Cost, ease of use, what is expected by the user, what Cost, ease of use, what is expected by the user, what
facilities are available in the installation base, ...facilities are available in the installation base, ...
Content and goalsContent and goals
• IntroductionIntroduction• Application partitioningApplication partitioning• Concerns in networkingConcerns in networking• Sample techniquesSample techniques
– Web ServicesWeb Services– BluetoothBluetooth
• MIDP Java and web servicesMIDP Java and web services• Symbian OS and BluetoothSymbian OS and Bluetooth• SummarySummary
Concerns in NetworkingConcerns in Networking
• Network resource managementNetwork resource management– Often visible in software architecture as a dedicated Often visible in software architecture as a dedicated
application moduleapplication module– Connection to e.g. master communications facility?Connection to e.g. master communications facility?
• Finding suitable network componentsFinding suitable network components– Know the addressKnow the address– Centralized repositoriesCentralized repositories– Query protocolsQuery protocols
• Service useService use– Stateless or stateful communications?Stateless or stateful communications?
• Graceful terminationGraceful termination– User initiatedUser initiated– TimeoutsTimeouts
Content and goalsContent and goals
• IntroductionIntroduction• Application partitioningApplication partitioning• Concerns in networkingConcerns in networking• Sample techniquesSample techniques
– Web ServicesWeb Services– BluetoothBluetooth
• MIDP Java and web servicesMIDP Java and web services• Symbian OS and BluetoothSymbian OS and Bluetooth• SummarySummary
Web ServiceWeb Service
device
UDDI
Web service
servicelookup
WSDLservice
description
serviceuse
Web Service (Cont’d)Web Service (Cont’d)
• Application modelApplication model– No particular model; offers independent servicesNo particular model; offers independent services
• Finding web servicesFinding web services– UDDIUDDI– WS Dynamic DiscoveryWS Dynamic Discovery
• Service useService use– Acts as a service, not as an objectActs as a service, not as an object
• BearersBearers– SOAPSOAP– Bearer independent, practical implementations Bearer independent, practical implementations
commonly use HTTPcommonly use HTTP
Content and goalsContent and goals
• IntroductionIntroduction• Application partitioningApplication partitioning• Concerns in networkingConcerns in networking• Sample techniquesSample techniques
– Web ServicesWeb Services– BluetoothBluetooth
• MIDP Java and web servicesMIDP Java and web services• Symbian OS and BluetoothSymbian OS and Bluetooth• SummarySummary
BluetoothBluetooth
Physical connection (USB/UART/I2C...)
BT HWHost Controller Interface Driver
Baseband controller
Link manager
BT HOST (Laptop, MCU)
L2CAP
Host Controller Interface Driver
RFCOMM SDP
app1
app2
PPP
UDP/TCPIP
Bluetooth (Cont’d)Bluetooth (Cont’d)
• Application modelApplication model– No particular model; offers independent servicesNo particular model; offers independent services– Bluetooth profiles define different applicationsBluetooth profiles define different applications
• Finding BT servicesFinding BT services– SDPSDP
• Service useService use– RFCOMM, serial port emulating protocol, can be used as a RFCOMM, serial port emulating protocol, can be used as a
bearer for more complex protocolsbearer for more complex protocols– Other protocols for using certain standardized services (e.g. Other protocols for using certain standardized services (e.g.
OBEX)OBEX)
• BearersBearers– Own radio technology (frequency 2,4000-2,4835GHz)Own radio technology (frequency 2,4000-2,4835GHz)
Content and goalsContent and goals
• IntroductionIntroduction• Application partitioningApplication partitioning• Concerns in networkingConcerns in networking• Sample techniquesSample techniques
– Web ServicesWeb Services– BluetoothBluetooth
• MIDP Java and web servicesMIDP Java and web services• Symbian OS and BluetoothSymbian OS and Bluetooth• SummarySummary
MIDP Java and Web ServicesMIDP Java and Web Services
LocalApplication
Stub
Service ProviderInterface
Local Client
1
2
3
4 Network
Device
RemoteServices
1. Application calls stub2. Stub calls WB via SPI3. SPI opens a connection to remote WS4. Remote computer serves the request
APIs and ToolsAPIs and Tools
• Java API for XML processing (JAXP)Java API for XML processing (JAXP)– Non-validating parser intended to parse incoming Non-validating parser intended to parse incoming
XML documentsXML documents
• Java API for XML-based RPC (JAX-RPC)Java API for XML-based RPC (JAX-RPC)– Implementation of RPCImplementation of RPC
• Service Provider Interface (SPI)Service Provider Interface (SPI)– Stub generation in a compatible fashionStub generation in a compatible fashion
• Stub GeneratorStub Generator– Generation of client-side proxy that can be called Generation of client-side proxy that can be called
by the application to make calls to WSby the application to make calls to WS
Some Other Available TechniquesSome Other Available Techniques
• BluetoothBluetooth
• MessagingMessaging
• Telephony featuresTelephony features
• HTTP and browsing related featuresHTTP and browsing related features
• Plain data communications using e.g. Plain data communications using e.g. sockets or serial portsockets or serial port
Content and goalsContent and goals
• IntroductionIntroduction• Application partitioningApplication partitioning• Concerns in networkingConcerns in networking• Sample techniquesSample techniques
– Web ServicesWeb Services– BluetoothBluetooth
• MIDP Java and web servicesMIDP Java and web services• Symbian OS and BluetoothSymbian OS and Bluetooth• SummarySummary
Symbian Bluetooth FacilitiesSymbian Bluetooth Facilities
• Service DatabaseService Database– Hosts information that can be used by other devicesHosts information that can be used by other devices– Used via Database Server API (RSdp), actual database Used via Database Server API (RSdp), actual database
characterized by RSdpDatabasecharacterized by RSdpDatabase
• Service DiscoveryService Discovery– Used to find devices, services and service attributesUsed to find devices, services and service attributes– Discovery agent (CSdpAgent) for configuring and starting Discovery agent (CSdpAgent) for configuring and starting
the searchthe search– Notifier interface (MSdpAgentNotifier) for callbacksNotifier interface (MSdpAgentNotifier) for callbacks
• Service useService use– E.g. socket communicationE.g. socket communication
Some Other Available TechniquesSome Other Available Techniques
• MessagingMessaging– Email, SMS, MMS (targeted to human)Email, SMS, MMS (targeted to human)– BIO (targeted to device)BIO (targeted to device)– FaxFax
• Browsing protocols (e.g. HTTP, WAP)Browsing protocols (e.g. HTTP, WAP)• TelephonyTelephony• FTP and Telnet over a data connectionFTP and Telnet over a data connection• GPRS, Bluetooth, Infrared, USBGPRS, Bluetooth, Infrared, USB
Content and goalsContent and goals
• IntroductionIntroduction• Application partitioningApplication partitioning• Concerns in networkingConcerns in networking• Sample techniquesSample techniques
– Web ServicesWeb Services– BluetoothBluetooth
• MIDP Java and web servicesMIDP Java and web services• Symbian OS and BluetoothSymbian OS and Bluetooth• SummarySummary
SummarySummary
• Network resources form yet another layer of Network resources form yet another layer of facilities and resources for applicationsfacilities and resources for applications– Longish travel-through timesLongish travel-through times– Restricted support for handovers can sometimes Restricted support for handovers can sometimes
cause problems (e.g. IP address change)cause problems (e.g. IP address change)– Firewalls, etc.Firewalls, etc.
• Two-thread patternTwo-thread pattern– One for user, one for networkOne for user, one for network
• Stateless vs. stateful applicationsStateless vs. stateful applications