Mobile and Web Messaging

Book description

Learn how to use messaging technologies to build responsive and resilient applications for mobile devices and web browsers. With this hands-on guide, you’ll use the STOMP and MQTT messaging protocols to write iOS and web applications capable of sending and receiving GPS and device sensor data, text messages, and alerts.

Table of contents

  1. Preface
    1. What This Book is About
    2. What This Book is Not About
    3. Messaging is Simple
    4. Enterprise Messaging Is Not So Simple
    5. Mobile Messaging Is Simple Again
    6. What’s in This Book
    7. Target Audience
    8. Conventions Used in This Book
    9. Using Code Examples
    10. Safari® Books Online
    11. How to Contact Us
    12. Acknowledgments
  2. 1. Introduction
    1. Messaging Concepts
    2. Messaging Models
      1. Point-to-Point
      2. Publish/Subscribe
    3. Message Representation
    4. Examples
      1. Locations Application Using STOMP
      2. Motions Application Using MQTT
    5. Summary
  3. I. STOMP
  4. 2. Mobile Messaging with STOMP
    1. StompKit
    2. Create the Locations Project with Xcode
    3. Create the Podfile
    4. Identify the Device
    5. Display the Device Position
    6. Access the Device Geolocation Data with CoreLocation Framework
      1. Simulate a Location with iOS Simulator
    7. Create a STOMP Client with StompKit
    8. Connect to a STOMP Broker
    9. Disconnect from a STOMP Broker
    10. Send STOMP Messages
      1. Display StompKit Debug Log
      2. ActiveMQ Admin Console
      3. A Simple STOMP Consumer
    11. Display the Text Messages
    12. Receive STOMP Messages
      1. Subscribe to a STOMP Destination
    13. Unsubscribe from the Destination
    14. Finish the Application
    15. Summary
  5. 3. Web Messaging with STOMP
    1. HTML5 Web Sockets
    2. stomp.js, STOMP over Web Sockets
    3. Bootstrap the Locations Web Application
    4. Create a Stomp Client with stomp.js
    5. Connect to a STOMP Broker
    6. Receive STOMP Messages
      1. Subscribe to a Wildcard Destination
    7. Draw the Device Locations on a Map
    8. Send STOMP Messages
    9. Disconnect from the STOMP Broker
    10. Summary
  6. 4. Advanced STOMP
    1. Frame Representation
      1. Headers
    2. Authentication
      1. StompKit Example
      2. stomp.js Example
    3. Message Acknowledgment
      1. StompKit Example
      2. stomp.js Example
    4. Transactions
      1. StompKit Example
      2. stomp.js Example
    5. Error Handling
      1. StompKit Example
      2. stomp.js Example
    6. Receipts
      1. StompKit Example
      2. stomp.js Example
    7. Heart-Beating
      1. StompKit Example
      2. stomp.js Example
    8. Summary
  7. 5. Beyond STOMP
    1. Message Persistence
    2. Filtered Consumer
    3. Priority
    4. Expiration
    5. Summary
  8. II. MQTT
  9. 6. Mobile Messaging with MQTT
    1. MQTTKit
    2. Create the Motions Project with Xcode
    3. Create the Podfile
    4. Identify the Device
    5. Display the Device Motions Values
    6. Capture the Device Motions with CoreMotion Framework
    7. Create an MQTT Client with MQTTKit
    8. Connect to an MQTT Broker
    9. Disconnect from an MQTT Broker
    10. Send MQTT Messages
      1. Quality of Service
      2. Retained Message
    11. Receive MQTT Messages
      1. Subscription
      2. Unsubscribing
      3. Define an MQTTMessage Handler
    12. Summary
  10. 7. Web Messaging with MQTT
    1. Eclipse Paho JavaScript Client
    2. Bootstrap the Motions Web Application
    3. Create an MQTT Client with mqttws31.js
    4. Connect to the MQTT Broker
    5. Receive MQTT Messages
      1. Topic Wildcards
    6. Draw Sparklines
    7. Send MQTT Messages
      1. Summary
  11. 8. Advanced MQTT
    1. Authentication
      1. MQTTKit Example
      2. mqttws31.js Example
    2. Error Handling
      1. MQTTKit Example
      2. mqttws31.js Example
    3. Heart-Beating
      1. MQTTKit Example
      2. mqttws31.js Example
    4. Last Will
      1. MQTTKit Example
      2. mqttws31.js Example
    5. Clean Session
      1. MQTTKit Example
      2. mqttws31.js Example
    6. Beyond MQTT?
    7. Summary
  12. III. Appendixes
  13. A. Apache ActiveMQ
    1. Download and Installation
    2. Administration Web Console
  14. B. Mosquitto
    1. Download and Installation
    2. Produce Messages with mosquitto_pub
    3. Consume Messages with mosquitto_sub
  15. Index

Product information

  • Title: Mobile and Web Messaging
  • Author(s): Jeff Mesnil
  • Release date: August 2014
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781491944806