Practical XMPP
eBook - ePub

Practical XMPP

Lloyd Watkin, David Koelle

Share book
  1. 248 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Practical XMPP

Lloyd Watkin, David Koelle

Book details
Book preview
Table of contents
Citations

About This Book

Unleash the power of XMPP in order to build exciting, real-time, federated applications based on open standards in a secure and highly scalable fashion

About This Book

  • Learn about the fundamentals of XMPP and be able to work with the core functionality both server-side and in the browser
  • Build a simple 1-to-1 chat (the "Hello World" of XMPP), explore multi-user chat, publish subscribe systems, and work with a decentralized social network
  • Author Lloyd Watkins is a member of the XMPP standards committee

Who This Book Is For

If you want to learn about the fundamentals of XMPP, be able to work with the core functionality both server-side and in the browser then this book is for you.No knowledge of XMPP is required, or of TCP/IP networking. It's important that you already know how to build applications of some form, and are looking get a better understanding of how to implement XMPP for one or more of its many uses. You should be interested in the decentralized web, know HTML, and likely know JavaScript and NodeJS. You will probably know JSON, and hopefully XML (this is the native output of XMPP).

What You Will Learn

  • Install and configure an XMPP server and use it to connect from a traditional desktop client and send a message
  • Build a simple server-side application that will respond to messages from our logged in desktop client
  • Install and run XMPP-FTW, connect to the server from the browser, and handle incoming/outgoing messages
  • Connect to a multi-user chat room, send/receive stanzas, add a room password, join a protected room, set the room's subject, and change a user's affiliation
  • Get to grips with the publish-subscribe extension of XMPP and use it to build a pusher system that can make any website real-time
  • Build a simple XMPP component and create an extension for XMPP-FTW that allows you to use your own custom format
  • Build an XMPP version of the classic game "Pong"

In Detail

XMPP (eXtensible Messaging and Presence Protocol) is a messaging protocol that enables communication between two or more devices via the Internet.

With this book, developers will learn about the fundamentals of XMPP, be able to work with the core functionality both server-side and in the browser, as well as starting to explore several of the protocol extensions. You will not only have a solid grasp of XMPP and how it works, but will also be able to use the protocol to build real-world applications that utilize the power of XMPP. By the end of this book, you will know more about networking applications in general, and have a good understanding of how to extend XMPP, as well as using it in sample applications.

Style and approach

Through a number of hands-on projects, this book shows you how to build usable applications that highlights a feature of XMPP.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on ā€œCancel Subscriptionā€ - itā€™s as simple as that. After you cancel, your membership will stay active for the remainder of the time youā€™ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlegoā€™s features. The only differences are the price and subscription period: With the annual plan youā€™ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, weā€™ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Practical XMPP an online PDF/ePUB?
Yes, you can access Practical XMPP by Lloyd Watkin, David Koelle in PDF and/or ePUB format, as well as other popular books in Informatik & Computernetzwerke. We have over one million books available in our catalogue for you to explore.

Information

Year
2016
ISBN
9781785287985
Edition
1

Practical XMPP


Practical XMPP

Copyright Ā© 2016 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author(s), nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: September 2016
Production reference: 1280916
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78528-798-5
www.packtpub.com

Credits

Authors
Lloyd Watkin
David Koelle
Copy Editors
Vikrant Phadke
Safis Editing
Reviewers
Emilien Kenler
Ian Wild
Project Coordinator
Nidhi Joshi
Commissioning Editor
Edward Gordon
Proofreader
Safis Editing
Acquisition Editor
Reshma Raman
Indexer
Aishwarya Gangawane
Content Development Editor
Mayur Pawanikar
Production Coordinator
Arvindkumar Gupta
Technical Editor
Karan Thakkar

About the Authors

Lloyd Watkin has over 10 years of experience in building for the Web. A great believer in open source and open standards, he has contributed to, started, and led many successful open source projects and is also an international conference speaker.
Lloyd was knowingly introduced to XMPP in 2012 and hasn't looked back. Its open standard base and the ability to code clients, servers, components in any language leads to a very diverse and healthy environment. Its relevance only seems to increase as new technologies (not imagined at the time of creation) come into existence.
I would like to thank my family and friends for their support and damaged ear drums. I would also like to thank the XSF and the XMPP community as a whole for being supportive, welcoming, and always striving to improve and extend the XMPP ecosystem.
David Koelle is a principal software engineer at Charles River Analytics Inc. in Cambridge, Massachusetts, USA, where he has employed XMPP on projects to facilitate collaboration and shared situational awareness among distant teams. He is also the author of JFugue, a popular open source music programming API for Java and other JVM languages, and he is a co-organizer for the Boston Android Meetup.
David has delivered several award-winning talks at high-profile conferences including JavaOne and SXSW. In addition to his technical work in software engineering and systems engineering, he finds opportunities to mentor engineers to help them grow in their careers and recognize the value that proactive leadership can bring to engineers and their environments. David is a graduate of Worcester Polytechnic Institute (WPI).

About the Reviewers

Emilien Kenler, after working on small web projects, began focusing on game development in 2008 while he was in high school. Until 2011, he worked for different groups and specialized in system administration.
In 2011, he founded a company that sold Minecraft servers while studying Computer Science Engineering. He created a lightweight IaaS (https://github.com/HostYourCreeper/) based on new technologies such as Node.js and RabbitMQ.
Thereafter, he worked at TaDaweb as a system administrator, building its infrastructure and creating tools to manage deployments and monitoring.
In 2014, he began a new adventure at Wizcorp, Tokyo. The same year, Emilien graduated from the University of Technology of CompiĆØgne, France.
Since 2016, heā€™s a systems engineer at Vesper, the company behind TableSolution, a leading restaurant reservation and CRM system.
Emilien has written MariaDB Essentials, Packt Publishing. He has also contributed as a reviewer on Learning Nagios 4, MariaDB High Performance, OpenVZ Essentials, Vagrant Virtual Development Environment Cookbook, Getting Started with MariaDB Second Edition and Mastering Redis, all by Packt Publishing.
Ian Wild's career has always focused primarily on communication and learning. Ian, a physicist by profession, spent 15 years in private industry designing communication systems software (Lucent Technologies, Avaya) before specializing in the development and deployment of learning management systems. Ian has a particular interest in the integration of legacy systems. He is currently the lead developer for Skills for Health, the sector skills council for the UK's health sector. He is responsible for one of the country's busiest online learning platforms (the National Skills Academy for Health).

www.PacktPub.com

eBooks, discount offers, and more

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
eBooks, discount offers, and more
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.

Why subscribe?

  • Fully searchable across every book published by Packt
  • Copy and paste, print, and bookmark content
  • On demand and accessible via a web browser

Preface

XMPP has been around since 1999, and in that time has been rediscovered several times over by generation after generation of programmers. Originally started to unify what was a massively fragmented instant messaging scene, XMPP has continued to show its relevance as new technologies and technology uses emerge.
We'll be making use of the Prosody XMPP server, a fast, resource light system written in LUA, as well as Node.js to write our own projects. The two main libraries we'll be using to interact with XMPP are node-xmpp on the server side and XMPP-FTW, a translation layer between XMPPā€™s XML messages and JSON, which is massively popular for use in the browser.
Through this book, you'll learn about the core concepts of XMPP, build basic clients that will allow you to interact with the XMPP ecosystem at large, build time-saving bots, and even build an entire custom application using XMPP standards and your own extensions.
The skills you'll learn in this book will allow you to create the next massively popular chat application built on the core standards, through to your own full-fledged Internet of Things (IoT) device that will collect, share, and respond to data from interconnected servers all over the world!

What this book covers

Chapter 1, An Introduction to XMPP and Installing Our First Server. Provides a brief introduction to the history of XMPP and its uses as well as installing and interacting with our first XMPP server.
Chapter 2, Diving into the Core XMPP Concepts, reveals that XMPP covers a vast number of areas but at its core is very simple and extensible. Here we learn about the core concepts so when we come to building our XMPP applications later we understand what's going on.
Chapter 3, Building a One-on-One Chat Bot - The "Hello World" of XMPP, show us how to build a simple chat bot and interact with it via a standard client.
Chapter 4, Talking XMPP in the Browser Using XMPP-FTW, we introduce XMPP-FTW and shows us how to build some basic functionality.
Chapter 5, Building a Multi-User Chat Application, how to create a very basic multi user chat client in the browser and begin chatting with our XMPP users.
Chapter 6, Make Your Static Website Real-Time, takes a standard static website and add real time data to it pushed via XMPP, making even the dullest website dynamic and exciting!
Chapter 7, Creating an XMPP Component, shows how to create our first server-side component, which let you develop business logic without modifying the server itself.
Chapter 8, Building a Basic XMPP-Based P...

Table of contents