INF245 Mobile applications Mobile and wireless message exchange
description
Transcript of INF245 Mobile applications Mobile and wireless message exchange
Molde University College INF 245 Fall 2007 OBø
1
INF245 Mobile applications
Mobile and wireless message exchange
MM chapter 5also builds upon
Michael Juntao Yuan(2004) Enterprise J2ME: kap 8, 9,10
HiM Fall 2007
Molde University College INF 245 Fall 2007 OBø
2
Messages generally Many types E-mail SMS WAP-push (EMS) MMS App to App
Messaging is asynchronous communication
Push vs. Pull Push- messages come
without request from the mobile device.
Pull means that the device asks the server if a message has arrived
Molde University College INF 245 Fall 2007 OBø
3
MJY fig. 8.1
Fra Yuan (2004)
CheckBox1
Probably the single most used application on the Internet
The e-mail reader often contains PIM functionality
e-mail operation, see figure E-mail is important on mobile
devices, but there are problems: Long messages Spam Where does the message end if you
have several machines/e-mail clients
Solutions IMAP-servers support the storage
of e-mail on the mail server and gives betters support for stationary/mobile e-mail management
http://www.imap.org/papers/imap.vs.pop.brief.html
A third alternative is web-mail. Here the messages are also stored on server.
Molde University College INF 245 Fall 2007 OBø
4
SMS
Introduced in 1991 as a part of the GSM-standard Considerable success Max length is 160 letters (70 in Chinese) Advantages
”Guaranteed” delivery using store and forward Easy to use? Low cost? Major income for the service supplier
Consumers: Peer to peer and information services Business: Positioning, Work orders, Remote reading
Molde University College INF 245 Fall 2007 OBø
5
Group discussion
Give six examples of SMS services as interesting as possible
Molde University College INF 245 Fall 2007 OBø
6
SMS-services
Finland 2002 Ring tones 24% Consumption control16% Logos 14% Catalogue services 10% TV-chat 7%
3 finish TV canals mean user is a female
22 years old Others 29 %
Goods tracing Travel information Cab reservation Buying tram tickets Who owns the car? Amount in my bank
account
Molde University College INF 245 Fall 2007 OBø
7
SMS-character set
More technical information can be found here: http://www.dreamfabric.com/sms/
Molde University College INF 245 Fall 2007 OBø
8
SMS in a system context Simple sending and reception from devices
in mobile networks Sending and receiving from outside the
mobile network using a proprietary interface in SMSC MO = Mobile Originated MT= Mobile Terminated
Three technical solutions for SMS service delivery By agreement with the network operator
For example: Telenor SMS Aksess Protocols: Telocator Alphanumeric
Protocol (TAP)Short Message Point to Point
By agreement with aggregator. The Aggregator gives access to all relevant networks PSWIN http://www.pswin.com/ Simplewire
http://simplewire.com Dataguard http://www.dataguard.no SMS can be sent using e-mail (smtp), http etc.
SMS by using a connected mobile phone or a gprs- or umts- card– for example Nokia D211
Molde University College INF 245 Fall 2007 OBø
9
Renting a gateway
Relatively expensive A cheaper solution is using a phone or a phone card
But commercial gateways have advantages Short-numbers as 1980, 2180, etc. is possible
(a dedicated short number is very expensive) Overtaxing SMS for commercial purposes is
possible to avoid loosing money by sending sms Many and flexible interfaces for SMS Possible to send data in binary format using SMS High availability
Molde University College INF 245 Fall 2007 OBø
10
Using a gateway from PSWin Provides interfaces between application
as SMS Several interfaces
SMTP HTTP ActiveX/Com More…
Molde University College INF 245 Fall 2007 OBø
11
Developing for the PSWin gateway PSWin supplies a dedicated ActiveX/COM-
component for using the gateway in ActiveX-compatible development tools and a dedicated client for for .NET-programs.
HTTP-interface permits simple connection from most programming environments using HTTP POST-requests.
Molde University College INF 245 Fall 2007 OBø
12
Sending messages using the HTTP-interface
Sending messages is used by sending a HTTP- request to the PSWin server. Main Request parameters: USER – user name for the PSWin account PW – password for the account RCV – receivers phone number. SND – senders phone number as shown in the message CT - content-type (1 for text TXT – URL-encoded message content
OBS: Parameter names are case sensitive Country code (47 for Norway) must be present in the phone number Phone number can only contain digits (no spaces or + in front of
country code)
Molde University College INF 245 Fall 2007 OBø
13
Sample request to send a message
POST /http4sms/send.asp HTTP/1.0Host: sms.pswin.comContent-type: application/x-www-form-urlencodedContent-length: 87USER=demo&PW=password&RCV=4711223344&TXT=Please+send+me+a+copy+of+the+datamodel.+Rgds,+John
Molde University College INF 245 Fall 2007 OBø
14
Reception of messages using the HTTP-interface
Messages are received making a HTTP POST-request to your server
Server address manually configured by PSWin.
Main request parameters are: SND - Senders phone number TXT – Text message content (URL-encoded)
OBS: The code-word is included in the received message
Molde University College INF 245 Fall 2007 OBø
15
Sample received message request to your server
POST /receive.asp HTTP/1.0Host: youserver.comContent-type: application/x-www-form-urlencodedContent-length: 45RCV=37774757&SND=4712345678&TXT=testing%20SMS
Molde University College INF 245 Fall 2007 OBø
16
Group discussion
Design the dialogue for an SMS service to request exams results The service should serve the students of a
number of colleges and universities. It must be possible to order
a message as soon a new result is available a message reporting all results so far
How do you ensure that only the student can get to his own results
Molde University College INF 245 Fall 2007 OBø
17
MMS Multimedia Messaging Service Multimedia
Pictures, Text and Sound Audio and video Presentations
Immediate or "Store and Forward"
Also supports using e-mail addressing
Standardized by OMA and 3GPP
MMS is transported using WAP
No size limitations 30-100kB in practice in 1. generation
Messages are sent via a MMSC – MMS Center
1. generation is formatted as a slide show with image and text Video, Audio and Text
files can be connected to a slide using SMIL (Synchronized Multimedia Integration Language) en W3C XML-standard
Molde University College INF 245 Fall 2007 OBø
18
<smil><head><layout><root-layout width="176" height="208"/><region id="Image" width="160" height="120" top="5" left="8" fit="meet"/><region id="Text" width="160" height="73" top="130" left="8" fit="scroll"/></layout></head><body><par dur="5000ms"><text region="Text" src="Dette_er.txt"/></par><par dur="5000ms"><audio src="Lydklipp.amr"/><img region="Image" src="Bilde_09.jpg"/></par></body></smil>
Molde University College INF 245 Fall 2007 OBø
19
Aften-posten
Molde University College INF 245 Fall 2007 OBø
20
Aftenposten
Abonnenter: Det er 5,2 millioner mobilabonnementer i Norge, en økning på syv prosent fra i fjor.
Mobiltrafikk: Mobiltrafikken første halvår 2007 økte med 21 prosent fra samme periode i fjor.
Prating: Vi snakket i gjennomsnitt 2,4 timer i måneden fra januar til juli. Det er en økning på 18 minutter i måneden fra i fjor. Totalt snakket vi 76 millioner timer i mobiltelefon på årets seks første måneder. Det tilsvarer 3,2 millioner døgn.
Tekstmeldinger: Vi sendte over tre milliarder meldinger på mobilen første halvår i år (inkl. MMS og innholdsmeldinger), det er en økning på 12 prosent. I gjennomsnitt sendte norske mobilkunder 99 meldinger pr. måned. Det er fem meldinger flere enn på samme tidspunkt i fjor.
MMS-meldinger: Vi sendte 51 millioner MMS-meldinger fra januar til juli. Det er to prosent av det totale antall meldinger og har ikke økt siden i fjor.
Mobilen overtar: Mobiltrafikk sto for 46 prosent av samlet trafikkvolum (fastnett og mobilnett) fra januar til juli 2007. I fjor var tallet 38 prosent og bare 28 prosent for to år siden.
Nedgang : Til tross for økning i mobilbruk, er nedgangen i bruk av fasttelefon så merkbar at totaltrafikken gikk ned med fem prosent fra første halvår i fjor.
Kilde: Det norske telekommarkedet 1. halvår 2007. Post- og teletilsynet.
Slik er det ellers i Norden Sverige: Hadde ved utgangen av 2006 9,6
millioner mobilabonnement. Snakker 1,8 timer i mobil i måneden og sender 25 meldinger i måneden i snitt.
Danmark: Hadde ved utgangen av 2006 5,8 millioner mobilabonnement. Snakker 1,8 timer i mobil i måneden og sender hele 150 meldinger i måneden i snitt.
Finland: Er mobilvinneren. Hadde 5,6 millioner mobilabonnement ved utgangen av 2006. Snakker 3,1 timer i måneden i mobil og sender 47 meldinger i måneden i snitt
PS! Tall fra desember 2006.
Norway Sweden Denmark FinlandTraffic 21 %Talk 2,4h/mon 1,8h/mon 1,8h/mon 3,1h/monSMS 99/mon 25/mon 150/mon 47/monMMS 2/monAugmentation MMS 0
Molde University College INF 245 Fall 2007 OBø
21
Group discussion
Why has the use of MMS not augmented? How can the operators influence this? What applications can you see for MMS?
Molde University College INF 245 Fall 2007 OBø
22
SMS vs. e-mail
e-mail attachments ordering in folders spam durability infrastructure
SMS limited length pros and cons infrastructure
Molde University College INF 245 Fall 2007 OBø
23
MMS –development using Nokia Mobile Server Services SDK
Used to develop backend-solutions for MMS Nokia Mobile Server Services Emulator Nokia Mobile Server Services API and Library MMS device emulator
Molde University College INF 245 Fall 2007 OBø
24
Instant messaging 100 mill users of desktop IM in 2003... what about
mobile IM? Presence an important element
IMPS= Instant Messaging and Presence Service Elements of presence
Connected/Status/Mood Localization
Not store and forward Interoperability problems between solutions, Mobile instant messaging clients: AOL, Microsoft,
Openwave. There are also clients that can use several IMS:
http://www.agilemobile.com JSR 164 og JSR 165 standardises IM og Presence
using SIP (Session Initiation Protocol)
Molde University College INF 245 Fall 2007 OBø
25
WAP-Push
Protocol to send messages to a device
Handled by wap-reader Architecture is defined in
WAP push framework PAP transfers message
using XML Possible operations: Push,
Submit, Cancel, Replace Status and Client Capability
Query Response is in XML
figur 5.2
Molde University College INF 245 Fall 2007 OBø
26
App to App messaging
A software layer called Message Oriented Middleware (MOM) handles the message exchange
MOM example: JMS (Java Messaging Service) Advantages
Universal integration using standardized messages that can be sent regardless of receivers state
Better reliability – delivery guaranteed Better scalability: the server is not busy maintaining a
considerable number of passive connections Quality of service – it is possible to handle messages in order
of priority
Molde University College INF 245 Fall 2007 OBø
27
Mobile MOM Messages are being handled by
Messaging Middleware Servers Server functionality is specified in JMS Two models:
Publish-subscribe Point to point
Commercial MOM for mobile applications: Mobile JMS from iBus//Mobile
Servers on gateway light weight clients on mobile devices (J2ME,
SMS, WAP) IBM Websphere MQ Everyplace
Mobile MOM-server Compression and encryption Available for Windows Mobile, Symbian and
under WebSphere Micro Environment PersonalJava
Servers are not available for CLDC/MIDP, but a client is
Fra Yuan (2004)
Fra Yuan (2004)
Molde University College INF 245 Fall 2007 OBø
28