networking and mobile devices. content and goals introductionintroduction application...
Post on 22-Dec-2015
220 views
TRANSCRIPT
![Page 1: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/1.jpg)
Networking and Mobile Networking and Mobile DevicesDevices
![Page 2: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/2.jpg)
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
![Page 3: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/3.jpg)
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
![Page 4: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/4.jpg)
Networking SystemNetworking System
Station 1
Station 2
Station 3
transmissions
![Page 5: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/5.jpg)
Adding a ProxyAdding a Proxy
Station 1
Station 2
WirelessStation
Proxy
Fixeddomain
Wirelessdomain
![Page 6: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/6.jpg)
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
![Page 7: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/7.jpg)
Wireless Application ProtocolWireless Application Protocol WAP WAP
![Page 8: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/8.jpg)
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
![Page 9: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/9.jpg)
(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
![Page 10: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/10.jpg)
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
![Page 11: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/11.jpg)
Ad-hoc networkAd-hoc network
A
C
B A
C
B
D
A
D
![Page 12: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/12.jpg)
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
![Page 13: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/13.jpg)
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
![Page 14: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/14.jpg)
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
![Page 15: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/15.jpg)
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
![Page 16: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/16.jpg)
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
![Page 17: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/17.jpg)
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?
![Page 18: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/18.jpg)
Web Browsing ProxyWeb Browsing Proxy
Computerat home
Web server
Services
Mobiledevice
Wireless access- Screen shots- Link information
Broadband access- HTTP- Java
![Page 19: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/19.jpg)
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, ...
![Page 20: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/20.jpg)
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
![Page 21: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/21.jpg)
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
![Page 22: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/22.jpg)
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
![Page 23: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/23.jpg)
Web ServiceWeb Service
device
UDDI
Web service
servicelookup
WSDLservice
description
serviceuse
![Page 24: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/24.jpg)
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
![Page 25: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/25.jpg)
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
![Page 26: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/26.jpg)
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
![Page 27: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/27.jpg)
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)
![Page 28: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/28.jpg)
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
![Page 29: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/29.jpg)
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
![Page 30: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/30.jpg)
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
![Page 31: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/31.jpg)
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
![Page 32: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/32.jpg)
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
![Page 33: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/33.jpg)
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
![Page 34: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/34.jpg)
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
![Page 35: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/35.jpg)
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
![Page 36: Networking and Mobile Devices. Content and goals IntroductionIntroduction Application partitioningApplication partitioning Concerns in networkingConcerns](https://reader035.vdocuments.mx/reader035/viewer/2022062407/56649d7e5503460f94a617a5/html5/thumbnails/36.jpg)
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