User Interface; Graphical User Interface;Jabber XMPP-Core - PowerPoint PPT Presentation

About This Presentation
Title:

User Interface; Graphical User Interface;Jabber XMPP-Core

Description:

Graphical User Interface;Jabber XMPP-Core. Communicating between two presence-aware entities ... xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org ... – PowerPoint PPT presentation

Number of Views:71
Avg rating:3.0/5.0
Slides: 18
Provided by: csgCsa
Learn more at: http://csg.csail.mit.edu
Category:

less

Transcript and Presenter's Notes

Title: User Interface; Graphical User Interface;Jabber XMPP-Core


1
User Interface Graphical User InterfaceJabber
XMPP-Core
2
Communicating between two presence-aware entities
  • XML Stream
  • Starts with ltstreamgt
  • Ends with lt/streamgt
  • Stream is unidirectional but two streams
    allowed over one TCP connection
  • initial stream and response stream
  • XML Stanza
  • the stuff (packets) of the stream
  • presence, message, iq are the only upper-level
    types

3
A basic session
C lt?xml version'1.0'?gt ltstreamstream
to'example.com' xmlns'jabberclient'
xmlnsstream'http//etherx.jabber.org/streams'
version'1.0'gt S lt?xml version'1.0'?gt
ltstreamstream from'example.com'
id'someid' xmlns'jabberclient'
xmlnsstream'http//etherx.jabber.org/streams'
version'1.0'gt ... encryption,
authentication, and resource binding ... C
ltmessage from'juliet_at_example.com'
to'romeo_at_example.net'
xmllang'en'gt C ltbodygtArt thou not Romeo,
and a Montague?lt/bodygt C lt/messagegt S
ltmessage from'romeo_at_example.net'
to'juliet_at_example.com'
xmllang'en'gt S ltbodygtNeither, fair saint,
if either thee dislike.lt/bodygt S lt/messagegt C
lt/streamstreamgt S lt/streamstreamgt
4
A session gone bad
C lt?xml version'1.0'?gt ltstreamstream
to'example.com' xmlns'jabberclient'
xmlnsstream'http//etherx.jabber.org/streams'
version'1.0'gt S lt?xml version'1.0'?gt
ltstreamstream from'example.com'
id'someid' xmlns'jabberclient'
xmlnsstream'http//etherx.jabber.org/streams'
version'1.0'gt ... encryption,
authentication, and resource binding ... C
ltmessage xmllang'en'gt ltbodygtBad XML, no
closing body tag! lt/messagegt S
ltstreamerrorgt ltxml-not-well-formed
xmlns'urnietfparamsxmlnsxmpp-streams'/gt
lt/streamerrorgt S lt/streamstreamgt
5
Motivating GUI via IM
6
Email, Instant messages, chat
  • Email send message based on name
  • must know name, but can guess it.
  • IM can only send message to buddy
  • can have both sides agree to be buddies.
  • Chat can only send message to room
  • must connect to room to get messages

Asynchronous like computation
Semi-synchronous like interactive
Semi-synchronous like parallelism
7
Big Idea Abstraction
  • Any problem in computer programming can be
    solved by adding a level of abstraction
  • Performance can be improved in programs by
    removing a level of abstraction
  • Indirection used to support abstraction

8
Big Idea for IM Indirection
  • Publish and subscribe
  • Publish presence with a server
  • Subscribe to relevant published entities
  • Once when registering and whenever logon
  • Interact
  • direct communication
  • (mediated) indirect communication

9
Hard vs Soft State
  • Hard State server knows buddy list
  • can send status of each buddy to requester
  • Soft State client knows buddy list
  • can ask status of each buddy
  • But indirection always requires hard state

10
Instant Messaging
  • Clients register with server
  • When client logs on, others subscribe
  • Client sends message to server, server forwards
    to recipient
  • can only send messages to registered/published
    recipients
  • Supported operations
  • Register, Unregister, Logon, Logoff, Send/Rec,
    Add/Remove Buddy, etc.

11
Many disconnected pieces
  • Client-Server protocol (messier than just this)
  • Client code
  • User Interface Code
  • Semantics of interaction
  • e.g. send only to published subscribed entities

12
(No Transcript)
13
User Interface
  • Want to disconnect application from user
    interface
  • Application should work independent of UI
  • Character display and keyboard or fancier
  • main difference was number of columns and lines
  • Graphical user interface
  • make big assumptions about h/w abilities
  • not really independent of GUI

14
Evolution
15
Separating events from handlers
  • Register handler for event
  • Two different types of events
  • within application
  • within window system.
  • Events connect the two pieces but are developed
    separately.

16
Separation of GUI description
  • Glade

17
No semantic content
  • why bad?
  • no error correction
Write a Comment
User Comments (0)
About PowerShow.com