15 instant messaging presence
TRANSCRIPT
-
8/8/2019 15 Instant Messaging Presence
1/20
1
Petrozavodsk Kimmo Raatikainen September 10, 2004
Instant Messaging and PresenceInstant Messaging and Presence
Kimmo Raatikainen
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 2
LessionLession OutlineOutline
Overview
A Model for Presence and Instant Messaging
Common Profile for Presence
Common Profile for Instant Messaging
SIMPLE
XMPP
-
8/8/2019 15 Instant Messaging Presence
2/20
2
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 3
OverviewOverview 1/31/3
Presence and Instant Messaging have recentlyemerged as a new medium of communications overthe Internet.
Presence is a means for finding, retrieving, andsubscribing to changes in the presence information(e.g. "online" or "offline") of other users.
Instant messaging is a means for sending small,simple messages that are delivered immediately toonline users.
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 4
OverviewOverview 2/32/3
Applications of presence and instant messagingcurrently use independent, non-standard and non-interoperable protocols developed by various vendors.
The goal of the IETF IMPP WG is to define a standardprotocol so that independently developed applicationsof instant messaging and/or presence can
interoperate across the Internet.
-
8/8/2019 15 Instant Messaging Presence
3/20
3
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 5
OverviewOverview 3/33/3
It is expected that Presence and Instant Messagingservices will be particularly valuable to users overmobile IP wireless access devices.
Indeed the number of devices connected to theInternet via wireless means is expected to growsubstantially in the coming years.
It is not reasonable to assume that separate protocolswill be available for the wireless portions of theInternet.
Petrozavodsk Kimmo Raatikainen September 10, 2004
A Model for Presence andA Model for Presence andInstant MessagingInstant Messaging
RFC 2778
-
8/8/2019 15 Instant Messaging Presence
4/20
4
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 7
OverviewOverview
The model consists of a number of named entities that appear, in
some form, in existing systems.
The model defines two services: a Presence Serviceand an
Instant Message Service.
The Presence Serviceserves to accept information, store it, and
distribute it.
The information stored is Presence Information.
The Instant Message Serviceserves to accept and deliver
Instant Messagesto Instant Inboxes.
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 8
Presence ServicePresence Service
Presence Service
PresentityWatcher
Fetcher Subscriber
Poller
-
8/8/2019 15 Instant Messaging Presence
5/20
5
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 9
Presence ServicePresence Service 1/31/3
The Presence Servicehas two distinct sets of "clients".
One set of clients, called Presentities, providesPresence Informationto be stored and distributed.
The other set of clients, called Watchers, receivesPresence Informationfrom the service.
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 10
Presence ServicePresence Service 2/32/3
There are two kinds of Watchers, called Fetchersand Subscribers.
A Fetchersimply requests the current value of somePresentity's Presence Informationfrom thePresence Service.
A Subscriberrequests notification from the Presence
Serviceof (future) changes in some Presentity'sPresence Information.
A special kind of Fetcheris one that fetchesinformation on a regular basis: a Poller.
-
8/8/2019 15 Instant Messaging Presence
6/20
6
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 11
Presence ServicePresence Service 3/33/3
The Presence Servicealso has WatcherInformationabout Watchersand their activities interms of fetching or subscribing to PresenceInformation.
The Presence Servicemay also distribute WatcherInformationto some Watchers, using the same
mechanisms that are available for distributingPresence Information.
Changes to Presence Informationare distributed to
Subscribersvia Notifications.
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 12
Instant Message ServiceInstant Message Service
The Instant Message Servicealso has two distinctsets of "clients":
Sendersand Instant Inboxes.
A Senderprovides Instant Messagesto the InstantMessage Service for delivery.
Each Instant Messageis addressed to a particularInstant Inbox Address, and the Instant Message
Serviceattempts to deliver the message to a
corresponding Instant Inbox.
-
8/8/2019 15 Instant Messaging Presence
7/20
7
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 13
ProtocolsProtocols
A Presence Protocoldefines the interaction betweenPresence Service, Presentities, and Watchers.
Presence Informationis carried by the PresenceProtocol.
An Instant Message Protocoldefines the interactionbetween Instant Message Service, Senders, and
Instant Inboxes.
Instant Messagesare carried by the InstantMessage Protocol.
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 14
FormatsFormats 1/31/3
The model defines the Presence Informationtoconsist of an arbitrary number of elements: PresenceTuples.
Each such element consists of a Statusmarker, anoptional Communication Address, and optional OtherPresence Markup.
-
8/8/2019 15 Instant Messaging Presence
8/20
-
8/8/2019 15 Instant Messaging Presence
9/20
-
8/8/2019 15 Instant Messaging Presence
10/20
10
Petrozavodsk Kimmo Raatikainen September 10, 2004
Common Profile for PresenceCommon Profile for Presence(CPP)(CPP)
draft-ietf-impp-pres-02
February 28, 2003
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 20
Subscribe OperationSubscribe Operation
When an application wants to subscriber to thepresence information associated with a Presentity, itinvokes the subscribeoperation.
The subscribe operation has the following attributes:
watcher, target, duration, SubscriptID and TransID.
The 'watcher' and 'target' identify the Watcherand
Presentity, respectively.
-
8/8/2019 15 Instant Messaging Presence
11/20
11
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 21
Response OperationResponse Operation
Upon receiving a subscribe operation, the serviceimmediately responds by invoking the responseoperation containing the same TransID.
The response operation has the following attributes:
status, TransID, and duration.
'status' indicates whether the subscribe operation has
succeeded or failed.
The 'duration' attribute specifies the number of seconds for
which the subscription will be active.
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 22
Notify OperationNotify Operation
If the response operation indicates success, theservice immediately invokes the notifyoperation tocommunicate the presence information to theWatcher.
The notify operation has the following attributes:
watcher, target, and TransID.
The values of 'watcher' and 'target' are identical to those
given in the subscribe operation that triggered this notify
operation.
The TransID is a unique identifier for this notification.
-
8/8/2019 15 Instant Messaging Presence
12/20
12
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 23
UnsunscribeUnsunscribe
The application may prematurely cancel a subscriptionby re-invoking the subscribe operation (as describedabove) with a duration of 0 and the same SubscriptIDas the original subscribe operation
Note that a notify operation will be invoked when asubscription is prematurely canceled in this fashion;
this notification may be discarded by the watcher.
Petrozavodsk Kimmo Raatikainen September 10, 2004
Common Profile for InstantCommon Profile for InstantMessaging (CPIM)Messaging (CPIM)
draft-ietf-impp-im-02
February 28, 2003
-
8/8/2019 15 Instant Messaging Presence
13/20
13
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 25
Message OperationMessage Operation 1/21/2
When an application wants to send a message to anInstant Inbox, it invokes the messageoperation,
The message operation has the following attributes:
source, destination, MaxForwards and TransID.
'source' and 'destination' identify the originator and recipient
of an instant message, respectively, and consist of an
Instant Inboxidentifier.
The MaxForwards is a hop counter to avoid loops through
gateways. Its initial value is set by the originator.
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 26
Message OperationMessage Operation 2/22/2
The TransID is a unique identifier used to correlate message
operations to response operations; gateways should be
capable of handling TransIDs up to 40 bytes in length.
The message operation also has some content, theinstant message itself, which may be textual, or whichmay consist of other data.
The specification assumes that instant messagingprotocols provide reliable message delivery:
there are no application-layer message delivery assurance
provisions in this specification.
-
8/8/2019 15 Instant Messaging Presence
14/20
14
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 27
Response OperationResponse Operation
Upon receiving a message operation, the serviceimmediately responds by invoking the responseoperation containing the same transaction-identifier.
The response operation contains the followingattributes:
TransID and status.
The TransID is used to correlate the response to a particular
instant message.
Status indicates whether the delivery of the message
succeeded or failed.
Petrozavodsk Kimmo Raatikainen September 10, 2004
SIMPLE: SIP for InstantSIMPLE: SIP for InstantMessaging and PresenceMessaging and Presence
IETF WG
-
8/8/2019 15 Instant Messaging Presence
15/20
15
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 29
SIP as a Presence ProtocolSIP as a Presence Protocol
This is accomplished through a concrete instantiationof the general event notification framework defined forSIP, and as such, makes use of the SubscribeandNotifymethods defined there.
SIP is particularly well suited as a presence protocol.
SIP location services already contain presence
information, in the form of registrations.
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 30
Event PackageEvent Package
This event package is based on the concept of apresence agent, which is a new logical entity that iscapable of accepting subscriptions, storingsubscription state, and generating notifications whenthere are changes in presence.
This event package is also compliant with the
Common Presence Profile (CPP) framework.
-
8/8/2019 15 Instant Messaging Presence
16/20
16
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 31
Presence User Agent (PUA)Presence User Agent (PUA)
A Presence User Agent manipulates presenceinformation for a presentity.
Multiple PUAs per presentity are allowed.
This means that a user can have many devices, eachof which is independently generating a component ofthe overall presence information for a presentity.
PUAs push data into the presence system, but areoutside of it, in that they do not receive SUBSCRIBEmessages, or send NOTIFY messages.
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 32
Presence Agent (PA)Presence Agent (PA) 1/21/2
A presence agent is a SIP user agent which iscapable of receiving SUBSCRIBE requests,responding to them, and generating notifications ofchanges in presence state.
A presence agent must have knowledge of thepresence state of a presentity.
This means that it must have access to presence datamanipulated byPUAs for the presentity.
-
8/8/2019 15 Instant Messaging Presence
17/20
17
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 33
Presence Agent (PA)Presence Agent (PA) 2/22/2
A PA is always addressable with a SIP URI thatuniquely identifies the presentity:
There can be multiple PAs for a particular presentity,each of which handles some subset of the totalsubscriptions currently active for the presentity.
A PA is also a notifier (RFC 3265) that supports the
presence event package.
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 34
Presence ServerPresence Server
A presence server is a physical entity that can act aseither a presence agent or as a proxy server forSUBSCRIBE requests.
When acting as a PA, it is aware of the presenceinformation of the presentity through some protocolmeans.
When acting as a proxy, the SUBSCRIBE requestsare proxied to another entity that may act as a PA.
-
8/8/2019 15 Instant Messaging Presence
18/20
18
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 35
Edge Presence ServerEdge Presence Server
An edge presence server is a presence agent that isco-located with a PUA.
It is aware of the presence information of the presentitybecause it is co-located with the entity that manipulatesthis presence information.
Petrozavodsk Kimmo Raatikainen September 10, 2004
Extensible Messaging andExtensible Messaging andPresence ProtocolPresence Protocol
IETF XMPP WG
-
8/8/2019 15 Instant Messaging Presence
19/20
19
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 37
XMPP CoreXMPP Core
The Extensible Messaging and Presence Protocol(XMPP) is an open XML protocol for near-real-timemessaging, presence, and request-response services.
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 38
ServerServer
A server acts as an intelligent abstraction layer for XMPP
communications.
Its primary responsibilities are to manage connections from or
sessions for other entities and to route appropriately-addressed
XML data "stanzas" among such entities over XML streams.
Most XMPP-compliant servers also assume responsibility for the
storage of data that is used by clients.
Compliant server implementations MUST ensure in-order
processing of XML stanzas received from connected clients,
servers, and services.
-
8/8/2019 15 Instant Messaging Presence
20/20
20
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 39
ClientClient
Most clients connect directly to a server over a TCP socket and
use XMPP to take full advantage of the functionality provided by
a server and any associated services.
Multiple resources (e.g., devices or locations) MAY connect
simultaneously to a server on behalf of each authorized client
with each resource connecting over a discrete TCP socket
and differentiated by the resource identifier of a JID
The port registered with the IANA for connections between a
Jabber client and a Jabber server is 5222.
Petrozavodsk, September 10, 2004 Kimmo Raatikainen 40
GatewayGateway
A gateway is a special-purpose server-side servicewhose primary function is to translate XMPP into theprotocol(s) of another messaging system, as well as totranslate the return data back into XMPP.
Examples are gateways to SIMPLE, Internet RelayChat (IRC), Short Message Service (SMS), SMTP,
and foreign instant messaging networks such asYahoo!, MSN, ICQ, and AIM.