Dapr Community Call - May 29th 2024 (#104)

Dapr
29 May 202432:18

Summary

TLDRIn the Dapper Community call, Youron Schneider, one of Dapper's original founders, introduces the outbox pattern and payload projections in the upcoming 1.4 release. The outbox pattern allows single-transaction commits across databases and message brokers, crucial for system reliability. Schneider demonstrates the new feature enabling different payloads for database storage and message publishing, showcasing Dapper's language, cloud, and hosting agnosticism, and its ability to simplify complex distributed system challenges.

Takeaways

  • 😀 The Dapper Community Call is a platform for discussing updates and developments within Dapper as a product and community.
  • 🌟 The community call originally featured Ryan Winter discussing Azure IoT and Dapper pluggable components, but was replaced by a talk by Dapper's co-founder, Youron, on the outbox pattern and payload projections in Dapper 1.4.
  • 🔍 Youron Schneider is a core maintainer of the Dapper project and a stream commed member from Drid, focusing on open-source and serverless container platforms.
  • 📈 The outbox pattern, introduced in Dapper 1.1.2, allows committing a single transaction across a database and a message broker, solving the dual write problem in distributed systems.
  • 🔧 Dapper 1.4 introduces payload projections, enabling developers to decouple the state saved in the database from the payload published to downstream subscribers.
  • 🎯 The outbox pattern is highly requested by the community for its reliability and consistency in event-driven architectures.
  • 🛠️ Dapper abstracts the complexities of distributed systems, allowing developers to use different databases and message brokers interchangeably.
  • 📚 Youron mentioned writing a blog post to demystify the technical details of how Dapper implements the outbox pattern and payload projections.
  • 💻 A live demo was given, showcasing how to use Dapper's transaction API to save state in Redis and publish a different payload to Kafka with a single HTTP call.
  • 🔄 Dapper's resiliency features can be applied to both database operations and pub/sub messaging, enhancing the robustness of applications.
  • 📝 The Dapper community is encouraged to try out preview features, provide feedback, and contribute to the project through documentation, blog posts, and sample code.

Q & A

  • What is the purpose of the Dapper Community calls?

    -The purpose of the Dapper Community calls is to gather everyone together to discuss new and exciting developments within the Dapper product and community, including talks, presentations, and updates.

  • Who was originally scheduled to talk about Azure IoT and Dapper pluggable components, and what happened?

    -Ryan Winter was originally scheduled to talk about Azure IoT and Dapper pluggable components, but due to a series of unfortunate events, he could not make it, and Yaron Schneider stepped in to talk about the outbox pattern and payload projections.

  • What is Yaron Schneider's role in the Dapper project?

    -Yaron Schneider is one of the original founders of the Dapper project, a core maintainer on the DAP runtime, and a stream commed member from Drid, a company he founded after working at Microsoft.

  • What is the outbox pattern, and why is it difficult to implement?

    -The outbox pattern, also known as the transaction outbox pattern, is the ability to commit a single transaction across a database and a message broker. It is difficult to implement because it requires solving the dual-write problem in distributed systems, which involves coordinating the same data or payload being saved to two separate systems transactionally.

  • What is the dual-write problem in the context of the outbox pattern?

    -The dual-write problem refers to the challenge of needing to save the same data or payload to two separate systems, such as a database and a message broker, transactionally, which is difficult due to potential failures in the systems that can leave the data inconsistent.

  • What is the 'anticipator pattern' mentioned by Yaron Schneider?

    -The 'anticipator pattern' is a term used by Yaron Schneider to describe the method used in Dapper to solve the dual-write problem. It allows Dapper to handle the complexities of committing a single transaction across different state stores and pub/sub brokers.

  • What is the outbox projections feature in Dapper 1.14, and how does it address a limitation of the outbox pattern?

    -The outbox projections feature in Dapper 1.14 allows developers to decouple the state saved in the database from the payload published to the downstream subscriber. This addresses the limitation of the outbox pattern where previously the same state had to be used for both the database and the published message.

  • How does Dapper handle resiliency in the context of the outbox pattern?

    -Dapper allows the application of resiliency policies to the database operation and the pub/sub layer independently. This means that if the entire operation fails, Dapper can retry the operation in an exponential backoff manner, and if a message cannot be delivered to the underlying subscriber, it can be sent to a dead letter.

  • What is the process for trying out new preview features in Dapper?

    -To try out new preview features in Dapper, users should look at the documentation and follow the instructions provided. Some preview features might require a flag to be turned on in the Dapper configuration, explicitly enabling the feature.

  • How can community members contribute to Dapper and what are the benefits?

    -Community members can contribute to Dapper by writing blog posts, submitting issues, creating samples, and participating in conferences or workshops. They can also earn badges for their contributions, such as presenter badges for doing presentations or writer badges for updating documentation.

Outlines

00:00

🎉 Welcome to the Dapper Community Call

The speaker warmly welcomes participants to a Dapper Community call, an event that gathers individuals to discuss updates and advancements in the Dapper product and community. The speaker expresses gratitude for the attendees and encourages live viewers to share their locations and how they engage with Dapper. There's a mention of a change in the agenda with Ryan Winter's session on Azure IoT and Dapper pluggable components being canceled, replaced by a talk by Yaron Schneider, one of Dapper's original founders, on the outbox pattern and payload projections in the upcoming 1.4 release. The speaker also provides a link for those curious about the Dapper Community and invites Yaron to introduce himself and discuss his role and contributions to the Dapper project.

05:02

🛠️ Dapper's Outbox Pattern and Payload Projections

Yaron Schneider introduces himself as a core maintainer of the Dapper project and a stream commed member from Drid, a company he founded. He outlines his experience at Microsoft, focusing on open source and serverless container platforms. Yaron then dives into the outbox pattern, a feature that commits a transaction across a database and a message broker, which is crucial for reliability and consistency but notoriously difficult to implement correctly. He explains the dual write problem in distributed systems and how Dapper's outbox pattern addresses this challenge. Yaron also teases an upcoming blog post that will demystify the technical details of Dapper's solution. The discussion then shifts to the limitations of the current outbox implementation and the introduction of payload projections in Dapper 1.4, which allows for different payloads to be saved in the database and published to downstream subscribers.

10:02

🔄 Demonstrating Outbox Projections in Dapper 1.4

In this segment, the speaker provides a live demonstration of the outbox projections feature in Dapper 1.4. He uses Visual Studio Code to show how to set up a Dapper application with an outbox-enabled state store and a pub/sub component. The speaker runs the Dapper CLI to start the application locally and then uses Postman to illustrate how to save state to a database and publish a different payload to a downstream subscriber within a single transaction. The demonstration highlights the ease with which developers can use Dapper to handle complex distributed systems operations without being tightly coupled to specific infrastructure.

15:05

📢 Community Interaction and Feature Preview

The speaker opens the floor for questions from the community and reflects on the composition of new Dapper features from existing ones, such as workflows built on actors. They discuss the upcoming distributed cron API in Dapper 1.4 and its potential to simplify scheduling of work jobs in a distributed manner. The conversation emphasizes the importance of user feedback for the stability and improvement of Dapper's preview features. The speaker also mentions the need for users to try out these features and report their experiences to help shape the project's development.

20:05

🌐 Community Contributions and Social Presence

The speaker shifts the focus to the community, highlighting the contributions of various members and the presence of Dapper across different social platforms and conferences. They mention case studies and talks by community members on using Dapper in different scenarios, such as IoT device management and real-time event processing in the gaming sector. The speaker also plugs their own recent talk at a conference and encourages community members to share their experiences and work involving Dapper on social media and through presentations.

25:06

🏆 Recognizing Community Efforts and Upcoming Events

The speaker acknowledges the efforts of the community in contributing to Dapper, offering badges for various contributions such as presenting, writing, and supporting the community. They provide QR codes for easy access to claim these badges and encourage participation in future community calls and events. The speaker also shares links to resources like the Dapper website, GitHub, Discord, and Twitter, inviting the audience to engage with the community and explore the project further.

30:07

👋 Closing Remarks and Future Community Calls

In the final segment, the speaker thanks everyone for their participation and provides information on how to stay connected with the Dapper community. They mention the bi-weekly schedule of the community calls and invite the audience to the next session. The speaker also reminds the audience to reach out with any questions and to take advantage of the resources available to learn more about Dapper and its upcoming features.

Mindmap

Keywords

💡Dapper

Dapper is a cloud-native, event-driven framework that simplifies building distributed systems by providing abstractions for state management, messaging, and event-driven architecture. In the video, Dapper is the central theme, discussed for its features, community, and updates. It is used as a product and community reference point throughout the script.

💡Community Call

A community call is a gathering of members within a specific community to discuss updates, share knowledge, and engage with one another. In the context of the video, the Dapper Community Call serves as a platform for discussing the latest developments within the Dapper project and its ecosystem.

💡Outbox Pattern

The outbox pattern, also known as the transaction outbox pattern, is a technique used in distributed systems to ensure that a transaction is committed across a database and a message broker atomically. The video discusses this pattern in the context of Dapper's 1.4 release, emphasizing its importance for reliability and consistency in distributed systems.

💡Payload Projections

Payload projections refer to the ability to define different payloads for database storage and message publishing within the same transaction. The video script mentions this feature as a new addition in Dapper 1.4, allowing developers to decouple the data saved in the database from the message sent to downstream subscribers.

💡Distributed Systems

Distributed systems are computer systems that consist of multiple autonomous computers that communicate and coordinate actions through message passing. The video discusses the challenges of distributed systems, such as the dual-write problem, in the context of implementing the outbox pattern with Dapper.

💡Resiliency

Resiliency in the context of distributed systems refers to the ability of a system to recover from failures and continue operating. The script mentions resiliency policies in Dapper, which can be applied to operations to handle retries and dead-letter scenarios, enhancing the robustness of applications.

💡Dapper CLI

The Dapper CLI (Command Line Interface) is a tool that allows developers to interact with Dapper from the command line, facilitating tasks such as running applications with Dapper sidecars. In the script, the CLI is used to demonstrate running a Dapper application locally.

💡State Store

A state store in Dapper is a component responsible for managing state within a distributed system. It is used in conjunction with other Dapper features, such as the outbox pattern, to ensure state consistency. The script discusses configuring a state store for use with the outbox feature in Dapper.

💡Pub/Sub

Pub/Sub, short for publish-subscribe, is a messaging pattern where the message producer (publisher) does not program the messages to be sent directly to a specific receiver (subscriber), but instead sends messages to a common channel. The video script mentions setting up a Pub/Sub component in Dapper and using it for event-driven architectures.

💡Distributed Cron

Distributed Cron is a feature in Dapper that allows scheduling of tasks in a distributed manner, ensuring that scheduled jobs are executed by only one instance of an application replica. The script mentions this feature as an upcoming addition in Dapper 1.4, highlighting its utility for simplifying task scheduling in cloud-native applications.

💡Workflows

Workflows in Dapper refer to a higher-level abstraction that combines multiple Dapper APIs to create complex event-driven architectures. The script mentions workflows as an example of how Dapper allows the composition of foundational features to build more sophisticated systems.

Highlights

Introduction to the Dapper Community call focusing on updates and discussions about the Dapper product and community.

Invitation for global Dapper users to join the live discussion and share their location and use cases in the chat.

Update on the agenda with a change in speakers, featuring Yaron Schneider, one of the original founders of Dapper, discussing the outbox pattern and payload projections.

Yaron Schneider's introduction, his role as a core maintainer of Dapper, and his involvement in the open-source community.

Explanation of the outbox pattern, its importance for transactional consistency across databases and message brokers, and the challenges it presents.

Introduction of the 'anticipator pattern' used in Dapper to solve the dual write problem in distributed systems.

Demonstration of the outbox feature in Dapper since version 1.12 and its evolution towards a stable feature in 1.14.

Announcement of the outbox projections feature in Dapper 1.14, allowing developers to decouple database state from published payloads.

Live coding demo showcasing the implementation of the outbox pattern with payload projections in Dapper.

Discussion on the composability of Dapper features, such as workflows building on actors, and the outbox pattern enhancing state store and pub/sub capabilities.

Integration of resiliency support with the new outbox feature to handle retries and dead letter scenarios in distributed transactions.

Call to action for community members to try out preview features and provide feedback to help stabilize upcoming Dapper releases.

Highlight of community contributions, including blog posts, case studies, and conference talks, showcasing various use cases of Dapper.

Introduction of community badges for contributors and participants as a way to recognize and encourage involvement in the Dapper community.

Upcoming events and community calls information, inviting members to stay engaged with the Dapper community.

Closing remarks thanking participants and providing links and resources for further exploration of Dapper.

Transcripts

play00:00

coming on to one of our Dapper Community

play00:01

calls this is essentially where we get

play00:03

everyone together and talk about some of

play00:05

the new and amazing things that are

play00:07

happening both within Dapper as a

play00:08

product and also with Dapper as the

play00:10

community so we usually have different

play00:12

talks and presentations and we share

play00:14

different updates and things of that

play00:15

nature so definitely appreciate you all

play00:17

joining us um definitely thank you so

play00:19

much for being here uh for the folks

play00:21

that are watching us live I'd definitely

play00:23

love to know where everyone is calling

play00:25

in from you know I know we have Dapper

play00:27

users from all across the world so you

play00:29

know if you're watching us from Germany

play00:31

or India or Australia or even in the

play00:33

United States definitely go ahead use

play00:35

the chat um feel free to drop um a

play00:37

message in the comments and just let us

play00:39

know you know where are you watching

play00:40

from and what is it exactly that you do

play00:42

with

play00:43

that now let's move forward to with our

play00:45

agenda really quickly so quick update to

play00:48

the agenda originally we had Ryan winter

play00:51

coming on to talk to us a little bit

play00:52

about Azure iot and Dapper pluggable

play00:55

components well sorry to say due for a

play00:59

series of month on Unfortunate Events

play01:00

that's not happening but yon is here and

play01:03

we all love yon youron is one of the

play01:05

original founders of the Dapper project

play01:07

and he's going to be talking to us about

play01:09

um the outbox pattern and payload

play01:11

projections which I think is slated to

play01:13

come in the release of 1.4 Dapper so

play01:17

we're going to do a little bit of that

play01:18

today we're going to do you know our

play01:19

community Show and Tell we're g to give

play01:20

you all a little bit of updates and

play01:23

again hopefully we'll have a good time

play01:24

talking about Dapper and again to for

play01:27

folks that are curious if you want to

play01:28

know a little bit more about that Dapper

play01:30

Community I just added a link to the

play01:31

bottom of the screen feel free to head

play01:33

over to github.com Dapper Community you

play01:36

can learn about these Community calls

play01:38

you can learn about how you can get

play01:39

involved in Dapper um the links to our

play01:41

Discord Channel and all that types of

play01:43

stuff is in there so again this is your

play01:45

first time welcome and here's a great

play01:47

place for you to get started now I'm

play01:49

going to bring yourone on and I'm going

play01:51

to have him just really quickly

play01:53

introduce himself and you know he could

play01:56

let us know a little bit about who he is

play01:58

and uh what we're doing here here we go

play02:00

hey youron what's going on hey happy to

play02:03

be here nice to have you so obviously I

play02:06

know who you are and maybe a few people

play02:08

know who you are but why don't you do a

play02:09

little bit of an introduction for folks

play02:11

that maybe knew let them know just

play02:13

exactly like who you are and you know

play02:14

what do you do today yeah of course hi

play02:17

everyone my name is youron Schneider I

play02:19

am one of the original uh creators of

play02:21

the Dapper project today um a core

play02:23

maintainer on the DAP runtime um plus a

play02:26

few other repositories that we have uh

play02:28

on the project I'm a stream commed

play02:29

member um from drid which is a company I

play02:32

founded after uh spending a few years at

play02:34

Microsoft where I mostly focused on open

play02:36

source and building serverless container

play02:38

platforms um like aure container apps

play02:41

and some other services and um yeah

play02:43

we're on the steering committee with

play02:45

Intel Alibaba Cloud uh Microsoft and

play02:47

automatics and driving the project

play02:48

forward and today I'm here to talk to

play02:50

you about a new feature that was highly

play02:52

requested by the community coming in

play02:54

depper 114 nice so you're I guess you're

play02:57

G to share your screen and um again you

play03:00

g to talk a little bit about the outbox

play03:02

pattern and guessing you to tell us well

play03:05

like what is this outbox pattern thing

play03:06

and then also how does dapper actually

play03:09

go through and like you know make that a

play03:10

reality for developers to use in a very

play03:12

language agnostic Cloud agnostic hosting

play03:15

agnostic yeah of course so we've we've

play03:18

actually had the the outbox feature

play03:19

since um 112 um it's still a preview

play03:22

feature we're hoping to take it out in

play03:24

114 makes a stable feature and I'm going

play03:26

to walk through uh what that is and how

play03:29

D result this um pretty hard problem for

play03:32

developers so I'm going to be sharing my

play03:33

screen and please let me know and you

play03:36

can see it um pulling up your screen

play03:39

right now all right there you go take it

play03:41

all right cool so we're gonna be talking

play03:44

about uh a new feature that's coming in

play03:46

114 called payload projections but

play03:48

before that let's get on the same page

play03:50

about the outbox pattern commonly known

play03:53

as the transaction outbox pattern so

play03:56

what is it um in short it's the ability

play03:59

to exit Ute or commit a single

play04:01

transaction across a database and a

play04:04

message broker um and it it can be

play04:07

highly useful um for reliability and

play04:10

consistency purposes but it's really

play04:12

really hard to get right um and the

play04:14

reason is that to make it work you need

play04:17

to solve a very fundamental problem uh

play04:20

in in computer science and specifically

play04:22

distributed Systems computer science um

play04:24

which is the Dual Riot problem um and

play04:27

that issue is you know basically needing

play04:30

to coordinate the same same data or

play04:32

payload or um uh message being saved to

play04:36

two separate systems whether you know

play04:38

it's a it's a file on disk or a message

play04:39

broker or a database or a config store

play04:42

or even something that's written in

play04:43

memory transactionally um and that's a

play04:46

difficult problem if you combine to that

play04:49

the outbox requirements then you get an

play04:51

even bigger problem um and the

play04:54

requirements for the outbox pattern are

play04:56

as follows if you save a state to a

play04:58

database then you must guarantee that a

play05:01

message is also published as a part of

play05:05

that transaction so the state save in

play05:08

itself might not be a transaction but

play05:10

when you add the separate operation to

play05:12

notify Downstream subscribers about the

play05:15

state that will saved you suddenly get a

play05:17

transaction and not just a single

play05:19

database transaction in the outbox case

play05:21

it's a single transaction between a

play05:22

database and the message broker which is

play05:24

extremely tricky um and then the message

play05:27

must not be published if the state

play05:29

wasn't saved in the database so if your

play05:31

app saved the state and the state failed

play05:33

you must not publish the message and um

play05:36

on the same vein the state must not be

play05:39

saved without a published message so

play05:42

this is um very tricky in this this

play05:44

diagram that I grabbed off of Google um

play05:46

basically shows you what it looks like

play05:48

you have the command Handler here on the

play05:50

left that would probably be your

play05:52

application your code that's uh wanting

play05:54

to commit the the transaction wherever

play05:57

it wherever it may run whatever it may

play06:00

be any type of code so you're staring a

play06:02

transaction against database it's being

play06:04

processed transactions committed and

play06:06

then the the red line here is something

play06:08

that's basically you know asynchronous

play06:10

and out of line with the database

play06:12

operation and that's the tricky part to

play06:14

get right because um in these you know

play06:17

three uh different actors that are

play06:19

participating any one of them can go

play06:21

down the database can go down the event

play06:23

bus can go down um the event bus can go

play06:25

down after you save the data to the

play06:27

database and before you've actually uh

play06:29

saved the to the event bus and vice

play06:31

versa and the application itself can you

play06:33

know go down um for example if you've

play06:35

saved the database and then you know the

play06:37

event bus errors out and cause your

play06:39

application to crash which leaves you

play06:41

with state in the database and message

play06:42

that isn't published um so this is

play06:45

pretty difficult we might even call this

play06:47

the three body problem uh now that they

play06:49

think about it should actually tradem

play06:51

Market well I can trade market because

play06:53

Netflix probably did already well never

play06:55

mind um in Dapper we have Dapper outbox

play07:00

which solves this problem completely we

play07:02

have um solved the Dual right problem

play07:04

and I can't go in into you know very

play07:07

technical details about how we did that

play07:09

here because we don't have time but I am

play07:11

going to write a blog post that

play07:13

basically demystifies how this is being

play07:16

done um you know as a sneak preview of

play07:18

that blog post that's coming up um we

play07:20

used something that I call the

play07:23

anticipator pattern that thing I am

play07:24

going to trademark probably um but using

play07:27

Dapper you can actually combine any

play07:29

number number of dapper supported State

play07:31

stores and pubs of Brokers to achieve

play07:33

this so for example if you were to write

play07:36

your own outbox implementation um you

play07:38

would need to solve all of these

play07:40

distributed systems issues and probably

play07:42

you would end up with something that's

play07:44

very coupled to you know postgress SQL

play07:46

or kofka um or you know some some other

play07:50

combination that you're using of a

play07:51

database and message broker because the

play07:54

outbox logic is very very tied to the

play07:57

actual infrastructure that you're using

play07:59

but Apper allows you to swap in and out

play08:01

dozens of different databases and

play08:03

message Brokers to arrive at a

play08:04

combination that works for you so with

play08:08

Dapper you can basically save um a state

play08:11

item to a database uh and then dapp will

play08:14

make sure that that same state is

play08:16

delivered to a downstream subscriber

play08:19

which is a subscribing application and

play08:21

um all that is pretty great but we've

play08:23

had one major limitation until now and

play08:26

that is that the same state you're

play08:27

saving into the database is the same one

play08:30

that gets published um into the

play08:32

downstream subscriber and while that is

play08:35

useful um also in a lot of cases it

play08:37

might prove unuseful because you simply

play08:39

want a different payload um and that

play08:42

feedback we've heard loud and clear from

play08:44

a lot of our uh community members who

play08:46

are trying out this feature now and I am

play08:49

happy to say that uh in 114 we're coming

play08:52

out with a feature called outbox

play08:54

projections which basically Works around

play08:55

the limitation and in here you can see

play08:58

that um we have different payloads that

play09:00

are saved with the database and the pub

play09:03

sub and I'm going to show you a demo of

play09:06

this right now so I'm gonna go over to

play09:09

code here can you see myvs

play09:16

code can you hear me guess you can hear

play09:18

me I'm was talking to you yeah that

play09:20

looks good to me all right cool so this

play09:23

is a new GS code um this is taken off of

play09:25

the Dapper tutorials nothing special

play09:27

here um you know 25 lines of code to

play09:30

create an aveng of app with Dapper here

play09:32

we're subscribing to a pub sub called

play09:34

pubsub well that's not very original um

play09:37

and the topic named a okay and we're

play09:40

also telling Dapper Hey whenever a

play09:42

message arrives on the topic a please

play09:44

send it to an endpoint on my application

play09:47

on a route to a route listening on the

play09:49

path which is also a so here I'm just

play09:52

GNA uh console log whatever comes in

play09:55

pretty simple this is just Dapper stuff

play09:58

um no infrastructure here uh you know

play10:00

we're completely decoupled from How We

play10:02

Do pubsub How We Do event driven

play10:03

architectures what pubsub we're working

play10:05

against and specifically from anything

play10:07

outbox related um to make this work uh

play10:11

we are defining the components in Dapper

play10:13

because Dapper abstract set not only

play10:16

from communicating with infrastructure

play10:17

but from all of the distributed systems

play10:19

work associated with interacting with

play10:21

the apis for that infrastructure and I

play10:23

have a state store here which is a r

play10:26

state store I'm running this um sample

play10:29

using Kafka and redis locally so the

play10:32

state is going to be saved into redis

play10:35

while the uh pubsub message is going to

play10:37

be published into Kafka and from there

play10:39

into an application that needs to be

play10:41

notified whenever we're saving State

play10:44

into the red database so this is a

play10:46

Dapper component if you haven't seen

play10:48

this before this is Dapper's way to

play10:50

connect your apps with um the

play10:52

infrastructure so we have the ready s r

play10:54

password um and we have two specific

play10:57

outbox metadata items here I'm basically

play11:00

telling the state store hey um this is

play11:03

outbox enabled so every time there is a

play11:05

state change I want you to send uh the

play11:08

state change to this pubsub and

play11:10

specifically to this topic um and where

play11:14

the pubsub component this is pretty

play11:16

simple uh just pops up. cka telling you

play11:19

know Dapper that I have a locally

play11:21

running Kafka broker here on Local Host

play11:24

1992 and that's it that's all I need so

play11:27

since I'm running this locally I'm just

play11:28

going to use the Dapper CLI to uh run

play11:32

Dapper and my app so if you haven't seen

play11:34

this before this is a local tool that

play11:36

allows you to run the Dapper CLI and

play11:38

your application in one go uh very easy

play11:40

to to get started with Dapper locally so

play11:42

I'm just doing Dapper run giving my

play11:44

application an app ID this can really be

play11:46

anything just setting up the ports and

play11:48

telling Dapper um the path to find these

play11:51

files so that it can connect to the cuff

play11:54

CA broker and red estate store that I

play11:56

have running locally and the second

play11:58

command here um or the second you know

play12:00

uh major parameter here is node appjs

play12:03

which is going to run my application

play12:04

after the side car is running so we're

play12:06

going to hit this off and we can already

play12:08

see that we are up and running and we

play12:11

can also see this uh message here says

play12:13

my app is subscribed to the following

play12:15

topics so Dapper gives me feedback about

play12:17

you know which topics I'm actually

play12:18

subscribed to um and we're basically

play12:21

good to go at this point so I'm G to

play12:23

just going to go back into my um

play12:25

application here and this is going to be

play12:28

the code that's going to get triggered

play12:29

once we save the state of the database

play12:31

right so I'm I'm not going to be you

play12:33

know talking this endpoint directly I'm

play12:35

not even going to be doing pubsub

play12:36

directly I'm actually going to go into

play12:38

Postman here and show you what the

play12:41

outbox projection looks like so um first

play12:43

of all I'm using the Dapper transaction

play12:46

API this is the same endpoint I would

play12:49

use to just save state in a

play12:51

transactional database in Dapper um and

play12:54

this is basically my request what I'm

play12:56

highlighting here let me just zoom in a

play12:58

little so so we have an operation it's

play13:00

an upsert and this is uh the request

play13:03

data so I'm saving a key of one and this

play13:06

is the value this is the value that's

play13:08

going to get written in the database or

play13:09

that should get written in the database

play13:12

so my key is one and my value is two and

play13:15

if I basically just you know publish

play13:18

this then it would save an item to my

play13:19

database but now and and also published

play13:22

it to the end topic because we have

play13:24

outbox configured um but since we want a

play13:27

different payload to be sent to my

play13:29

application uh we can now use

play13:31

projections and you can see that my

play13:33

operations is an array which means I

play13:35

have a different second operation here

play13:39

um which is the same as above with the

play13:42

only difference being that um the value

play13:44

is different so the state that's going

play13:46

to be saved to the database is going to

play13:48

be the value of string two while the

play13:52

value that we want published into our

play13:54

application is actually a Json payload

play13:56

with an event ID um that I just made up

play13:59

here and uh we're going to tell Dapper

play14:02

uh hey look this transaction should

play14:04

actually not get saved into the database

play14:07

this is a projection of this operation

play14:10

now how does dapper know that this is a

play14:12

projection of this same uh operation

play14:15

here well we have the same key right so

play14:18

if you have the same key um with this

play14:20

metadata item then Dapper is going to

play14:23

say hey okay well this operation is not

play14:25

going to be saved in the database only

play14:27

this one is and we're going to be using

play14:30

this value to actually send it to the

play14:31

application and in here you can actually

play14:34

override all of the cloud event headers

play14:37

um and Fields that also get sent to the

play14:40

underlying subscriber so for example if

play14:42

you wanted to override the cloud event

play14:44

sub field or ID or whatever you could

play14:48

just put it inside of the same metadata

play14:50

here and I'm also just saying that the

play14:52

content type is application Json because

play14:55

this uh data type is Json and this is

play14:58

really all the r because we're basically

play14:59

committing a single transaction across

play15:01

Kafka and redus using one API call which

play15:04

is post in this case of course this is

play15:06

also supported using any d s Decay today

play15:09

and using the grpc clients um there are

play15:12

no special things you need to do in the

play15:13

da s DEC to get support for this and

play15:16

yeah let's see if it actually works

play15:18

because this is a preview feature that's

play15:19

coming up um well right now it's a

play15:22

preview feature because it's in our

play15:23

Master Branch but it's not in a version

play15:26

so um let's run this and by the way one

play15:29

last thing to mention is that if I were

play15:31

to remove this U met data element here

play15:34

um this request would fail which is what

play15:37

we're expecting because this is an

play15:39

invalid transaction because had we

play15:40

removed this Dapper would have tried to

play15:43

basically publish two messages not not

play15:45

publish save two messages to the

play15:46

database um with the same key and that's

play15:49

an invalid operation and Dapper would

play15:50

let us know that we're trying to do

play15:52

something that is invalid all right cool

play15:55

so let's do this and I'm just going to

play15:57

save this uh we got response back 24

play15:59

milliseconds and uh let's go back into

play16:02

our code here and as you can see uh let

play16:05

me just bring this closer uh our

play16:07

application U log the event ID and this

play16:10

is the payload that we specified in the

play16:12

projection that you just saw and if we

play16:15

go back here um and we get the state no

play16:20

this is not the correct one and we get

play16:22

the state so this is a get operation

play16:24

just to see what what kind of data we

play16:26

actually sa in the database um this is

play16:28

going to return us the string value of

play16:30

two let me just zoom in on that a little

play16:33

bring this up yeah so we can see that we

play16:35

saved a different uh state in the

play16:37

database published a different message

play16:39

to the underlying broker and it was all

play16:41

done via single transaction if any of

play16:43

them would have failed we wouldn't get

play16:45

the state saving database we wouldn't

play16:46

have gotten the event published to the

play16:48

underlying subscriber and we did that

play16:50

with a single HTTP call okay so I think

play16:54

uh that's all for here I'm going to go

play16:57

back and stop sharing in and we can take

play17:00

it off for

play17:02

questions I actually have a lot of

play17:03

questions to be honest with you but I'm

play17:05

going to give folks a chance if everyone

play17:06

that's watching if you have any

play17:08

questions for your own feel free to go

play17:09

ahead and drop them in the chat um and I

play17:12

I'm looking at the numbers I noticed a

play17:13

lot of you are still coming in so if you

play17:17

don't know what we're talking about if

play17:18

you're just now joining the stream your

play17:19

own just kind of went through preview

play17:21

support for um the elbox pattern that's

play17:24

going to be in Dapper um I think the

play17:26

goal is to have this in preview in one

play17:29

14 that should be coming up later on in

play17:31

the year at some point right is that

play17:32

correct correct yes okay so outbox is

play17:35

already supported since 112 if you have

play17:37

Dapper 112 you can already use it again

play17:39

commit a single transaction between any

play17:41

of the supported Dapper transactional

play17:43

databases and um really any message

play17:45

broker that supported that this outbox

play17:48

pattern supports all message Brokers um

play17:50

and yes in 114 we're going to allow you

play17:52

to decouple the state that gets saved in

play17:54

the database as opposed to the actual

play17:56

you know Cloud event that gets published

play17:58

to the underlying subscriber nice nice

play18:01

you know one of the things I I I love

play18:03

about some of these newer daper features

play18:05

that we're getting is that it looks like

play18:07

they're being composed from existing

play18:10

features yeah like as you were talking

play18:12

about it um and I'll bring up like

play18:14

workflows as an example which Builds on

play18:16

an existing feature which is you know

play18:18

actors as an example right and then what

play18:21

you're showing us now like some of the

play18:22

out books patterns that are built up on

play18:24

the state store and the cloud events

play18:26

support and Pub so right and you showed

play18:29

an example of using transactions and

play18:30

some of these types of things right like

play18:32

I love to see how like some of these

play18:34

things are starting to get composed from

play18:36

like I guess we can call them the

play18:38

foundational bits the foundational

play18:40

features of dapper to create like some

play18:41

of these higher level abstractions are

play18:43

you seeing like more of those types of

play18:45

requests coming in from users as as

play18:47

we're going definitely for sure um I

play18:50

think we spent a lot of time building

play18:52

all of the fundamental infrastructure

play18:54

needed in Dapper to arrive at a place

play18:57

where we can compose higher Lev

play18:59

architectures using two or more Dapper

play19:01

apis combined together um workflows is

play19:05

is definitely you know combination of um

play19:07

actors and and some State Source stuff

play19:11

um and you know a new building block

play19:13

based on an existing building block

play19:14

really outbox um is kind of the same as

play19:17

far as the user is concerned it you know

play19:19

ties in uh two apis um but this is the

play19:22

first feature I think that really ties

play19:24

in two distinct um apis that you know

play19:28

users can talk to independently where

play19:30

workflows is a new building block outbox

play19:32

is a new feature on top of an existing

play19:34

building block that uses a different one

play19:36

so yes we're definitely going to see

play19:37

more and more of these things um coming

play19:39

up uh for sure because these higher

play19:41

level you know um features and

play19:43

abstractions are the most useful um and

play19:46

now that we have all of the Machinery

play19:48

needed in Dapper to um provide for these

play19:51

higher level features we're certainly

play19:52

going to make more usage of that gotta I

play19:55

know one other feature in Dapper that

play19:57

I'm pretty sure you're Phantom 2 is the

play19:59

resiliency support does this new feature

play20:02

that you have does that pair well

play20:04

together with like the resiliency stuff

play20:06

that that's already baked in a box oh

play20:09

yeah for sure so you know when you're

play20:10

saving the state to to Dapper when

play20:12

you're telling Dapper hey save the state

play20:14

transaction which is in my demo uh it

play20:17

was coupled to the outbox Pub sub where

play20:19

we're basically saying hey save the

play20:21

state into a database and then publish

play20:23

it you can apply resiliency policy any

play20:25

resiliency policy for the operation so

play20:27

if the entire operation fails for

play20:29

whatever reason you know PBS have went

play20:31

down stat went down um Dapper can

play20:33

actually retry this in an exponential

play20:35

manner manner an exponential back off um

play20:38

just a linear retry um you can actually

play20:41

send the message even to a dead letter

play20:43

um if the if the underlying subscriber

play20:45

wasn't able to receive the request and

play20:47

you can also put a resiliency policy on

play20:49

the underlying subscriber which is

play20:51

really decoupled from the database so if

play20:53

depper isn't able to uh send a message

play20:56

to the underlying subscriber it will

play20:58

just reach right um so yes you can put

play21:00

resiliency pulses both in the database

play21:03

operation layer and the pub sub layer

play21:05

and it'll just work out the box nice

play21:09

nice um so you mentioned this is coming

play21:11

out in 114 what are some of the things

play21:14

that you think you need right now or

play21:16

does a team need right now for this to

play21:18

go from preview to to not preview to

play21:21

like to to G yeah um so we've actually

play21:24

gotten a lot of feedback um during 11 12

play21:28

and

play21:29

113 um which led to this you know major

play21:33

limitation being removed now in 114 to

play21:35

make it stable in general what we want

play21:37

from users is to try out um preview

play21:41

features that is the best thing you can

play21:43

do outside of opening PRS and issues um

play21:46

to help the Dapper project for example

play21:48

we're coming out with a distributed cron

play21:51

API

play21:52

in4 um which is also going to be huge um

play21:56

because it it'll allow you and this

play21:57

really also nicely workflows it allows

play22:00

you to um schedule Crown work jobs in in

play22:03

Dapper in a distributed way so if you

play22:05

have multiple replicas of an application

play22:07

that will actually make sure that when

play22:09

it hits um your you know application

play22:11

it'll only hit one specific instance um

play22:14

and and that also removes a lot of buer

play22:16

plate code and Machinery that developers

play22:18

need to go through but this is coming as

play22:19

a preview feature we really need

play22:21

feedback about that we're we're going to

play22:23

be putting out a lot of content out

play22:24

there about how to enable it um you know

play22:27

spoiler it's going to be pretty easy

play22:28

it's a configuration flag on an on a

play22:31

Helm chart or a configuration um and

play22:34

then we want the feedback to just flow

play22:36

in and hear about your experiences

play22:39

because otherwise you know we can use

play22:42

our own test to um try and get a feel

play22:44

for how stable things are but there is

play22:45

nothing like user feedback and so far

play22:47

the Dapper Community has been awesome um

play22:50

we just want people to continue giving

play22:51

us feedback and for more people to give

play22:53

us feedback gotta so let's say I just

play22:57

installed 114 right and I want to try

play22:59

out this preview feature is there

play23:01

anything special that I need to do or do

play23:03

I just need to look at the docs and see

play23:05

what the end points are install the sdks

play23:07

or is there any particular type of you

play23:10

know other than setting up the saate

play23:11

store and The Pub St is there any

play23:12

additional configuration that I need to

play23:14

get that to work specifically for outbox

play23:16

no um you you just look at the docs and

play23:19

and you you do what they say like what

play23:22

they just showed you is basically what

play23:23

you need to do there were no other steps

play23:25

I took before showing the demo um to get

play23:28

outbox working um that being said some

play23:31

preview features might explicitly need a

play23:34

flag to be turned on and we have that on

play23:36

the Dapper configuration crd or resource

play23:39

where you basically explicitly Say Hey I

play23:41

want this preview feature to be turned

play23:43

on and the reason why some features have

play23:45

that flug and some why don't is because

play23:47

of what we call true bypass I'm not

play23:50

actually sure if this is only taken you

play23:51

know from the guitar playing world but

play23:54

when you um when if you play guitar you

play23:56

have like effects they're going into

play23:58

theend amp and sometimes you just want a

play24:00

clean signal going through the guitar to

play24:02

the amp and so you you want a true

play24:04

bypass um so some of these features if

play24:06

you actually enable them without um

play24:09

doing anything else they they will alter

play24:12

the behavior of dapper which is why

play24:13

we're disabling them by default and

play24:15

we're telling people look this you know

play24:17

might cause some issues and you

play24:19

explicitly need to enable them other

play24:21

features like the outbox pattern they

play24:23

they have true bypass they don't do

play24:25

anything unless you actually explicitly

play24:27

use them gotcha and so like you said

play24:30

with this one you don't have to do

play24:31

anything different and because we did

play24:33

have outbox support before like you said

play24:35

in 112 this is more so just like adding

play24:38

on to like some of the existing

play24:39

functionality today and so it's not

play24:41

going to like we're not expecting

play24:42

breaking changes we're not expecting any

play24:45

of the existing um Investments you made

play24:47

in daa to be influenced by it but now

play24:49

this is more so just like a plus one to

play24:51

something else that you're able to do

play24:53

correct that's very true yeah it's nice

play24:56

well it doesn't look like we have any

play24:58

questions for folks from folks um again

play25:01

at any point in time if anyone has any

play25:03

questions um I definitely recommend that

play25:05

you feel free to reach out to your own

play25:07

or any of us on the Discord Channel or

play25:10

Twitter or on LinkedIn or on any of the

play25:12

many social things that people connected

play25:15

to um again just to tell everyone if you

play25:18

missed the demo and if you uh came in

play25:20

late then just watch the recording it's

play25:22

going to be up on YouTube yeah it'll be

play25:24

up on YouTube but that being said we're

play25:26

not done yet because there's more stuff

play25:27

to do so I'm going to bring up my screen

play25:29

really quickly um and we're going to go

play25:32

through the community um you know some

play25:34

of the community updates that we' had so

play25:36

actually I think what I will do is I'm

play25:38

GNA switch over to my browser um so as

play25:41

you know like Dapper has been I know

play25:43

like the community and Dapper has been

play25:45

so active we really appreciate all the

play25:47

things that you all do from writing blog

play25:49

posts to submitting issues to you know

play25:52

creating these samples and things of

play25:53

that nature um so you know in every

play25:55

Community call we' like to highlight

play25:57

just a few of our community members that

play25:58

have been doing some really great stuff

play26:00

so in this particular series I think

play26:02

this is the first part of you know

play26:04

hopefully a very lengthy series um

play26:06

Vladimir here is talking about building

play26:07

Cloud native apps with you know Dapper

play26:10

and go um you know surprisingly I don't

play26:12

see a lot of folks talking about Dapper

play26:14

and go and you know Dapper is written

play26:16

and go so that kind of just makes sense

play26:18

to me um so it's kind of great to see

play26:20

him kind of going through this um again

play26:22

this is very much of an introductory

play26:24

series talks a little bit about like you

play26:26

know Dapper kubernetes the SARP pattern

play26:28

and things of that nature uh but

play26:30

definitely worth a read and definitely

play26:32

looking forward to you know the next uh

play26:35

the next parts of this series that U

play26:37

that Vladimir's going to put

play26:39

out uh next one I'm going to take a look

play26:42

at Tempest if we had over to like the

play26:44

cncf um there's a few different case

play26:46

studies that they've released um and

play26:48

this one this one was pretty interesting

play26:49

because this talks about like a

play26:50

manufacturing company that has

play26:53

essentially they're doing a lot of iot

play26:54

work and how they're using you know

play26:56

daper to really help manage some of

play26:58

their iot devices as you can imagine

play27:00

like they're using Dapper actors and you

play27:02

know they're using Pub sub and things of

play27:04

that nature so definitely a good read

play27:06

this is on the cncf case studies um

play27:09

section of their website so make sure

play27:10

you check that out and then also oops

play27:13

let me scroll up a little bit um this

play27:15

was an interesting one too um Dev Rico

play27:17

is a a company that's in the gaming

play27:20

sector I don't think they actually make

play27:22

games but like they you know they're

play27:23

within that space and they talk about

play27:26

using Dappers um again you know using um

play27:30

Pub sub and actors because they wanted

play27:31

to do some realtime event processing to

play27:34

be able to generate recommendations for

play27:36

players which I thought was actually

play27:38

really cool so this is also a good read

play27:40

um if again if you're interested in

play27:42

learning about like how people are using

play27:44

Dappers or how you could use Dapper you

play27:46

know what are some of the use case it

play27:47

covers and you know what are some of the

play27:48

cool things that it

play27:50

does uh moving forward real quick I

play27:52

actually Shameless plug I actually did a

play27:55

talk on Dapper this was actually a

play27:56

couple weeks ago at the

play27:59

ab. NETCOM we talk a little bit about

play28:02

you know microservices and Dapper and

play28:04

net and you know some of the different

play28:06

things that it supports as well um you

play28:08

know if if you all are doing anything

play28:10

with Dapper at conferences or workshops

play28:12

or anything of the sort again definitely

play28:14

feel free to let us know we have a show

play28:16

and tell Channel inside of the G repo

play28:19

and so definitely recommend that you

play28:21

head over there and and share out with

play28:23

us now that was these links I'll make

play28:25

sure I put these links like in the

play28:27

section the description section of the

play28:29

video um for those of you that are

play28:31

watching us outside of YouTube like

play28:33

that's what I'm talking about like we're

play28:34

going to put it in the YouTube uh video

play28:37

description section and we'll also make

play28:38

sure we share them inside of our show

play28:40

and section on the Discord Channel as

play28:43

well um but just a couple other things

play28:44

that have been happening in the world of

play28:45

dapper getting across different

play28:47

conferences and whatnot you know we've

play28:48

had folks been on like the cloud native

play28:50

show um you know our friends from

play28:53

diagrid have done you know things on you

play28:55

know Dapper at scale our other community

play28:58

manager Mark there at the bottom right

play28:59

side you know he has a video that talks

play29:01

about like how you can contribute to

play29:03

Dapper um he has a whole read me and you

play29:05

know Badges and all kinds of fun stuff

play29:07

that that's going on there um and here's

play29:10

some on to talk about like getting up to

play29:11

speed with Dapper these are all videos

play29:13

that are available on YouTube right now

play29:15

so if you want to go and check these out

play29:17

feel free to just go to the YouTube and

play29:18

look these up and you know you'll be

play29:20

able to see I again just some of really

play29:21

cool things that folks are doing with

play29:24

apptive and then across the social space

play29:26

too like you know Microsoft builders

play29:28

there the other day and as you can see

play29:29

our friend Mark renovich on the right

play29:31

hand side with the Dapper the Dapper

play29:33

t-shirt off so you know shout out to

play29:35

Mark and the T-shirt definitely love

play29:37

that I don't have a t-shirt yet I gotta

play29:39

I gotta sort that out I need to talk to

play29:41

somebody to get me a Dapper t-shirt I

play29:42

don't know if maybe y all know a person

play29:44

that can help me do that but I need to I

play29:46

need to get that figured out I need to

play29:47

get a daper t-shirt um but again tons of

play29:50

different conferences we have box days

play29:52

that happened in Brussels um you know at

play29:54

the bottom right side there you could

play29:56

see like there was another webinar on um

play29:58

conductor from diar conductor talking

play30:00

about how you can manage Dapper in Azure

play30:03

um again tons of stuff on social folks

play30:05

talking about using Dapper and how it

play30:07

works um here we have computer weekly um

play30:10

I think these ones are coming from

play30:12

LinkedIn so again if folks want to head

play30:14

over to LinkedIn and check some of these

play30:15

things out you can as well now that

play30:19

being said this is pretty much like the

play30:20

end of the show um again if if folks are

play30:23

interested in just contributing to app

play30:25

or being a part of the community um we

play30:27

we have a couple of perks not too bad

play30:30

right we have some of these presenter

play30:31

badges that we have so if folks are you

play30:34

know willing to come on and do a

play30:36

presentation here either at a conference

play30:38

or maybe even at one of these Community

play30:39

calls you'll be eligible to get one of

play30:41

these Dapper uh presenter Badges and

play30:44

then if you help us like updating the

play30:46

docs or writing blog posts or anything

play30:48

of the sort um you can even get this uh

play30:51

you know this writer badge as well like

play30:53

that's that's super helpful um and even

play30:56

just for being here everyone is ible for

play30:58

getting a community supporter badge

play31:00

right so just for you being here you

play31:02

could you know click this little QR code

play31:04

scan it with your phone um you know or

play31:07

pause the recording and you know

play31:09

whatever it is you need to do copy that

play31:10

link at the bottom and then you'll be

play31:12

able to claim this badge on hollowen as

play31:15

well so definitely feel free to go ahead

play31:17

and grab some of those if you know you

play31:18

like collecting badges right kind of

play31:20

like Pokemon like you gota gotta catch

play31:22

them all kind of um but with that being

play31:25

said folks and thank you so much for

play31:26

being here this is the end of of

play31:28

community called 104 we do these

play31:31

bi-weekly so you can expect the next one

play31:32

in about two weeks um if you're

play31:35

interested in learning more about Dapper

play31:37

again we have another QR code for you or

play31:38

you could even just check out some of

play31:40

these links that are here we have the

play31:41

Dapper website the YouTube channel um we

play31:44

have tons of quick starts that are

play31:45

available in our GitHub the Discord

play31:47

Channel and also we're very active on

play31:49

Twitter as well um so again feel free to

play31:52

reach out to your own if you have any

play31:53

questions about you know 114 and the

play31:56

payload projection support that he talks

play31:58

about when it comes to the Outbacks

play32:00

pattern and and anything else that's

play32:02

going on with d so again with that being

play32:04

said thank you all so much for being

play32:05

here really appreciate it and uh we'll

play32:07

see you next time for the next daper

play32:09

Community call bye everybody

Rate This

5.0 / 5 (0 votes)

Etiquetas Relacionadas
Dapper CommunityCloud NativeDistributed SystemsMicroservicesIoT DevicesEvent ProcessingDeveloper ToolsCommunity CallTech UpdateAzure IoTDapper 1.4
¿Necesitas un resumen en inglés?