Chapter 21. Cloud Pub/Sub: managed event publishing

 

This chapter covers

  • Distributed messaging systems in general
  • When and how to use Cloud Pub/Sub in your application
  • How Google calculates Cloud Pub/Sub pricing
  • Two examples using common messaging patterns

If you’ve ever sent an SMS or Facebook message, the concept of messaging should feel familiar and simple. That said, in your day-to-day use of messaging, you have a few requirements that you sometimes take for granted. For example, you expect that messages are

  • sent from one specific person (you)
  • sent to exactly one specific person (your friend)
  • sent and received exactly once (no more, no less)

Just like people, machines often need to communicate with one another, particularly in any sort of large distributed application. As you might expect, machine-to-machine communication tends to have requirements similar to the ones you have.

21.1. The headache of messaging

Meeting these requirements isn’t as easy as it looks. Beyond that, you might broadcast messages to a group, which has slightly different requirements (for example, messages should be received exactly once by each member of the group). And this communication might be synchronous (like calling someone on the phone) or asynchronous (like leaving a voice mail), each with its own requirements. Messaging might seem simple, but it’s pretty tricky.

21.2. What is Cloud Pub/Sub?

21.3. Life of a message

21.4. Concepts

21.5. Trying it out

21.6. Push subscriptions

21.7. Understanding pricing

21.8. Messaging patterns

Summary

sitemap