<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Message Queues on Brave New Geek</title><link>https://bravenewgeek.com/tag/message-queues/</link><description>Recent content in Message Queues on Brave New Geek</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 29 Oct 2020 15:05:18 -0500</lastBuildDate><atom:link href="https://bravenewgeek.com/tag/message-queues/index.xml" rel="self" type="application/rss+xml"/><item><title>Liftbridge 1.0</title><link>https://bravenewgeek.com/liftbridge-1-0/</link><pubDate>Tue, 28 Apr 2020 13:12:21 -0500</pubDate><guid>https://bravenewgeek.com/liftbridge-1-0/</guid><description>&lt;p&gt;&lt;img loading="lazy" src="https://bravenewgeek.com/wp-content/uploads/2020/04/liftbridge_full-1024x228.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://liftbridge.io"&gt;Liftbridge&lt;/a&gt; has evolved a lot since making the first commit in October 2017, but the vision has remained the same: provide a message-streaming solution with a focus on simplicity and usability. This is demonstrated through many of the design and implementation decisions. A few examples include the use of NATS as the messaging backbone, avoiding heavy dependencies on runtimes like the JVM and external coordination systems like ZooKeeper, compiling down to a small, single static binary, opting for a gRPC-based API, and relying on plain YAML configuration. Liftbridge is written in Go, and the code is structured with the hopes that it’s relatively easy for someone to hop in and contribute to the project.&lt;/p&gt;</description></item><item><title>Introducing Liftbridge: Lightweight, Fault-Tolerant Message Streams</title><link>https://bravenewgeek.com/introducing-liftbridge-lightweight-fault-tolerant-message-streams/</link><pubDate>Fri, 27 Jul 2018 17:42:49 -0500</pubDate><guid>https://bravenewgeek.com/introducing-liftbridge-lightweight-fault-tolerant-message-streams/</guid><description>&lt;p&gt;&lt;a href="https://github.com/liftbridge-io/liftbridge"&gt;&lt;img loading="lazy" src="https://bravenewgeek.com/wp-content/uploads/2018/07/liftbridge.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://twitter.com/tyler_treat/status/1019281381493526529"&gt;Last week&lt;/a&gt; I open sourced &lt;a href="https://github.com/liftbridge-io/liftbridge"&gt;Liftbridge&lt;/a&gt;, my latest project and contribution to the &lt;a href="https://www.cncf.io/"&gt;Cloud Native Computing Foundation&lt;/a&gt; ecosystem. Liftbridge is a system for lightweight, fault-tolerant (LIFT) message streams built on &lt;a href="https://nats.io/"&gt;NATS&lt;/a&gt; and &lt;a href="https://grpc.io/"&gt;gRPC&lt;/a&gt;. Fundamentally, it extends NATS with a &lt;a href="https://kafka.apache.org/"&gt;Kafka&lt;/a&gt;-like publish-subscribe log API that is highly available and horizontally scalable.&lt;/p&gt;
&lt;p&gt;I’ve been working on Liftbridge for the past couple of months, but it’s something I’ve been thinking about for over a year. I sketched out the design for it last year and &lt;a href="https://bravenewgeek.com/building-a-distributed-log-from-scratch-part-5-sketching-a-new-system/"&gt;wrote about it&lt;/a&gt; in January. It was largely inspired while I was working on &lt;a href="https://github.com/nats-io/nats-streaming-server"&gt;NATS Streaming&lt;/a&gt;, which I’m currently still the second top contributor to. My primary involvement with NATS Streaming was building out the early data replication and clustering solution for high availability, which has continued to evolve since I left the project. In many ways, Liftbridge is about applying a lot of the things I learned while working on NATS Streaming as well as my observations from being closely involved with the NATS community for some time. It’s also the product of scratching an itch I’ve had since these are the kinds of problems I enjoy working on, and I needed something to code.&lt;/p&gt;</description></item><item><title>Building a Distributed Log from Scratch, Part 5: Sketching a New System</title><link>https://bravenewgeek.com/building-a-distributed-log-from-scratch-part-5-sketching-a-new-system/</link><pubDate>Tue, 23 Jan 2018 12:08:53 -0600</pubDate><guid>https://bravenewgeek.com/building-a-distributed-log-from-scratch-part-5-sketching-a-new-system/</guid><description>&lt;p&gt;In &lt;a href="https://bravenewgeek.com/building-a-distributed-log-from-scratch-part-4-trade-offs-and-lessons-learned/"&gt;part four&lt;/a&gt; of this series we looked at some key trade-offs involved with a distributed log implementation and discussed a few lessons learned while building NATS Streaming. In this fifth and final installment, we’ll conclude by outlining the design for a new log-based system that draws from the previous entries in the series.&lt;/p&gt;
&lt;h3 id="the-context"&gt;The Context&lt;/h3&gt;
&lt;p&gt;For context, &lt;a href="https://nats.io/"&gt;NATS&lt;/a&gt; and &lt;a href="https://nats.io/documentation/streaming/nats-streaming-intro/"&gt;NATS Streaming&lt;/a&gt; are two different things. NATS Streaming is a log-based streaming system built on top of NATS, and NATS is a lightweight pub/sub messaging system. NATS was originally built (and then open sourced) as the control plane for Cloud Foundry. NATS Streaming was built in response to the community’s ask for higher-level guarantees—durability, at-least-once delivery, and so forth—beyond what NATS provided. It was built as a separate layer on top of NATS. I tend to describe NATS as a dial tone—ubiquitous and always on—perfect for “online” communications. NATS Streaming is the voicemail—leave a message after the beep and someone will get to it later. There are, of course, more nuances than this, but that’s the gist.&lt;/p&gt;</description></item><item><title>Building a Distributed Log from Scratch, Part 4: Trade-Offs and Lessons Learned</title><link>https://bravenewgeek.com/building-a-distributed-log-from-scratch-part-4-trade-offs-and-lessons-learned/</link><pubDate>Thu, 18 Jan 2018 16:01:13 -0600</pubDate><guid>https://bravenewgeek.com/building-a-distributed-log-from-scratch-part-4-trade-offs-and-lessons-learned/</guid><description>&lt;p&gt;In &lt;a href="https://bravenewgeek.com/building-a-distributed-log-from-scratch-part-3-scaling-message-delivery/"&gt;part three&lt;/a&gt; of this series we talked about scaling message delivery in a distributed log. In part four, we’ll look at some key trade-offs involved with such systems and discuss a few lessons learned while building NATS Streaming.&lt;/p&gt;
&lt;h3 id="competing-goals"&gt;Competing Goals&lt;/h3&gt;
&lt;p&gt;There are a number of competing goals when building a distributed log (these goals also extend to many other types of systems). Recall from &lt;a href="https://bravenewgeek.com/building-a-distributed-log-from-scratch-part-1-storage-mechanics/"&gt;part one&lt;/a&gt; that our key priorities for this type of system are performance, high availability, and scalability. The preceding parts of this series described at various levels how we can accomplish these three goals, but astute readers likely noticed that some of these things conflict with one another.&lt;/p&gt;</description></item><item><title>Building a Distributed Log from Scratch, Part 3: Scaling Message Delivery</title><link>https://bravenewgeek.com/building-a-distributed-log-from-scratch-part-3-scaling-message-delivery/</link><pubDate>Mon, 08 Jan 2018 16:10:40 -0600</pubDate><guid>https://bravenewgeek.com/building-a-distributed-log-from-scratch-part-3-scaling-message-delivery/</guid><description>&lt;p&gt;In &lt;a href="https://bravenewgeek.com/building-a-distributed-log-from-scratch-part-2-data-replication/"&gt;part two&lt;/a&gt; of this series we discussed data replication within the context of a distributed log and how it relates to high availability. Next, we’ll look at what it takes to scale the log such that it can handle non-trivial workloads.&lt;/p&gt;
&lt;h3 id="data-scalability"&gt;Data Scalability&lt;/h3&gt;
&lt;p&gt;A key part of scaling any kind of data-intensive system is the ability to partition the data. Partitioning is how we can scale a system linearly, that is to say we can handle more load by adding more nodes. We make the system &lt;em&gt;horizontally&lt;/em&gt; scalable.&lt;/p&gt;</description></item><item><title>Building a Distributed Log from Scratch, Part 2: Data Replication</title><link>https://bravenewgeek.com/building-a-distributed-log-from-scratch-part-2-data-replication/</link><pubDate>Wed, 27 Dec 2017 12:26:55 -0600</pubDate><guid>https://bravenewgeek.com/building-a-distributed-log-from-scratch-part-2-data-replication/</guid><description>&lt;p&gt;In &lt;a href="https://bravenewgeek.com/building-a-distributed-log-from-scratch-part-1-storage-mechanics/"&gt;part one&lt;/a&gt; of this series we introduced the idea of a message log, touched on why it’s useful, and discussed the storage mechanics behind it. In part two, we discuss data replication.&lt;/p&gt;
&lt;p&gt;We have our log. We know how to write data to it and read it back as well as how data is persisted. The caveat to this is, although we have a durable log, it’s a single point of failure (SPOF). If the machine where the log data is stored dies, we’re SOL. Recall that one of our three priorities with this system is high availability, so the question is how do we achieve high availability and fault tolerance?&lt;/p&gt;</description></item><item><title>Building a Distributed Log from Scratch, Part 1: Storage Mechanics</title><link>https://bravenewgeek.com/building-a-distributed-log-from-scratch-part-1-storage-mechanics/</link><pubDate>Thu, 21 Dec 2017 15:54:17 -0600</pubDate><guid>https://bravenewgeek.com/building-a-distributed-log-from-scratch-part-1-storage-mechanics/</guid><description>&lt;p&gt;The log is a totally-ordered, append-only data structure. It’s a powerful yet simple abstraction—a sequence of immutable events. It’s something that programmers have been using for a very long time, perhaps without even realizing it because it’s so simple. Whether it’s application logs, system logs, or access logs, logging is something every developer uses on a daily basis. Essentially, it’s a timestamp and an event, a &lt;em&gt;when&lt;/em&gt; and a &lt;em&gt;what&lt;/em&gt;, and typically appended to the end of a file. But when we generalize that pattern, we end up with something much more useful for a broad range of problems. It becomes more interesting when we look at the log not just as a system of record but a central piece in managing data and distributing it across the enterprise efficiently.&lt;/p&gt;</description></item><item><title>FIFO, Exactly-Once, and Other Costs</title><link>https://bravenewgeek.com/fifo-exactly-once-and-other-costs/</link><pubDate>Wed, 02 Aug 2017 10:14:20 -0500</pubDate><guid>https://bravenewgeek.com/fifo-exactly-once-and-other-costs/</guid><description>&lt;p&gt;There’s been &lt;a href="https://bravenewgeek.com/you-cannot-have-exactly-once-delivery-redux/"&gt;a lot&lt;/a&gt; &lt;a href="http://the-paper-trail.org/blog/exactly-not-atomic-broadcast-still-impossible-kafka/"&gt;of discussion&lt;/a&gt; &lt;a href="https://fpj.me/2017/07/04/no-consensus-in-exactly-once/"&gt;about&lt;/a&gt; &lt;a href="http://data.alishoker.com/2017/07/notes-on-exactly-once-semantics-in.html"&gt;exactly-once semantics&lt;/a&gt; &lt;a href="https://medium.com/@jaykreps/exactly-once-one-more-time-901181d592f9"&gt;lately&lt;/a&gt;, sparked by the recent &lt;a href="https://www.confluent.io/blog/exactly-once-semantics-are-possible-heres-how-apache-kafka-does-it/"&gt;announcement&lt;/a&gt; of support for it in Kafka 0.11. I’ve already &lt;a href="https://bravenewgeek.com/what-you-want-is-what-you-dont-understanding-trade-offs-in-distributed-messaging/"&gt;written at length&lt;/a&gt; about strong guarantees in messaging.&lt;/p&gt;
&lt;p&gt;My former coworker Kevin Sookocheff recently made a &lt;a href="https://sookocheff.com/post/messaging/dissecting-sqs-fifo-queues/"&gt;post&lt;/a&gt; about ordered and exactly-once message delivery as it relates to Amazon SQS. It does a good job of illustrating what the trade-offs are, and I want to drive home some points.&lt;/p&gt;
&lt;p&gt;In the article, Kevin shows how FIFO delivery is really only meaningful when you have one single-threaded publisher and one single-threaded receiver. Amazon’s FIFO queues allow you to control how restrictive this requirement is by applying ordering on a per-group basis. In other words, we can improve throughput if we can partition work into different ordered groups rather than a single totally ordered group. However, FIFO still effectively limits throughput on a group to a single publisher and single subscriber. If there are multiple publishers, they have to coordinate to ensure ordering is preserved with respect to our application’s semantics. On the subscriber side, things are simpler because SQS will only deliver messages in a group one at a time in order amongst subscribers.&lt;/p&gt;</description></item><item><title>You Cannot Have Exactly-Once Delivery Redux</title><link>https://bravenewgeek.com/you-cannot-have-exactly-once-delivery-redux/</link><pubDate>Fri, 30 Jun 2017 15:43:31 -0500</pubDate><guid>https://bravenewgeek.com/you-cannot-have-exactly-once-delivery-redux/</guid><description>&lt;p&gt;A couple years ago I wrote &lt;a href="https://bravenewgeek.com/you-cannot-have-exactly-once-delivery/"&gt;You Cannot Have Exactly-Once Delivery&lt;/a&gt;. It stirred up quite a bit of discussion and was even &lt;a href="https://twitter.com/tyler_treat/status/849449118405677057"&gt;referenced in a book&lt;/a&gt;, which I found rather surprising considering I’m not exactly an academic. Recently, the topic of exactly-once delivery has again become a &lt;a href="https://segment.com/blog/exactly-once-delivery/"&gt;popular point&lt;/a&gt; &lt;a href="https://bravenewgeek.com/smart-endpoints-dumb-pipes/"&gt;of discussion&lt;/a&gt;, particularly with the &lt;a href="https://www.confluent.io/blog/exactly-once-semantics-are-possible-heres-how-apache-kafka-does-it/"&gt;release of Kafka 0.11&lt;/a&gt;, which introduces support for idempotent producers, transactional writes across multiple partitions, and—wait for it—exactly-once semantics.&lt;/p&gt;
&lt;p&gt;Naturally, when this hit Hacker News, I received a lot of messages from people asking me, “what gives?” There’s literally a TechCrunch headline titled, &lt;a href="https://techcrunch.com/2017/06/30/confluent-achieves-holy-grail-of-exactly-once-delivery-on-kafka-messaging-service/"&gt;&lt;em&gt;Confluent achieves holy grail of “exactly once” delivery on Kafka messaging service&lt;/em&gt;&lt;/a&gt; (Jay assures me, they don’t write the headlines). The myth has been disproved!&lt;/p&gt;</description></item><item><title>Smart Endpoints, Dumb Pipes</title><link>https://bravenewgeek.com/smart-endpoints-dumb-pipes/</link><pubDate>Thu, 29 Jun 2017 19:02:46 -0500</pubDate><guid>https://bravenewgeek.com/smart-endpoints-dumb-pipes/</guid><description>&lt;p&gt;I read an interesting article recently called &lt;a href="http://programmingisterrible.com/post/162346490883/how-do-you-cut-a-monolith-in-half"&gt;How do you cut a monolith in half?&lt;/a&gt; There are a lot of thoughts in the article that resonate with me and some that I disagree with, prompting this response.&lt;/p&gt;
&lt;p&gt;The overall message of the article is don’t use a message broker to break apart a monolith because it’s like a cross between a load balancer and a database, with the disadvantages of both and the advantages of neither. The author argues that message brokers are a popular way to pull apart components over a network because they have low setup cost and provide easy service discovery, but they come at a high operational cost. My response to that is the same advice the author puts forward: &lt;em&gt;it depends&lt;/em&gt;.&lt;/p&gt;</description></item><item><title>Fast Topic Matching</title><link>https://bravenewgeek.com/fast-topic-matching/</link><pubDate>Wed, 28 Dec 2016 17:52:30 -0600</pubDate><guid>https://bravenewgeek.com/fast-topic-matching/</guid><description>&lt;p&gt;A common problem in messaging middleware is that of efficiently matching message topics with interested subscribers. For example, assume we have a set of subscribers, numbered 1 to 3:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Subscriber&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Match Request&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;1&lt;/p&gt;
&lt;p&gt;forex.usd&lt;/p&gt;
&lt;p&gt;2&lt;/p&gt;
&lt;p&gt;forex.*&lt;/p&gt;
&lt;p&gt;3&lt;/p&gt;
&lt;p&gt;stock.nasdaq.msft&lt;/p&gt;
&lt;p&gt;And we have a stream of messages, numbered 1 to N:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Message&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Topic&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;1&lt;/p&gt;
&lt;p&gt;forex.gbp&lt;/p&gt;
&lt;p&gt;2&lt;/p&gt;
&lt;p&gt;stock.nyse.ibm&lt;/p&gt;
&lt;p&gt;3&lt;/p&gt;
&lt;p&gt;stock.nyse.ge&lt;/p&gt;
&lt;p&gt;4&lt;/p&gt;
&lt;p&gt;forex.eur&lt;/p&gt;
&lt;p&gt;5&lt;/p&gt;
&lt;p&gt;forex.usd&lt;/p&gt;
&lt;p&gt;…&lt;/p&gt;
&lt;p&gt;…&lt;/p&gt;
&lt;p&gt;N&lt;/p&gt;
&lt;p&gt;stock.nasdaq.msft&lt;/p&gt;
&lt;p&gt;We are then tasked with routing messages whose topics match the respective subscriber requests, where a “&lt;em&gt;*”&lt;/em&gt; wildcard matches any word. This is frequently a bottleneck for message-oriented middleware like ZeroMQ, RabbitMQ, ActiveMQ, TIBCO EMS, et al. Because of this, there are a number of &lt;a href="http://zeromq.org/whitepapers:message-matching"&gt;well-known&lt;/a&gt; &lt;a href="http://wso2.com/library/articles/2015/05/article-fast-topic-matching-algorithm-implementation-for-wso2-message-broker/"&gt;solutions&lt;/a&gt; &lt;a href="https://www.rabbitmq.com/blog/2010/09/14/very-fast-and-scalable-topic-routing-part-1/"&gt;to the problem&lt;/a&gt;. In this post, I’ll describe some of these solutions, as well as a novel one, and attempt to quantify them through benchmarking. As usual, the code is available &lt;a href="https://github.com/tylertreat/fast-topic-matching"&gt;on GitHub&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Take It to the Limit: Considerations for Building Reliable Systems</title><link>https://bravenewgeek.com/take-it-to-the-limit-considerations-for-building-reliable-systems/</link><pubDate>Tue, 20 Dec 2016 19:55:52 -0600</pubDate><guid>https://bravenewgeek.com/take-it-to-the-limit-considerations-for-building-reliable-systems/</guid><description>&lt;p&gt;Complex systems usually operate in failure mode. This is because a complex system typically consists of many discrete pieces, each of which can fail in isolation (or in concert). In a microservice architecture where a given function potentially comprises several independent service calls, &lt;em&gt;high&lt;/em&gt; availability hinges on the ability to be &lt;em&gt;partially&lt;/em&gt; available. This is a core tenet behind resilience engineering. If a function depends on three services, each with a reliability of 90%, 95%, and 99%, respectively, partial availability could be the difference between 99.995% reliability and 84% reliability (assuming failures are independent). Resilience engineering means designing with failure as the normal.&lt;/p&gt;</description></item><item><title>Benchmarking Message Queue Latency</title><link>https://bravenewgeek.com/benchmarking-message-queue-latency/</link><pubDate>Sat, 13 Feb 2016 16:23:39 -0600</pubDate><guid>https://bravenewgeek.com/benchmarking-message-queue-latency/</guid><description>&lt;p&gt;About a year and a half ago, I published &lt;a href="https://bravenewgeek.com/dissecting-message-queues/"&gt;Dissecting Message Queues&lt;/a&gt;, which broke down a few different messaging systems and did some performance benchmarking. It was a naive attempt and had &lt;a href="https://bravenewgeek.com/benchmark-responsibly/"&gt;a lot of problems&lt;/a&gt;, but it was also my first time doing any kind of system benchmarking. It turns out benchmarking systems correctly is actually pretty difficult and many folks get it wrong. I don’t claim to have gotten it right, but over the past year and a half I’ve learned a lot, tried to build some better tools, and improve my methodology.&lt;/p&gt;</description></item><item><title>What You Want Is What You Don’t: Understanding Trade-Offs in Distributed Messaging</title><link>https://bravenewgeek.com/what-you-want-is-what-you-dont-understanding-trade-offs-in-distributed-messaging/</link><pubDate>Sun, 23 Aug 2015 17:59:39 -0500</pubDate><guid>https://bravenewgeek.com/what-you-want-is-what-you-dont-understanding-trade-offs-in-distributed-messaging/</guid><description>&lt;p&gt;If there’s one unifying theme of this blog, it’s that &lt;a href="https://bravenewgeek.com/distributed-systems-are-a-ux-problem/"&gt;distributed systems&lt;/a&gt; &lt;a href="https://bravenewgeek.com/cap-and-the-illusion-of-choice/"&gt;are&lt;/a&gt; &lt;a href="https://bravenewgeek.com/understanding-consensus/"&gt;riddled&lt;/a&gt; &lt;a href="https://bravenewgeek.com/scaling-shared-data/"&gt;with&lt;/a&gt; &lt;a href="https://bravenewgeek.com/stream-processing-and-probabilistic-methods/"&gt;trade-offs&lt;/a&gt;. Specifically, with distributed messaging, &lt;a href="https://bravenewgeek.com/you-cannot-have-exactly-once-delivery/"&gt;you cannot have exactly-once delivery&lt;/a&gt;. However, messaging trade-offs don’t stop at delivery semantics. I want to talk about what I mean by this and explain why many developers often have the wrong mindset when it comes to building distributed applications.&lt;/p&gt;
&lt;p&gt;The natural tendency is to build distributed systems as if they aren’t distributed at all—assuming data consistency, reliable messaging, and predictability. It’s much easier to reason about, but it’s also blatantly misleading.&lt;/p&gt;</description></item><item><title>You Cannot Have Exactly-Once Delivery</title><link>https://bravenewgeek.com/you-cannot-have-exactly-once-delivery/</link><pubDate>Wed, 25 Mar 2015 18:14:57 -0500</pubDate><guid>https://bravenewgeek.com/you-cannot-have-exactly-once-delivery/</guid><description>&lt;p&gt;I’m often surprised that people continually have fundamental misconceptions about how distributed systems behave. I myself shared many of these misconceptions, so I try not to demean or dismiss but rather educate and enlighten, hopefully while sounding less preachy than that just did. I continue to learn only by following in the footsteps of others. In retrospect, it shouldn’t be surprising that folks buy into these fallacies as I once did, but it can be frustrating when trying to communicate certain design decisions and constraints.&lt;/p&gt;</description></item><item><title>Benchmark Responsibly</title><link>https://bravenewgeek.com/benchmark-responsibly/</link><pubDate>Fri, 02 Jan 2015 14:53:22 -0600</pubDate><guid>https://bravenewgeek.com/benchmark-responsibly/</guid><description>&lt;p&gt;When I posted my &lt;a href="http://www.bravenewgeek.com/dissecting-message-queues/"&gt;Dissecting Message Queues&lt;/a&gt; article last summer, it understandably caused some controversy.  I received both praise and scathing comments, emails asking why I didn’t benchmark X and pull requests to bump the numbers of Y. To be honest, that analysis was more of a brain dump from my own test driving of various message queues than any sort of authoritative or scientific study—it was &lt;em&gt;far&lt;/em&gt; from the latter, to say the least. The qualitative discussion was pretty innocuous, but the benchmarks and &lt;a href="https://github.com/tylertreat/mq-benchmarking"&gt;supporting code&lt;/a&gt; were the target of a lot of (valid) criticism. In retrospect, it was probably irresponsible to publish them, but I was young and naive back then; now I’m just mostly naive.&lt;/p&gt;</description></item><item><title>Iris Decentralized Cloud Messaging</title><link>https://bravenewgeek.com/iris-decentralized-cloud-messaging/</link><pubDate>Tue, 22 Jul 2014 22:34:31 -0600</pubDate><guid>https://bravenewgeek.com/iris-decentralized-cloud-messaging/</guid><description>&lt;p&gt;A couple weeks ago, I published a rather extensive &lt;a href="http://www.bravenewgeek.com/dissecting-message-queues/"&gt;analysis&lt;/a&gt; of numerous message queues, both brokered and brokerless. Brokerless messaging is really just another name for peer-to-peer communication. As we saw, the difference in message latency and throughput between peer-to-peer systems and brokered ones is several orders of magnitude. ZeroMQ and nanomsg are able to reliably transmit &lt;em&gt;millions&lt;/em&gt; of messages per second at the expense of guaranteed delivery.&lt;/p&gt;
&lt;p&gt;Peer-to-peer messaging is decentralized, scalable, and fast, but it brings with it an inherent complexity. There is a dichotomy between how brokerless messaging is conceptualized and how distributed systems are actually &lt;em&gt;built&lt;/em&gt;. Distributed systems are composed of services like applications, databases, caches, etc. Services are composed of instances or nodes—individually addressable hosts, either physical or virtual. The key observation is that, conceptually, the unit of interaction lies at the &lt;em&gt;service level&lt;/em&gt;, not the instance level. We don’t care about &lt;em&gt;which&lt;/em&gt; database server we interact with, we just want to talk to &lt;em&gt;a&lt;/em&gt; database server (or perhaps multiple). We’re concerned with logical groups of nodes.&lt;/p&gt;</description></item><item><title>Dissecting Message Queues</title><link>https://bravenewgeek.com/dissecting-message-queues/</link><pubDate>Mon, 07 Jul 2014 00:33:53 -0500</pubDate><guid>https://bravenewgeek.com/dissecting-message-queues/</guid><description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;Disclaimer (10/29/20)&lt;/strong&gt; – The benchmarks and performance analysis presented in this post should not be relied on. This post was written roughly six years ago, and at the time, was just the result of my exploration of various messaging systems. The benchmarks are not implemented in a meaningful way, which I discussed in a &lt;a href="https://bravenewgeek.com/benchmark-responsibly/"&gt;follow-up post&lt;/a&gt;. This post will remain for posterity and learning purposes, but I do not claim that this information is accurate or useful.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>A Look at Nanomsg and Scalability Protocols (Why ZeroMQ Shouldn’t Be Your First Choice)</title><link>https://bravenewgeek.com/a-look-at-nanomsg-and-scalability-protocols/</link><pubDate>Sun, 29 Jun 2014 20:44:34 -0600</pubDate><guid>https://bravenewgeek.com/a-look-at-nanomsg-and-scalability-protocols/</guid><description>&lt;p&gt;Earlier this month, I &lt;a href="http://www.bravenewgeek.com/distributed-messaging-with-zeromq/" title="Distributed Messaging with ZeroMQ"&gt;explored ZeroMQ&lt;/a&gt; and how it proves to be a promising solution for building fast, high-throughput, and scalable distributed systems. Despite lending itself quite well to these types of problems, ZeroMQ is not without its flaws. Its creators have attempted to rectify many of these shortcomings through spiritual successors &lt;a href="https://github.com/crossroads-io/libxs"&gt;Crossroads I/O&lt;/a&gt; and &lt;a href="http://nanomsg.org/"&gt;nanomsg&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The now-defunct Crossroads I/O is a proper fork of ZeroMQ with the true intention being to build a viable commercial ecosystem around it. Nanomsg, however, is a &lt;em&gt;reimagining&lt;/em&gt; of ZeroMQ—a complete rewrite in C ((The author &lt;a href="http://250bpm.com/blog:4"&gt;explains why&lt;/a&gt; he should have originally written ZeroMQ in C instead of C++.)). It builds upon ZeroMQ’s rock-solid performance characteristics while providing several vital improvements, both internal and external. It also attempts to address many of the strange behaviors that ZeroMQ can often exhibit. Today, I’ll take a look at what differentiates nanomsg from its predecessor and implement a use case for it in the form of service discovery.&lt;/p&gt;</description></item><item><title>Distributed Messaging with ZeroMQ</title><link>https://bravenewgeek.com/distributed-messaging-with-zeromq/</link><pubDate>Wed, 11 Jun 2014 16:56:03 -0600</pubDate><guid>https://bravenewgeek.com/distributed-messaging-with-zeromq/</guid><description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“A distributed system is one in which the failure of a computer you didn’t even know existed can render your own computer unusable.” -Leslie Lamport&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;With the increased prevalence and accessibility of cloud computing, distributed systems architecture has largely supplanted more monolithic constructs. The implication of using a service-oriented architecture, of course, is that you now have to deal with a myriad of difficulties that previously never existed, such as fault tolerance, availability, and horizontal scaling. Another interesting layer of complexity is providing consistency across nodes, which itself is a problem surrounded with endless research. Algorithms like &lt;a href="http://en.wikipedia.org/wiki/Paxos_(computer_science)"&gt;Paxos&lt;/a&gt; and &lt;a href="https://ramcloud.stanford.edu/wiki/download/attachments/11370504/raft.pdf"&gt;Raft&lt;/a&gt; attempt to provide solutions for managing replicated data, while other solutions offer eventual consistency.&lt;/p&gt;</description></item></channel></rss>