Access to This Tutorial. What is XMPP. Ozgur Ozturk's Introduction to XMPP 1



Similar documents
Messaging with Erlang and Jabber

XMPP: Extensible Messaging and Presence Protocol

Beautiful XMPP Testing

Instant Messaging Service Reference

IceWarp Server. IM Server Reference. Version 10

A Web Services Framework for Collaboration and Audio/Videoconferencing

Hosting and Discovery of Distributed Mobile Services in an XMPP Cloud

TeChat: A Handwritten Chat/Instant Message System. Writeup. Peter Na - naph@seas.upenn.edu. Faculty Advisor: Professor Zachary Ives

Integrated Instant Messaging System

Web-based Instant Messaging

Lync 2010 for Windows Phone

RCS - Overview. Rich Communication Suite

Sametime 101: Feature Overview. Roberto Chiabra IBM Certified IT Specialist

SIP : Session Initiation Protocol

Maxis BizVoice For iphone User Guide. Version 1.0

Chapter 10 Session Initiation Protocol. Prof. Yuh-Shyan Chen Department of Computer Science and Information Engineering National Taipei University

XEP-0060: Publish-Subscribe

Instant Messaging Compliance for IM and Presence Service on Cisco Unified Communications Manager, Release 10.5(1)

Session Initiation Protocol and Services

White paper. SIP An introduction


Application Notes for BT Wholesale/HIPCOM SIP Trunk Service and Avaya IP Office 8.0 Issue 1.0

UC-One. Epik. UC-One Quick Guide. Quick Guide For Apps. Why we love UC-One

An open standard for instant messaging: extensible Messaging and Presence Protocol (XMPP)

Skype characteristics

Multi-User Jingle. Sjoerd Simons LCA Collabora Ltd, sponsored by NlNet

Sample Configuration for SIP Trunking between Avaya IP Office R8.0 and Cisco Unified Communications Manager Issue 1.0

WHAT S BEHIND YOUR SMARTPHONE ICONS? A brief tour of behind-the-scenes signaling for multimedia services

SIP Trunking Quick Reference Document

EE4607 Session Initiation Protocol

Rich Communication Suite Enabler. plus integration with your existing VoIP services

Giorgio Badaini. Jabber overview [1]

Configuration Guide for connecting the Eircom Advantage 4800/1500/1200 PBXs to the Eircom SIP Voice platform.

NCAS National Caller ID Authentication System

Magnet Voice Windows PC Softphone Installation

SHORT DESCRIPTION OF THE PROJECT...3 INTRODUCTION...4 MOTIVATION...4 Session Initiation Protocol (SIP)...5 Java Media Framework (JMF)...

Configuring the Synapse SB67070 SIP Gateway from AT&T for Clearfly SIP Trunking. January 2013

VoIP Application Development using SIP protocol

Getting Started Guide. November 25, 2013

Voice & Video. Conference Calls 4/43

IMS Social Network Application with J2ME compatible Push-To-Talk Service

Sharp.Xmpp, a multiplatform.net XMPP client library, and Android

By Kundan Singh Oct Communication

IP Office Technical Tip

TSIN02 - Internetworking

Application Notes for Avaya IP Office 7.0 Integration with Skype Connect R2.0 Issue 1.0

3rd Party VoIP Phone Setup Guide (Panasonic b)

Nokia E65 Internet calls

3rd Party VoIP Phone Setup Guide (Panasonic UT )

SETTING UP AN INSTANT MESSAGING SERVER

NAT TCP SIP ALG Support

NETWORKS AND THE INTERNET

SOA, case Google. Faculty of technology management Information Technology Service Oriented Communications CT30A8901.

PCBest Networks VOIP Recorder

XMPP Instant Messaging and Active Directory

VoIP. Overview. Jakob Aleksander Libak Introduction Pros and cons Protocols Services Conclusion

Wave 4.5. Wave ViewPoint Mobile 2.0. User Guide

Your Blueprint websites Content Management System (CMS).

internet technologies and standards

Whitepaper: Microsoft Office Communications Server 2007 R2 and Cisco Unified Communications Manager Integration Options

FRAFOS GmbH Windscheidstr. 18 Ahoi Berlin Germany

To ensure you successfully install Timico VoIP for Business you must follow the steps in sequence:

VIDEOCONFERENCING. Video class

DCO (Defense Connect Online)

Instant Messaging: Architectures and Concepts

EMC Documentum Composer

How to select the right Marketing Cloud Edition

Table Example 1-basic settings in Vigor 3300V and 2900V. WAN IP Port Number Phone Number Proxy Codec

1 Introduction: Network Applications

An Introduction to VoIP Protocols

Mediatrix 3000 with Asterisk June 22, 2011

FOR COMPANIES THAT WANT TO EXPAND AND IMPROVE THEIR TELEPHONE SYSTEM

SIP Trunking using Optimum Business SIP Trunk Adaptor and the Panasonic KX-NCP500 IP PBX V2.0502

FRAFOS GmbH Windscheidstr. 18 Ahoi Berlin Germany

Design Document. Offline Charging Server (Offline CS ) Version i -

UC Office for Smart Phone - iphone Edition

IM: How Instant Messaging Systems Work

Snow Agent System Pilot Deployment version

Guidance Regarding Skype and Other P2P VoIP Solutions

Getting Started Guide

DLink-655 Router Configuration Guide for VoIP

Mediatrix 4404 Step by Step Configuration Guide June 22, 2011

What's New in Sametime 8.5. Roberto Chiabra IBM Certified IT Specialist

IP PBX SH-500N

Product Presentation. BBSC A new generation of broadband e-collaboration services

SIP, Session Initiation Protocol used in VoIP

PROTOTYPE IMPLEMENTATION OF A DEMAND DRIVEN NETWORK MONITORING ARCHITECTURE

webrtc and XMPP Philipp Hancke, XMPP Summit 2013

Jive Connects for Openfire

Deployment Guide July-2014 rev. a. Deploying Array Networks APV Series Application Delivery Controllers for Microsoft Lync Server 2013

Welcome to XO WorkTime

Lync for Mac Get Help Guide

ALERT & Cisco CallManager

Transcription:

XMPP Protocol and Application Development using Open Source XMPP Software and Libraries Ozgur Ozturk ozturk@gatech.edu Georgia Institute of Technology, Atlanta, GA Acknowledgement: This tutorial is based on the book XMPP: The Definitive Guide, Building Real-Time Applications with Jabber Technologies with permission from Peter Saint-Andre. 1 Access to This Tutorial Latest version of slides available on http://drozturk.com/talks Also useful for clicking on links 2 Software that you will need to repeat exercises with me Start downloads now In the break you will have time to install Visual C# 2008 Express Edition http://www.microsoft.com/express/downloads/ Eclipse IDE for Java Developers (92 MB) http://www.eclipse.org/downloads/ Openfire& Spark Code: http://www.igniterealtime.org/downloads/source.jsp TortoiseSVN recommended for subversion check out http://tortoisesvn.net/downloads JabberNet code: http://code.google.com/p/jabber-net/ 3 What is XMPP Samples from its Usage Part 1 Introduction to XMPP Extensible Messaging and Presence Protocol open, XML-based protocol aimed at near-real-time, extensible instant messaging (IM), and presence information. Extended with features such as Voice over IP and file transfer signaling and even expanded into the broader realm of message-oriented middleware IM and Social Networking platforms GTalk, and Facebook Collaborative services Google Wave, and Gradient; Geo-presence systems Nokia Ovi Contacts Multiplayer games Chesspark Many online live customer support and technical support services. 4 5 6 Ozgur Ozturk's Introduction to XMPP 1

Overview of Tutorial Introduction to XMPP IM and Presence requirements, XML Refresher XMPP Extension Protocols (XEPs) Hands on exercises/demonstrations of using some Open Source XMPP Libraries, Clients and Servers Architecture options & extending XMPP Talk slides, code and links will be available on http://drozturk.com/talks SIMPLE (contender to XMPP) SIMPLE: SIP for Instant Messaging and Presence Leveraging Extensions SIP: Session Initiation Protocol, established signaling protocol for VOIP and IPTV Advantages of XMPP Open XML standard formalized by IETF Extensible for new service or information types Implementations with modular/pluggable APIs Continuously extended through the standards process of the XMPP Standards Foundation XMPP servers (via federation) form a decentralized network similar to e-mail anyone (with a domain) can run an XMPP server 7 8 9 Some XMPP Terminology JabberID(JID): address of XMPP entities JIDsfor users look like email addresses, composed of username, @ sign and the domain Bare JID + Resource Identifier = Full JID: e.g., ozgur7@gmail.com/web-9z2 Routing traffic to one connection of user, web-client rather than mobile or desktop client (which may be simultaneously connected) 10 Three Types of XMPP Stanzas Stanza: Basic unit of communication in XMPP Libraries abstract away from the XML layer However to extend XMPP we need to know basics Three types of Stanzas: Message method for getting info from one place to another Presence availability and status messages of entities iq(info/query) request-response interactions and simple workflows 11 XML Basics <?xml version="1.0" encoding="iso-8859-1"?> <CATALOG> <CD> <TITLE>Unchain my heart</title> <ARTIST NAME="Joe Cocker" /> <COUNTRY>USA</COUNTRY> <COMPANY>EMI</COMPANY> <PRICE>8.20</PRICE> <YEAR>1987</YEAR> </CD> <! Add more CD Albums here --> </CATALOG> Special Syntax for empty elements, where closing tag would come immediately after opening tag Terminology Entity, Tag Schema DTD, XSD Well-formed Valid Attribute Not recommended for data. Prefer to use element: <ARTIST> <NAME> Joe Crocker </NAME> </ARTIST> Recommended for metadata 12 Ozgur Ozturk's Introduction to XMPP 2

Sample XML Standard: POSLog Namespaces needed for combining multiple existing vocabularies, to prevent conflict of names. Namespaces are not applied to attributes, unless you specify them explicitly. XML Namespaces Not a URL, just a namespace! Same Local Name, Different Qualified Names <bk:bookstore xmlns:bk="urn:xmlns:dozturk.com:books"> <bk:bookbk:title="lord of the Rings, Book 3"> <book for= Ozgur Ozturk /> </bk:book> </bk:bookstore> These two are from two vocabularies. One of the <book> tags means reserving. 13 14 15 1: Message Stanza 2: Presence Messages 2: Presence Stanza The push method for getting information from one place to another <message from="ozgur7@gmail.com/wz2" to="stpeter@jabber.org" type="chat"> <body>how are you?</body> <subject>query</subject> </message> from address not provided by sending client, stamped by the sender s server to avoid address spoofing 16 Advertises the network availability and status messages of entities A specialized publish-subscribe method; people who requested subscription to your presence and authorized by you receive updated presence information when you come online, and go offline, and change your status 17 <presence from="ozgur7@gmail.com/android-z2"> <show>do not disturb</show> <status>in a meeting</status> </presence> 18 Ozgur Ozturk's Introduction to XMPP 3

3: IQ (Info/Query) Messages Structure for request-response interactions and simple workflows. Requests and responses are tracked using the id attribute type attribute included in the exchanged iq stanzas helps in establishing a structured IQ interaction between two entities Next example: IM client software gets my roster from its server and then updates it 1/4: Requesting Roster <iq from="ozgur7@gmail.com/wz2" id="rr82a1z7" to="ozgur7@gmail.com" type="get"> <query xmlns="jabber:iq:roster"/> </iq> 2/4: Server Returning Roster <iq from="ozgur7@gmail.com" id="rr82a1z7" to="ozgur7@gmail.com/wz2" type="result"> <query xmlns="jabber:iq:roster"> <item jid="frnd1@gmail.com"/> <item jid="spouse@facebook.com"/> </query> </iq> 19 20 21 3/4: Client adds a new contact. <iq from="ozgur7@gmail.com/wz2" id="ru761vd7" to="ozgur7@gmail.com" type="set"> <query xmlns="jabber:iq:roster"> <item jid="stpeter@jabber.org"/> </query> </iq> New transaction, new id. 4/4:Server s Acknowledgement <iq from="ozgur7@gmail.com" id="ru761vd7" to="ozgur7@gmail.com/wz2" type="result /> Same id with request. Each request needs a reply. Even if it is empty 15 Minute Break Now is the time to install your software When we are back we will code, yay! 22 23 24 Ozgur Ozturk's Introduction to XMPP 4

Download Link for.net XMPP library Download and install Jabber-Net Part 2 Coding a Basic Client Without re-implementing the wheel: Using Jabber-Net.Net Library XMPP Library for.net (written in C#) http://code.google.com/p/jabber-net/ I recommend to install from source code So you can trace into the library code upon errors I will show how to add components to toolbar manually 25 26 27 MyFirstClient project Visual Studio Toolbox with Jabber-Net 28 29 30 Ozgur Ozturk's Introduction to XMPP 5

Simplest Client App Five lines of code Voila! Our Weather Bot is Working Double Click Automatically added events and function templates: Just fill in the action: 31 32 33 Part 3 XMPP Extension Protocols (XEPs) Extensibility and Available XEPs XMPP is an XML based, extensible protocol XMPP Standards Foundation (XSF) standardizes extensions to XMPP through a process centered around XMPP Extension Protocols (XEPs) http://xmpp.org/extensions/ Data Forms XEP Specifies how a server sends the information necessary for a client to render a form Defines several common field types boolean, list options with single or multiple choice, text with single line or multiple lines, hidden fields, & extensibility for future data types Related extension: CAPTCHA Forms XEP 34 35 36 Ozgur Ozturk's Introduction to XMPP 6

In-Band Registration XEP For in-band registration, password change or cancellation of an existing registration Extensible via use of data forms enables services to gather a wide range of information during the registration process Multi-User Chat XEP To enable multiple XMPP users to exchange messages in the context of a room or channel similar to Internet Relay Chat (IRC). Standard chat-room features such as room topics and invitations A strong room control model, adds ability to: kick and ban users name room moderators and administrators require membership or passwords to join the room Publish-Subscribe XEP & Personal EventingProtocol (PEP) XEP Presents a more generalized form of the publish/subscribe model than presence communicating rich presence such as moods exchanging lifestreaming data, such as microblogs also applied to storing personal data Bookmarks, client preferences Further extensions of PEP User Tune, User Location, and User Activity XEPs 37 38 39 Multimedia Networking Extensions: Jingle XEP XMPP as the signaling channel to negotiate, manage & terminate media sessions voice/video chat, file transfer, screen sharing negotemedia codecs, bitrates and other parameters related to the voice format to be used, deciding whether TCP or UDP will be used what IP addresses and ports will be used, etc Media data itself is sent either p2p or through a media relay. Part 4 Compiling and Customizing OpenfireXMPP Server and Spark Chat Client Download Links for Client and Server with Pluggable API OpenFire: XMPP server Spark: XMPP client Both are open source Java implementation, with multi-platform support Openfire& Spark Code: http://www.igniterealtime.org/downloads/source.jsp TortoiseSVN recommended for subversion check out http://tortoisesvn.net/downloads 40 41 42 Ozgur Ozturk's Introduction to XMPP 7