Skip to Content
Learning Dapr
book

Learning Dapr

by Haishi Bai, Yaron Schneider
August 2020
Intermediate to advanced
216 pages
5h 50m
English
O'Reilly Media, Inc.
Content preview from Learning Dapr

Chapter 3. Messaging

In a microservices architecture, services in an application are supposed to be isolated from each other so that they can be developed, hosted, upgraded, and scaled independently. Messaging is an important technique to enable flexible communication patterns among these loosely coupled services. As a distributed runtime, Dapr provides built-in messaging support for developers to design event-driven microservices applications.

Event-Driven Programming

Our world is filled with events—indeed, anything that happens can be considered an event. Collision of stars, eruption of a volcano, turn of a page, blink of an eye; these are all events, with different levels of significance associated with them. Some events, such as a blink, rarely cause any significant reactions. Others, such as natural disasters, most certainly do.

Event-driven programming models how events trigger reactions. It has become the pervasive programming model for GUI programs because it presents a natural way to model human–machine interactions—someone clicks a button, and something happens.

Event-driven programming also works well in systems that comprise loosely coupled components. A component notifies other components that something has happened by raising an event, and the event can be picked up by one or more interested listeners and trigger additional actions.

This chapter and the next introduce how Dapr supports event-driven programming using triggers, bindings, and pub/sub.

Messages Versus ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Learning Go

Learning Go

Jon Bodner
Learning Ray

Learning Ray

Max Pumperla, Edward Oakes, Richard Liaw
Learning React, 2nd Edition

Learning React, 2nd Edition

Alex Banks, Eve Porcello

Publisher Resources

ISBN: 9781492072416Errata Page