Presentation is loading. Please wait.

Presentation is loading. Please wait.

Peer-to-Peer Information Systems Week 14: Instant Messaging

Similar presentations


Presentation on theme: "Peer-to-Peer Information Systems Week 14: Instant Messaging"— Presentation transcript:

1 Peer-to-Peer Information Systems Week 14: Instant Messaging
Old Dominion University Department of Computer Science CS 495/595 Fall 2004 Michael L. Nelson 11/30/04

2 People 2 People For most people, computers are for communication, not computing “Killer applications” Communications: asynchronous, 1-1, 1-many web pages (esp. blogs) synchronous, 1-1, 1-many instant messaging (IM) others: the most successful games have synchronous, person-2-person play many file sharing P2P applications assume the existence of a communications medium for resource discovery

3 Early IM Tools Unix “talk” Internet Relay Chat Zephyr
Internet Relay Chat Zephyr

4 Proprietary IM Protocols
Oscar/AIM YMSG MSN Instant Messenger Protocol ICQ (now owned by AOL)

5 Centralized IM Alice Bob MSN, Yahoo(?) “Bob is online”
“Alice is online” “Where is everyone going to lunch today?” “We’re headed to Rajput” Alice Bob MSN, Yahoo(?)

6 P2P IM Alice Bob ICQ “Bob is online” “Alice is online”
“Where is everyone going to lunch today?” “We’re headed to Rajput” Alice Bob ICQ

7 Hybrid IM Alice Bob AOL AIM, Yahoo? “Bob is online” “Alice is online”
“Where is everyone going to lunch today?” “We’re headed to Rajput, here is a scan of their menu” Alice Bob AOL AIM, Yahoo?

8 IM Lock-in AIM, YMSG, MSN, etc. are an improvement over irc, talk, etc. in that they: remove location dependency from identity pass the P2P litmus test: variable connectivity & temp IP addresses autonomy for nodes at edges of the network But they are all proprietary: limited to the supported client locked in to the provider that supports the protocol you and your brother are on AOL, but you parents are on Yahoo! and your sister is on MSN its like having 3 separate clients & addresses to communicate with all of your friends & colleagues

9 Multi-Protocol Clients
Multi-protocol clients exist: Everybuddy Trillian Fire GAIM etc. But they require identities for each of the services

10 Supporting Multiple Protocols
DJ DJ DJ Recall DJ Precision

11 Jabber An open source / open protocol alternative Features:
Features: protocol is defined in XML cf. binary proprietary protocols! adopted by the IETF as the platform for the evolving Extensible Messaging and Presence Protocol (XMPP) separate clients and servers for installation gateways for legacy protocols (AIM, YMSG, etc.) as well as person-2-application conversations

12 Romeo & Juliet montague.net capulet.com Jabber Servers Jabber Clients
to: By a name I know not how to tell thee who I am: My name, dear saint, is hateful to myself, Because it is an enemy to thee; Had I it written, I would tear the word. to: What man art thou that thus bescreen'd in night So stumblest on my counsel? Jabber Clients JID = JID = DiCaprio & Danes images from

13 Jabber Clients A rich set of clients supported (many with built-in support for other IM protocols too) Jabber IDs (JIDs) they look like addresses, but they’re not but they’re similar in effect relative to hierarchical naming they make explicit what was hardwired in AIM, YMSG, etc e.g.

14 Use a public server… …or run your own

15 Jabber URIs jabber://user@server/resource
resources generally used as connection ids resource addresses are hidden from users; only used by software/protocol “data”, as shown on p. 85, is not part of the Jabber IETF draft

16 XML Messages from: <message type="chat"> <subject>Plotting</subject> <body>Here, sweet lord, at your service.</body> <thread>100052</thread> </message> from: ch. 6, p. 84 <message <body>Angels and Ministers of Grace, Defend us!</body> <prayer xmlns=“ <verse> … </verse> </prayer> </message> XML messages bundled through the use of <stream> tags (see section 5.2 of the Jabber draft; also section 10 for examples)

17 Extensibility Through Namespaces
Client request for registration information to a server service (service.denmark): <iq type="get" id="1001" to="service.denmark"> <query xmlns="jabber:iq:register"/> </iq> Server response with registration fields required: <iq type="result" from="service.denmark" id="1001"> <query xmlns="jabber:iq:register"> <instructions>Choose a username and password to register with this server.</instructions> <name/> < /> <password/> <key>106c0a7b5510f192a408a1d054150ed1065e255a</key> </query> </iq> from:

18 Extensibility Through Namespaces
Client request to register for an account: <iq type="set" to="service.denmark" id="1002"> <query xmlns="jabber:iq:register"> <name>hamlet</name> <password>gertrude</password> <key>106c0a7b5510f192a408a1d054150ed1065e255a</key> </query> </iq> Successful registration: <iq type="result" from="service.denmark" id="1002"/> Failed registration: <iq type="error" from="service.denmark" id="1002"/> <error code="406">Not Acceptable</error> </iq> from:

19 Presence <presence from="hamlet@denmark">
<show>xa</show> <status>Gone to England</status> </presence> from:

20 Roster Client request for current roster:
<iq type="get" id="1001"> <query xmlns="jabber:iq:roster"/> </iq> Server response to client query: <iq type="result" id="1001"> <query xmlns="jabber:iq:roster"> <item name="Uncle Claudius" subscription="from"> <group>Family</group> </item> <item name="Horatio" subscription="both"> <group>Friends</group> <item name="Prince Fortinbras" subscription="none" ask="subscribe"/> </query> </iq> from:

21 People 2 Applications Using XML namespaces inside the <iq> element, we can create “conversations” with applications as well as people. Some hypothetical examples: “What was the result of November 18th 1995 Virginia Tech football game?” “What is the 5 day forecast for zip code 23508?” <iq type="get" id="1001"> <query xmlns="jabber:iq:hokiesports.com"> <gameresult> <date> </date> <sport>football</sport> <result type=“boxscore”/> </gameresult> </query> </iq> <iq type="get" id="1001"> <query xmlns="jabber:iq:weather.com"> <forecast days=“5” zipcode=“23508”/> </query> </iq>

22 XMPP Extensible Messaging and Presence Protocol (XMPP)
( soon) defined in 4 drafts: core protocol defines streams, stanzas, authentication & security, internationalization issues extensions for IM & presence further definition & use cases particular to IM end-to-end object encryption mapping XMPP to the Common Presence and Instant Messaging Protocol (CPIM)

23 Streams and Stanzas | | | <stream> | | <presence> | | <show/> | | </presence> | | <message to='foo'> | | <body/> | | </message> | | <iq to='bar'> | | <query/> | | </iq> | | | | </stream> | stream: a container for the exchange of XML elements between any 2 entities over a network stanza: a discrete semantic unit of structured information that is sent from one entity to another over an XML stream from:

24 Stream Examples A basic "session": C: <?xml version='1.0'?> <stream:stream to='example.com' xmlns='jabber:client' xmlns:stream=' version='1.0'> S: <?xml version='1.0'?> from='example.com' id='someid' ... encryption, authentication, and resource binding ... C: <message xml:lang='en'> C: <body>Art thou not Romeo, and a Montague?</body> C: </message> S: <message S: <body>Neither, fair saint, if either thee dislike.</body> S: </message> C: </stream:stream> S: </stream:stream> A "session" gone bad: C: <?xml version='1.0'?> <stream:stream to='example.com' xmlns='jabber:client' xmlns:stream=' version='1.0'> S: <?xml version='1.0'?> from='example.com' id='someid' ... encryption, authentication, and resource binding ... C: <message xml:lang='en'> <body>Bad XML, no closing body tag! </message> S: <stream:error> <xml-not-well-formed xmlns='urn:ietf:params:xml:ns:xmpp-streams'/> </stream:error> S: </stream:stream> from section 4.7:

25 Security in XMPP XMPP Server XMPP Server XMPP Client
TLS XMPP Server XMPP Server SASL TLS SASL TLS = Transport Layer Security, RFC 2246 SASL = Simple Authentication and Security Layer, RFC 2222 XMPP Client

26 Additions in XMPP The core is very similar to the original Jabber protocol; some notable additions: use of the “xml:lang” attribute to specify language type: definition of a “jabber:iq:privacy” namespace to maintain privacy lists, block communication based on JID, group, subscription type, etc.


Download ppt "Peer-to-Peer Information Systems Week 14: Instant Messaging"

Similar presentations


Ads by Google