The famous architect, Meinhard von Gürken, designed the striking building shown on your screen. It serves as a train station in Berlin. It stands on an historically important spot in what used to be No Man's Land between East and West Germany. As you can see, it's quite a remarkable structure. It was also expensive to build. It took eight years and cost 700 million euros. To cut costs, Deutsche Bahn, the German railway company that owns the station, decided not to install the cathedral-like vaulted ceiling that von Gürken originally designed, but instead installed a cheaper, flat metal ceiling designed by another architect. Outraged, von Gürken brought a lawsuit. Altering his plans, he insisted, was equivalent to, quote, ripping pages out of a novel, end quote. The court agreed that his original design had been defaced and consequently that his rights had been violated. On that basis, the judge ordered the ceiling rebuilt, even though it would reportedly cost 30 million euros. Here's another case. The Canadian sculptor Michael Snow created this sculpture of a set of 60 realistic flying geese which hangs in Toronto's Eaton Center, which is a shopping mall. During Christmas season in 1982, the mall decided to hang a red ribbon around the neck of each goose as part of its Christmas display. Snow found the ribbons, as he said, quote, ridiculous, and quote. His intention, which had been to create a naturalistic image of birds-in-flight. Snow sought an injunction, compelling them all to remove the ribbons. Judge O'Brien of the Ontario High Court of Justice agreed with Snow's position. An artist's subjective intent concerning the purpose and character of his work of art deserves weight, the judge concluded, so long as its reasonable and Snow's intent was. The judge ordered the ribbons removed. The moral intuitions that underlie these and other rulings are different from the intuitions that underlie what we have called fairness theory. They're less concerned with rewarding labour and more concerned with respecting and protecting a special kind of emotional or psychic bond between artist and creation. Both von Gerken and Snow had been well compensated for their efforts. In that sense, they'd already been rewarded appropriately. But morality and consequently law, many people believe, should go further. Should recognize an artist continuing control over his creations. To do otherwise would be to cut at the artist's soul. The source in political philosophy of this approach is not Locke, but Kant and Hegel. I mean that in a special sense. As Cyril Rigamanti has argued, it's not clear that the legal doctrines underlying the cases that I just described were in fact influenced by either Kant or Hegel. Rather, when contemporary scholars and lawmakers look to philosophy for sustenance and guidance, when filling out their moral intuitions, they look to Kant and Hegel and more broadly to the personality theory of real property with which Kant and Hegel are commonly associated. As I did with the fairness approach, I'll begin with a brief review of the underlying theory of real property and then consider its implications for copyright. The heart of personality theory is the proposition that certain kinds of bonds with objects are crucial to human flourishing and consequently that the law should respect those bonds by creating and enforcing private property rights. Arguments of this sort come in many flavors. Put differently, over the centuries different philosophers have identified a wide variety of ways in which private property rights can contribute to human flourishing. They're listed on the map. The first of these is Peace of Mind. This is emphasized by Charles Freed in his book, Right and Wrong. Awareness that by using resources you are disadvantageing countless other people, some of whom are desperately poor, can be morally exhausting, Freed contends. Private property rights by assuring you that you own those resources provides relief from that painful and perhaps disabling emotion. The second argument, highlighted by Jeremy Waldron in his justly famous book, The Right to Private Property, is privacy. One of the functions of a property right is to provide you a place where you can either be alone or enjoy intimacy with others. The home protected by private property rights is a haven in a heartless world. The kind of control over information enabled by copyright can also help shield privacy as this has done, for example, for the reclusive but litigious author J. D. Solinger who aggressively pursues other writers, who encroach on his informational and artistic domain, for example by quoting his letters in a biography or more recently writing a sequel to one of his novels. The third theme, explored in detail by John Stuart Mill and Abraham Lincoln, is autonomy. The ability provided by property rights to control resources is necessary so the argument goes to enable persons to become independent and self-directing. The fourth, emphasized by the legal scholar Carol Rose, is that property rights facilitate self-realization as a social being. By owning and trading things, people help shape their social environments and establish their places in communities. Commerce, Rose contends, is humanizing, not dehumanizing. The fifth is perhaps the most famous and in current scholarship the most influential of the variants. It contends that property rights are crucial to self-realization as an individual, not as a social being. By owning and thus controlling objects, a person is able to assert his or her will and thereby to be recognized as a free agent by others. Authors who, building on the work of Hegel and Kant, explore this theme in depth include Margaret Jane Raiden, Justin Hughes, and again Jeremy Waldron. Here's an illustrative passage from Waldron's book. These philosophical themes form an important part of Hegel's conception of freedom and of the argument for private property that he develops on that basis. Self-assertion can be understood as a man's assertion of himself against nature. Natural resources by themselves are blankly material with no point or purpose of their own. If they are to have a point or purpose, they must be given one by being occupied by human goals and purposes. By investing a natural object with purpose, an individual becomes aware of the priority of will and a world composed largely of objects that cannot actively possess it. Thus, he ceases to regard himself as a mere animal part of nature and begins to take seriously the special and distinctive features of rationality, purpose, and will. The sixth argument is that property rights afford people security and leisure, thereby freeing them from the mind-numbing obsession with obtaining the means of survival and enabling them to pursue artistic and cultural callings. Waldron and George Fitzhugh fill out this theme. The seventh variant, explored by the British philosopher Th Green, in addition to Mill, emphasizes the importance to human flourishing of responsibility. Ownership and management of property cultivates virtues like prudence and foresight, which in turn are tied to full personhood. The eighth, which figures prominently in the writings of Raiden, centers on identity. Selfhood, Raiden contends, depends in part upon the ability to project a continuing life plan into the future, which in turn is fostered by property rights. You can readily see how this theme might arise with respect to artistic creations, at least unique artistic creations. Destruction or modification of those creations might well threaten the author's means of maintaining an identity, not just a reputation, but a sense of self. The ninth theme is not prominent in contemporary scholarship, but was once very important. The central idea here is that property rights enable owners to become virtuous citizens to participate in political deliberation, responsibly, and selflessly. Civic virtue, in turn, is central to personhood. This idea loomed large in the writings of classical Republican political theorists, including many of the people who contributed to the founding of the United States. Finally, control over resources, and in particular control over one's own creative products, may facilitate self-expression, which in turn is necessary for self-fulfillment. This idea can be found in the writing of some philosophers, like Th Green, and also in the work of many artists themselves. Here's an example.  The first major paper to carry his cartoons, The Seattle Times, dropped them because some readers denounced them as sick and offensive.  Despite his iconoclasm, Larson was a strong defender of a particular conception or kind of copyright. His stance is well expressed in an open letter, he wrote, criticizing his fans for copying his cartoons and posting them on their home pages. Years ago, I was having lunch one day with a cartoonist, Richard Gwinden, and the subject came up how neither of us ever solicited or accepted ideas from others. But until Richard summed it up quite neatly, I never really understood my own aversions to doing this. Quote, it's like having someone else write in your diary, and quote he said, and how true that statement rang with me. In effect, we drew cartoons that we hoped were the entertaining or at the very least not boring, regardless they would always come from an intensely personal and therefore original perspective. To attempt to be funny is a very scary, risk laden proposition. Ask any stand-up comic who's ever bombed on stage. But if there was ever an axiom to follow in this business, it would be this, be honest to yourself and most important, respect your audience. So in a nutshell, probably an unfortunate choice of words for me, I only ask that this respect be returned. And the way for anyone to do this is to please, please refrain from putting the far side out on the internet. These cartoons are my children of sorts, and like a parent, I'm concerned about where they go at night without telling me. And seeing them at someone's website is like getting the call at two in the morning that goes, uh, dad, you're not going to like this much, but guess where I am. Two aspects of this letter bear emphasis. First, the contention that public self-expression is very scary and risky, and the law should help create conditions that enable and encourage it. And second, the conception of one's artistic creations as one's children. The need to control those creations, Larson argues, is like the need to keep track of one's kids. When we examined Locke's theory of property, we saw that only some of the ways in which he fleshed out his argument seemed germane to intellectual property. The same is true here. In my tour of the ten variants of personality theory, I've tried to flag those that seemed most relevant to the interests of artists. I hope by now it's clear that those are numbers two, five, eight, and ten. To review, maintenance of artist's ability to control, at least in some ways, the creations is arguably necessary to respect, first, their privacy, next, their capacity to achieve individual self-realization, next, their identities, and finally, their opportunities for self-expression. The countries where belief in these connections had the greatest influence are located in continental Europe. Not surprisingly, those same countries have the legal systems that are most protective of artists. More specifically, in those countries, artists enjoy a set of entitlements commonly referred to as moral rights. In its full-blown version, the concept or system of moral rights encompasses six distinct entitlements. The first is the right of attribution, which is the right to be given credit for things you have created and not to be given credit for works that you did not create. The second is the right of integrity, which is the right to prevent the destruction or mutilation of one's creations. This is the best known and probably most important of the rights. It underlay the von Gerken and Snow cases we discussed at the outset of this section. The right of disclosure is the right to decide if and when to make one's works public. Suppose, for example, that a painter has been commissioned to create a portrait of a particular subject and has already been paid the contract price. The painter paints the portrait but is unhappy with it. The subject demands that it be delivered. May the painter refuse? In jurisdictions that respect the right of disclosure, the answer is yes. The painter will have to indemnify the person who commissioned the painting, perhaps by returning the contract price, but does not have to turn over the painting itself. The right of withdrawal, rarely exercised, is the right in principle to demand that works one has come to regret be returned. Suppose, for example, that Picasso came to regret his blue period. He could demand that their current possessors return all of those paintings. Again, an artist exercising this right would have to indemnify in advance the person's obliged to relinquish the works in question. The right against excessive criticism also rarely exercised in principle enables an author or artist to recover against a critic who abuses him or her. Finally, the douade suite is the right to collect a fee when one's works are resold, for example, when the current owner of one of your paintings resells it to another collector. Now, here's a brief reminder of ground we covered in the first lecture. As we discussed there, the Berne Convention purports to require member countries to recognize two of these moral rights, specifically the right of attribution and the right of integrity. But, as we saw, the Berne Convention lacks teeth, and the TRIPS Agreement, which does have teeth, does not incorporate the provision of the Berne Convention pertaining to moral rights. The net effect is that countries like the United States that are reluctant to recognize moral rights are as a practical matter free to evade their treaty obligations. Late in this lecture series, we'll examine what's known as the Visual Artists' Rights Act, which is the provision of U.S. copyright law that implements a quite truncated version of moral rights. For the time being, we're concerned not with the contours of the law, but with the theory that provides the best support for the moral rights system. And that theory, as I've suggested, is the personality theory. Scholars who follow this line contend that intellectual products are manifestations or extensions of the personalities of their creators. An artist defines herself in and through her art. The artist consequently is morally entitled to considerable control over her works. Why exactly? Partly because those injuries result in corresponding impairment of the creator's self, and partly because maintaining a connection to and control over her works is one of the ways in which an artist establishes and sustains an identity. The classic version of this argument focused on the interests and rights of the lone artist or author. Historically, the strongest version of personality theory was associated with Romanticism, which, as you know, celebrated solitary artistic geniuses, the novelist or painter in the Garrett projecting his or her vision onto paper or canvas. Nowadays, it is widely, although not universally, recognized that that conception of creativity is unrealistic or at least rare. Awareness that creativity is more often collaborative and that many artists incorporate not merely the ideas of their predecessors, but some of their predecessors' materials, has prompted some scholars, writing in the vein of personality theory, to argue for important adjustments to its doctrinal implications. Most importantly, if we wish to ensure that all persons have opportunities to engage in self-fulfilling creative activities, we may need to liberalize the rules governing their transformative uses of already existing artistic products. When we discussed the efforts of scholars to adapt Locke's labor-desert theory of real property in the context of intellectual property, I suggested that those scholars confronted serious difficulties, arising out of the ambiguity of key concepts in Locke's approach. The same is true of personality theory. Listed on the map are a few of the difficulties that scholars working this vein face. At the most primary level, it's not obvious whether an artist who invests herself in a work of visual art should be able to prevent others from imitating her creations. Some commentators, emphasizing the self-expression inherent in the making of the imitation, argue no, others disagree. For obvious reasons, this goes to the heart of copyright law. Assuming that an artist has the right to control copying of her creations, may she alienate that right? For example, may a composer assign to a music publisher all of her rights in her composition? As we'll see, this is conventional in most jurisdictions. Is it legitimate? Some scholars purporting to draw on the writings of Kant argue no, others seeking guidance from Hegel argue yes. Here's a more specific contemporary question. In many American states, celebrities enjoy the right to control and therefore the right to charge for commercial uses of their identities. Shown on the screen is one of a series of advertisements that provoked a famous application of that principle. In the late 1980s, the consumer electronics company Samsung introduced a set of what were intended to be humorous ads, ostensibly set into the future, each of which juxtaposed a hypothetical news headline with the depiction of a durable Samsung product. Here's the one that got Samsung into trouble. The hypothetical news story, which appears at the top of the ad, suggested that the game show Wheel of Fortune would still be broadcast in 2012. However, the letters on the game board would be turned, not by Vanna White, the actress who had become famous in this role, but by a robot, which would literally take White's place. Shown on this slide, on the left side is the real Vanna White, and on the right side, a blow-up of the image of the robot that appeared in the Samsung ad. White argued plausibly that the color of the robot's hair, the color and style of its dress, and above all, its pose, was intended to evoke her. She brought a lawsuit arguing that the advertisement constituted a commercial appropriation of her identity, and she prevailed. The theoretical question posed by this case in many similar cases is whether a celebrity's persona is a sufficiently important embodiment of personhood that it, like a painting, should be shielded against non-permissive uses. Some scholars argue yes, indeed regard the answer as self-evident. Others, like Michael Madow, disagree, contending, among other things, that a celebrity's fame typically owes as much to the media and the audience as it does to the creative contributions of the celebrity herself and thus should not be analogized to works like Van Gerken's train station or Snow's geese. These are hard questions. As I suggested when we were discussing the application of Locke's argument to copyright, it's very unlikely that the answers to such questions can be derived from a careful reading of the canonical texts in this theoretical tradition, namely the writings of Kant, Hegel, and so forth. The value of personality theory, I suggest, is not to provide us determined answers to modern problems, but rather to sensitize us to and to help us reflect upon the ways in which control over intellectual products can influence opportunities for individual or group self-fulfillment. In that spirit, here are a few additional ways in which personality theory has been, or might be applied, to suggest ways of thinking about specific issues that arise in contemporary copyright law. How long should a copyright last? The duration of a patent, as many of you know, is quite short, 20 years from the date of the patent application. As we'll see in most countries today, copyrights last much longer, typically for the life of the author, plus 70 years. If the principal function of a copyright is to reflect and protect an author's personhood interests in his or her creations, perhaps that term is too long. Perhaps it should last for no more than the life of the author. Or, more narrowly, perhaps moral rights should expire with the death of the author. Another example, as we'll discuss in later lectures, many jurisdictions, including the United States, have rules that confer upon employers the copyrights in the works prepared by their employees. These rules are highly controversial. One ground in which they are commonly criticized is that they fail to respect the employee's personhood interests in their creations. A related criticism of contemporary copyright law that arguably is also fueled by personality theory is that several doctrines in combination inhibit the ability of creative people to remain economically independent and thus in control of their creative activities and products. Copyright law, in other words, is biased toward the interests of companies and fails adequately to support intellectual entrepreneurs. One of the sources of that bias, so it's argued, is the set of procedural rules that govern copyright lawsuits and the remedies available to successful litigants. Those rules operate, as we'll see, to the advantage of parties with deep pockets and emotional fortitude, neither of which is typically true of the kind of autonomous artists that are celebrated by personality theory. Another example, it's widely thought that, in general, artists are not good at business and thus tend to sign away their rights too quickly or for too little money. Most copyright systems contain some rules designed to protect artists or their families against the consequences of their folly or ignorance. Some scholars, drawing in part on personality theory, argue that those protective dioceses are insufficient and should be strengthened. Finally, as I suggested a minute ago, some scholars contend that if all persons are to have opportunities for self-fulfillment, analogous to those enjoyed by a Picasso or a Wordsworth, copyright law should be amended to increase people's freedom to make derivative uses of existing creative works, such as photographs, films, and sound recordings. This might be achieved through adjustment of one of the major defenses to copyright infringement, namely the doctrine of fair use or fair dealing, which will be considered in detail late in the course. In countries like the United States that currently provide expansive protection for moral rights, the same adjustment might require some curtailment of the famous right of integrity. This last possibility is perhaps the most counterintuitive and eye-opening of the reform proposals we've considered thus far. It entails invoking personality theory to qualify one of the primary conventional doctrinal embodiments of that same theory. By the end of this series of lectures, I hope you are in a position to make your own judgment concerning the persuasiveness of this proposal. So that's it. That concludes our examination of the first two of the four theories of copyright, namely fairness and personality-based theories. In the next lecture, I'll discuss the subject matter coverage of copyright, what kinds of creations are protectable, and what kinds are not. Then in the lecture after that, I'll return to copyright theory and take up what has become the most influential of the four approaches, namely the utilitarian-based welfare theory. This, as we'll see, looms even larger in policy and law than the arguments we've addressed today. Thank you.


mission number one and two and three was to get away to get Aaron Judge back on the team and he's back. That was the most important thing. Obviously they paid a premium and they knew they were going to have to. The market exploded. How Steinberger got himself personally involved talking to Aaron Judge from Italy and he got it done. And really if anything else didn't happen during the season so you know what they did with Rodin and everything if they only got Judge back you'd have to consider it partially a very very successful offseason. If they don't get Judge I think everything is in flux. When I reflect upon this offseason one of the prisms that I'm going to view it through is the seven minute period when I was in San Diego where there was a thought that Aaron Judge was going to the Giants. John Heyman had tweeted that he later retract retracted the tweet.  So I couldn't agree with Michael Moore that you had to make sure that you sign Judge and seeing life on the other side Michael for that short period of time where it looked like he might not be Yankee. That was not a place where anybody in the Yankee world wanted to be. And when you look at it I think sometimes we all lose sight. You know we're talking about the strategic ways to put together a baseball team. The Yankees are in the entertainment industry and their most entertaining product is Aaron Judge. Three million Yankee fans that went through the turnstiles at the stadium that's who they wanted back. You had to make that happen almost at whatever price and they got it done. And for those seven minutes and went a little beyond that but you always talked. Are they smart enough to have a plan B. Yes. They won't even get near plan B or plan C. No way. I'm proud Bob that several times on this hot stove show when you asked me what plan B was I said no there is no plan B plan A is Aaron Judge and you don't want to have the meeting where you're talking about plan B. He had 62 home runs. He's the reigning A L M V P. I interviewed Aaron Boone today and we'll listen to that later in the show. But before I could even finish a question about Aaron Judge he had this huge smile on his face. Judge means so much to the Yankees will mean so much to the Yankees. Now you know that you have number ninety nine in right field that makes the fans happy and it makes a lot of people in the Yankee universe happy. And you know you might have blanched when they signed a guy who's going to be thirty one this season to a nine year deal. But then you see how the market just exploded after that. And Xander Bogarts get twelve years of 13 year deals. Deals that take guys into their early 40s. The nine year deal for judge doesn't seem like it's a stretch anymore because that's what the market was. By the way the one move that was really interesting that kind of now flies under the radar we'll get Carlos we're done in a minute was the fact that you've got judge that splashy got redone that splashy Anthony Rizzo coming back and kind of quickly coming to terms on his deal sort of set the table for everything else. It did set the table. It was funny because during the judge press conference when we were interviewing him I said you know you dropped a little couple of bread comes during the year. He said bread comes. I gave you guys the whole loaf. So he was pretty much telling us he wanted to go back to the Yankees. And I felt that he and Rizzo are so close that once Rizzo signed that quickly Rizzo probably had insight into the fact you know all things being equal judge wants to come here because you know judge was not going to take a reduced amount to come to the Yankees but he probably told Rizzo if they're even with what everybody else is I'm going to come back and I think that Rizzo signing probably showed us that. And Michael you just talked about some of the deals the 9 the 11 the 13 getting Rizzo back as quickly as the Yankees did that looks like one of the best moves of the off season right now for what they had to add to bring back a guy who's so reliable defensively who fits the Yankees like a glove. I love the way he stands so close to the plate challenging pitchers to do what he wants them to do. I don't think we can underestimate the friendship as Michael and you talked about Bob that he and judge have and now you have two very reliable players in that lineup.


What's up everybody, Jason here for jaspyskatespakes.com. We just sold out a little filler here. That's giving away 11 Jumbo Picker Team 3 teams away with this 2021 Series 2 One Box Blaster number two. And again, we're giving away eight free spots. So again, here are the customer names I bought in. We're randomizing the names. Top eight get free extra spots. We'll paste them. They won't have the names and teams. They won't have the original list with the winners there at the end. And then of course, you'll match up with a team. Number one at the top goes to the A's all the way down to the blue Jays at the bottom. And here we go guys, let's do the filler. Let's do the giveaway first. So that will be for both. Four and a two, six times. Good luck. One, two, three, four, five, and six. Six times, four and a two, six. Jeff, Jason, Michael, Joe, Jason, Jeff, Cody, and Adam. Congratulations. Top eight free spot, free spot, free spot, free spot, free spot, free spot, free spot, free spot, free spot, and free spot. Now that should make 30 for the list of names and teams. Then I'll save this one for a little bit later. And six here, one, two, three, four, five, six. Adam, Donna Tristan. Two, three, four. White Sox gone to the Dodgers. All right again guys, stick to what you got of course, no trading. All right guys, that's pretty much enough time to see your teams. Now let me quickly, just gotta focus my camera really quick like always. I don't know what you're expecting, a blaster. I don't know if I've ever ripped a series of two blasters. A Harper, that looks really cool. We got a Brooks Robinson, little commemorative anniversary medallion patch. That's for the Orioles. There's a Shohei, Bobby Delback, that's a Cabrion Hayes, Ravicky. And a Andy Young, little foil. And then a number to 2021. Little Jose Ramirez. All right, there you go guys, quick little blaster in here. All right, now let's switch scenes and let's do the main part of this giveaway guys, which is matching up on a team in the top 11. So again, here we go guys, here's the dice roller, here's the customer names. Roll it, it's a six and a two, that's for eight times. Top 11, get a team guys, top 11. Six and a two eight. One, two, three, four, five, six, seven, and eight. Eight times, eight, eight. All right, so top 11, so Cody, Omar, you guys are in. Adam, Triss, Jeff, Michael, Jason, Jeff, Michael, Adam, and Copperman at the top with your free spot. So I'm gonna post in everybody's name here, but only the top 11 get a team guys. Great, Radima's free spot. Look at that, A's and the Diamondbacks. Then Michael, you get the Reds, Jeff with the Royals, Jason with the Marlins, Michael with the Dodgers, Jeff with the Angels, Triss with the Brewers, Adam with the Rockies, Omar with the Astros, and then Cody with the Blue Jays. Unfortunately, they're not from Jeff to Mark. Unfortunately, not in guys, they should give it a shot, but we do have more breaks in the store if you guys wanna get in on those, jaspyscasebreaks.com.


Good morning, everyone. Let's get started. Thank you, you at night for following me on Twitter already. Hi, I'm Shubham. I work at Microsoft and I'm a maintainer of Dappers JavaScript SDK. So this morning, we'll talk about how we can write high throughput applications using Dapper. So we'll start with seeing how some asynchronous messaging patterns work in general, and then how you could use Dapper with your PubSub needs. Then we'll look at the newest addition to Dapper's PubSub block, double KPIs. So yeah, let's get started. Okay. So this is how a normal asynchronous messaging application looks like. You have your publisher, you have a few subscribers, you have a Kafka PubSub broker in this case. So your card can publish events onto Kafka, and then Kafka sends those events to the subscribers. In this case, it's shipping and notification and they can do something with that event process that and so on. You could also have an alternate model where you have multiple publishers. So you have multiple publishers who generate events, send it to Kafka, and then you have a single subscriber listening for those. You could have MS2 and any combination basically of publishers and subscribers. You could also do something like this, where you have multiple replicas of the same subscriber, and then each replica helps in load balancing your events. So if you have, imagine if you have a lot of events, right? And you want to process them. So you could have multiple replicas doing that on your behalf. So for those of you who don't know about Dapper, Dapper sits as a sidecar, and let's see how you could do a simple operation like publish and subscribe using Dapper. So each application has its own Dapper sidecar in the scenario. And what the cart application needs to do is send this request to Dapper. So Dapper is a sidecar on the port 3500. It's a well-defined port. And all you need to do is do a publish slash Kafka slash order. So publish is the operation. Kafka is the name of your broker. And order is the topic name. And then you could send your data. And Dapper will then send this data to the PubSubQ. It'll find where Kafka is. It'll send the data to that. It'll listen for data from the PubSubQ as well. And then forward those data to the subscribed applications. And in this case, Dapper can use any components it supports. So on the top, on the bottom right, you have a list of supported components. And Dapper supports a lot of PubSub components today. So you can check it out and note that your application does not need to change. So your application does not know if it's Kafka, if it's RabbitMQ, if it's RedisCache. All you need is this URL right here. Can I use a pointer? Yeah, this URL right here. So the PubSub name can be parameterized or you could just manage it on your own. And then Dapper knows how to talk to SNS or Kafka or Azure Service Bus. So let's look at some of the highlights of the Dapper's PubSub ecosystem, right? So Dapper ensures that you have at least once delivery. It ensures that each application that is published is also delivered to your subscribers at least once. It has some concepts of consumer groups. So Dapper automatically creates consumer groups on your behalf. It also allows you to have a competing consumer group patterns and we'll look at these patterns in our demo really quick. You also have built-in resiliency. So with Dapper when you go out to do PubSub operations, you get retries, timeouts, circuit breakers out of box. So this is how it looks like, right? So you get resiliency on both the inbound and outbound part of things. And yeah, so Dapper talking to publishing data on to the broker and then Dapper sending data to your subscriber, it's all resilient. And then even after resiliency, you get a dead letter topic support. If your resiliency policy is still failed to deliver some message, you have built-in support for dead letter topics. And finally, you have bulk messaging which is recently introduced and we'll talk about that in the future slides. Also note that on the right side, we have something called a component spec. So this is how you tell Dapper that, hey, I have a Redis component which is of type pubsub.redis and it's located at this host. This is the password and that's how you connect with it. So that's all you need to connect to Redis and you could just swap it out with a different component. In this case, it's an Azure Event Hub component and the metadata changes and that's it. So that's all you need to do to tell Dapper how to talk to these components. So yeah, let's look at a really quick demo. Let me just stop sharing this presentation. Okay, I hope you can see it. I'll zoom it in a bit. Yeah, okay. So we'll just start looking at really simple operations, how to publish some data onto PubSubBroker, how to subscribe to that data. So for publishing, let's look at the HTTP way of it first. So I'm not using any Dapper SDKs. We'll look at that in a bit. But if you want to post the data to Dapper, all you need to do is have this URL. So in my demo, in this case, Dapper runs as a process locally in my computer. So I could just go and tell, hey Dapper, just publish this data onto a PubSub called PubSub. So just if you install Dapper via the Dapper CLI, you get this PubSub component inbuilt and Redis is already spun up for you. So all you need to do is talk to this PubSub component and let me show you how it works. Let me just, so what I can do is I can just start a, I can just start a publisher app like this. So I have an app ID and I have a Dapper HTTP port, which is 3,500 in this case. And I just want to start my Dapper. And I don't have any application in this case. It's just a sleep. And we'll just use the HTTP call directly to talk to Dapper. So yeah. So this has, like my Dapper is now up and running. And what I can do is just send this request. So it says 204 no content, which means that it was able to publish everything. And what I have is a GUI. Oh, it's this one. Yeah. So let me open that really quick. And I can connect to my local Redis. And now I can see this data that's being published already. So let me just show you in a different tab here. So if I format this. Yeah. So if you see, this is the data that got published and it's a cloud event. So what I published was this actual data and Dapper talks in cloud event by default in PubSub. So this is a cloud event. You have things like trace ID or trace parent, the cloud event ID itself and so and so. So this is a simple example of publishing. And I could also like not use a cloud event. So in case you have subscribers that don't speak in cloud events, you could go ahead and just publish without it. So all you need is this extra query parameter called raw payload is true. And if I send a request like this and just refresh this. So this one is plain JSON. There's no cloud event here. So yeah, that's how you could like subscribe. And if I also want to, that's how you could publish. Sorry. And if you also want to subscribe, I have a simple subscriber application written here. This is in Python and there's no extra dependencies. It just uses the default Python web servers. And there are two important parts. First one is this, which is dapper slash subscribe. So whenever dapper starts, right, it goes to your application and it goes to the same point and ask, hey, application, which subscriptions do you want to subscribe to? And what I respond with is this. So I have a PubSub and the topic name is examples and this is the route. And dapper will then start sending me messages on this route. In this example, I'm just printing that out. So that's it. And I'm sending back a success status. You could also send back a, you know, maybe a retry or a drop to dapper. But yeah, in this example, I'm sending a success. So let me just try to run this one really quick. So app ID, yeah. So the protocol is STTP, the port on which my server is running is 3000. And the command is just Python subscriber dot pi. And yeah, there you go. So a few things first. So if you look at it, first this dapper slash subscribe was called and then dapper says I'm subscribed to these topics. So the topic name is examples and PubSub name is PubSub. And then I receive these messages. So this is the one without cloud event and this is the one with cloud event. So yeah, this is how simple publishing subscribe works. Let me stop these and minimize this. So let's also look at another example where I'm using the JavaScript SDK. So you saw how to do it using STTP but directly. But if you want to use SDKs, it makes a life simpler. So let's look at this example. We have two applications. One is the publisher service. If you look at package.js on it just has one dependency called dapper. There's no other dependency on any Kafka SDK or any latest SDK, but there's only one on dapper. And this is my index.js file. So what I do is I create an infinite loop. I create a random order and I publish it. So this is the only thing I need to do. PubSub.publish name, PubSub name, topic name and the actual data. So that's it. And let's also look at the subscriber application. Same for this one. So there's only one dependency dapper. And if you look at the index.js, this is a really an upgrade from the STP version. So if you look at this, all you need to do is have a subscribe method and this is a callback. So this actually, this is a place where you get your message. So in this example, I'm just logging it out, but you see there's no dapper slash subscribe. The SDK takes care of that for you. So yeah, it's really simple and easy to write your own SDK version of it. And so in this demo, I'll be running these on Kubernetes. So I have a local kind cluster setup. And if I show you, I should have, let me zoom out a bit. Yeah, so I have the dapper control plane already up and running. I have Kafka and Redis applications here running and this is a cube system. So let me just try to really quickly deploy my sample application. So first I deployed the Redis component and this is nothing but a configuration that shows up here. And I can also show you that it just, so this just points to the Redis that exist in my cluster already. So the host and password, and this is coming from a secret store, by the way, instead of using a password directly. So that's it. And let me also apply the publisher and subscriber configurations now. So these are Kubernetes deployment specs. And so there we go. Sorry. Yeah, so yeah, they're up and running. We should be able to see them here now. Yeah, okay. This is up and running. So let's look at the logs and see what's happening inside. So if I go and do a cube tail, let me just split this. So yeah, the publisher is up and running. It's already publishing data already. And if I look at the subscriber, oh my bad. Yeah, so you see that the subscriber is receiving data and publisher is publishing data. This is running on Kubernetes. Great. Let's look at a few more things, right? So what I can do is I can scale up my number of replicas. So let me do something like, so what I want to do is have three replicas for my subscriber application, and let's just do that. So it got scaled up. And if I now go to, if I now start this logging again, I'll be able to see my replicas. So my replicas are starting now. And you could see that they each got a subscription up and running. So now these replicas should load balance my events. So if you look at this, different replicas are receiving events now. And that's as simple as that. So when you have different replicas, Dapper automatically load balances the load for you. And in parallel, I could also start another subscriber service identical. So if you have, let me show you really quick. Yeah. When you have a new subscriber running, it behaves as a queue basically. It behaves as a topic and it sends the same event to both the subscribers. So I could just do this. And this is getting all the events now. So both the subscribers are getting their own events basically. And the one with multiple replicas is getting load balance. So yeah, this is how like, this is the competing consumers pattern where you get different, where different replicas get one message each and then the consumer group pattern where different application IDs get the same events. So yeah, this is how it works. And now what I can do is a really interesting thing that people often do. Say I want to use Kafka instead of Redis. All this while I was using Redis. But if I want to use Kafka, all I want to do is apply a Kafka spec. So now if I see, I have two components Kafka and Redis and I can remove Redis for that matter. Let me go ahead and do that. Yeah, not everything, but just the Redis one. And I have deleted Redis now. So what I want to do is just let my applications know that, hey, the name of the PubSub has changed and instead now use Kafka. So earlier they were pointing to Redis and now I have it updated the environment variable to use Kafka. So that's all I need to do. And if I look at the logs again, right? By the way, it should have already restarted my application. So if I look at the logs again, yeah. Okay, so now this is running on Kafka and listening to everything and same for publisher. I can just do this cube tail and it's publishing on Kafka. And how I can confirm is by taking this ID and going in like this. So yeah, if you can see this API call, this is going to Kafka. So it's as simple to switch components. You don't need to learn how Kafka works. You don't need to learn how Redis works. All you need to do is just let Dapper know I want to talk to these components. So yeah, that was it for the demo for now and let me jump back to this. So yeah, now we can look at some of the new improvements that we introduced in the Dapper PubSub block and two major parts of it. So first is the API itself. So using the bulk API, what you can do instead of publishing events one by one, you could publish like a bulk of events to Dapper. And then what Dapper does is it forwards the events in parallel published request to the PubSub queue. Similarly, while receiving, Dapper will receive events for you, buffer them for some time and then send it as a bulk to your subscribing app. And this improves the latency between the application and the Dapper by a lot. And also Dapper can make parallel published request now, which is even faster than making a single request. Furthermore, if the PubSub component also supports bulk, you could also optimize it further. So the Dapper sidecar can also talk to the broker as in bulk request. It can be on the publish end, it can be on the subscribing end. Just to give you some highlights, it's available as an alpha API from 1.10, which will release a few weeks back. It's highly performant because now you have optimized Dapper to application, as well as Dapper to broker communication with the bulk APIs. It's non-transactional. So if you are sending, say, 1000 messages, maybe 990 can fail and 10 can pass or the other way, right? So what Dapper does is it lets you know which one failed and you can retry them. And there's no guarantee for any ordering if you're sending 100 messages in bulk. They can be received in any order and sent in any order. And what you have is unique IDs by which you can identify your messages. So yeah, that helps you. And let's really quickly look at how the PubSub, the bulk APIs work. So let me, I'll just minimize this. Yeah, so like the HTTP example for PubSub, I have this bulk API here. So it's a simple HTTP request. So this is an alpha API. It uses publish slash bulk. And this is the name of the PubSub as usual. This is a topic name. Now notice the content. And in here, I have an entry ID. This is the unique message ID I need to tell Dapper for my message. And this is the actual message and the type, the content type. So I could send text as plain or JSON or cloud event, whatever I want. And let's just spin up a Dapper sidecar. So I just copy this command. And let me try to run this. So it says 204, no content again. And it should have published both the messages. And I have my medis GUI to check that. So I got this new topic bulk examples. And these are the two messages. So this is the first message, this is the second message. And I got both of them in my PubSub queue. And I could also publish without a cloud event. So I could just send this. Again, I got a 204. And if I refresh, I got two more messages. Now they are not wrapped in cloud event. So this is how the bulk publish API works. And similarly, I won't be running subscriber, but you can just check how easy it is. It is exactly the same as the other subscriber. But you have a bulk subscriber enabled true. So this tells the dapper that receiving bulk. And then when you actually get the message, you have to kind of parse it and figure out where's the entry ID event and what are the status of the, and respond back with some statuses. And this is where the SDK comes into picture and makes your life really simpler. So if I go back to my demo. So this is the only change required to start using the bulk API via the JavaScript SDK. Earlier, we would be publishing it one by one. And now we'll do a publish bulk. That's it. Instead of sending one message, you send a bulk of messages and JavaScript API, it's really simple. For subscribe, it's even simpler. So if you notice this, the only changes, the subscribe method is now called subscribe bulk. The callback also remains the same. So in the callback, you get, you still get messages one by one, but behind the scenes, it's optimized for you. It's being received in bulk. So yeah, that's the best part. So your callback, your callback remains exactly the same when you migrate to using bulk API. And we did, we did try it out. We did see how fast it is. And it was phenomenal for publish. You could already see the P95 became 55 milliseconds from 176 in this performance test. And all these tests are on the dapper repo. You wanna go and check. And for bulk subscribe, again, we did a similar test and you could see the latency really dropping the P95 and P50. And this is a graphical comparison if you want to look at it. And yeah, that was for my talk. And thank you so much. And you could go and check out the dapper repo here and join our Discord community. Follow us on Twitter. And yeah, we have community calls. You can come and check out those as well. So here are some links and here's the QR code for the presentation. I'll be sharing the presentation as well as the code shortly. Yeah, on schedule, schedule app. Yeah, thank you. Any questions? Yeah, sure. There's a mic. You can take the mic and ask. Yeah. All these features that you present are also available in Azure container apps. Yeah. Okay. Are you in the dapper integration on Azure? Yes, yes. Yeah, it is. Second question is, are you planning that I can use, I can replace Kafka completely and use a pop-ups pattern with dapper all together? Yeah, in theory you could. So unless you are extremely invested in Kafka, unless you are doing really specific fine tunings, you could come and use dapper. And there have been users who have reported really great performance with the bulk API, comparing it with the Confluent SDK directly. And it was really great. So yeah, you could. And but if you are really into Kafka, then probably you're better with Kafka. Thank you. Yeah. Thank you for the enlightening talk. You mentioned that there is no in-order processing. Is it also true if you're ascending to the same topic or is it a general theme? Yeah, it is in general. Like the order is not preserved in bulk APIs. Yeah. Thank you. I was wondering if you can use the bulk functionality separate. So for example, if you can use the bulk publish, but still use the single consume part. Yeah, you can do that. Absolutely. Those are orthogonal APIs. So you could use mix and match. Okay. Yeah. Okay, thank you. Sure. Thank you. Who is acknowledging the messages or in case of Kafka committing the offsets? Especially in the case of bulk APIs. Thank you. Yeah. So the application is responsible to respond back with the status. And then dapper responds back to Kafka and that's the actual checkpointing. So without that, Kafka will keep retrying and dapper will again keep retrying. Yeah. Any other questions? I have a question about it. Non-transactional problem with the bulk messaging. Yeah. So that is non-transactional between dapper and Kafka or dapper between the other dapper that we're communicating with applications. So generally when your application is talking to your dapper instance, right? It is non-transaction. Now the underlying implementation might vary. In some case, maybe the underlying implementation is transactional, but on the dapper to application level it's always non-transactional. So that's for the application like to deal with it. Yeah. Okay, thank you. Yeah, sure. Like one example of this is maybe, I don't know if it's GCP batch or something but there's one component that only has transactional support. But still dapper treats it as non-transactional because of the API. So the API does not guarantee that. Yeah. Hey, on the bulk consumption, does it also split it like in chunks and you can have multiple consumers at the same time or the entire bulk is just given to one of the consumers? You could have multiple consumers. So you could again go back and have this pattern somewhere. So you have multiple consumers and both of them are getting their own bulk. Yeah, but if I publish a bulk, let's say we have a hundred elements inside of it. Will it be a hundred elements given to only one of the replicas or does it somehow split the bulk? Yeah, if you have different replicas, then yeah, you will get different bulk for each replica. Like different set of messages for each replica. You have to load balance. The bulk is split in chunks too and given somehow load balance to all of them. That's correct. So when you do a bulk publish, that bulk gets published and then that's it. On the subscribing, it's a fresh set of messages in a bulk. Okay, it's a subset of that. And on the, when we publish it and if the set is too high, what should we take into considerations? Exactly. So there are some metadata that you could see and each component has its own maximum bulk limit. So that way you'll have to figure out what component you are using. And there's also on the subscribing and also there are some parameters you could find too. So yeah, it depends on what component you're using. I got it. Thank you. Sure. Any other questions? Okay. Thank you folks. Thank you. Thank you for listening.