Apache Kafka and MapR Event Store: Terms, Techniques and New Designs

Contributed by

7 min read

Streaming data now is a big focus for many big data projects, including real time applications, so there’s a lot of interest in excellent messaging technologies such as Apache Kafka or MapR Event Store, which uses the Kafka 0.9 API. Terminology can be confusing, however, especially with so many similar new names showing up. To clarify, here’s a few ideas and terms to keep in mind:

What’s the difference in MapR Event Store and Kafka Streams?

This one’s easy: Different technologies for different purposes. There’s a difference between messaging technologies (Apache Kafka, MapR Event Store) versus tools for processing streaming data (such as Apache Flink, Apache Spark Streaming, Apache Apex). Kafka Streams is a soon-to-be-released processing tool for simple transformations of streaming data. The more useful comparison is between its processing capabilities and those of more full-service stream processing technologies such as Spark Streaming or Flink.

Despite the similarity in names, Kafka Streams aims at a different purpose than MapR Event Store. The latter was released in January 2016. MapR Event Store is a stream messaging system that is integrated into the MapR Data Platform. Using the Apache Kafka 0.9 API, MapR Event Store provides a way to deliver messages from a range of data producer types (for instance IoT sensors, machine logs, clickstream data) to consumers that include but are not limited to real-time or near real-time processing applications.

What is a stream, a topic, a broker?

For best practice in working with streaming event data, it’s important to have a message delivery system that provides a replayable queue of messages. In other words, persistence matters. Time-to-live for messages should be configurable. In addition, an ideal messaging tool should handle multiple producers and consumers in a de-coupled manner: the message is available whether or not the consumer is available at that moment. It’s also important to handle streaming data from many sources in a way that can be easily identified or accessed.

As excellent messaging systems of this style, Apache Kafka and MapR Event Store share many capabilities, but they function somewhat differently. In both systems, data is assigned to a topic, a flow of messages identified by name as a particular category. You might name a topic based on the IoT sensor or group of sensors from which data is being produced, for example. Both systems provide partitions of the topics to help with load balancing, as shown in Figure 1. In both systems, consumers (or consumer groups) subscribe to the topics of interest. This style is in contrast to some older messaging systems that broadcast data from producers to all consumers. MapR Event Store can handle a larger number of topics than Kafka, but topics in both systems have a similar purpose.

Event Streaming MapR Event Store and Kafka

Figure 1_: Streaming event data can be assigned to a category (topic) in MapR Event Store or in Apache Kafka’s messaging technology. Partitioning of data for a topic provides an advantage for load balancing. Multiple consumers within a consumer group may subscribe to partitions, as shown here. (Image © Dunning & Friedman 2016, used with permission. From Chapter 4 of book Streaming Architecture: New Designs Using Apache Kafka and MapR Event Store.) _

What about the term “broker”? Here’s where some differences appear. Kafka documentation defines the Kafka broker this way: “Kafka is run as a cluster comprised of one or more servers each of which is called a broker.” You may have seen diagrams indicating data coming from multiple consumers to a Kafka cluster broker and multiple consumers subscribing to data from the Kafka cluster. With MapR Event Store, the situation is different: Messaging is not done on a separate cluster but instead is integrated into the platform along with files and tables. As a result, MapR does not have (or need) a broker. There is no equivalent to the Kafka broker because, unlike Kafka, messaging with MapR doesn’t have to be done on a separate cluster from where the main action takes place or, indeed, where data is stored.

Another potential confusion comes with the term “stream” in the MapR system. Unlike how Kafka handles topics, the MapR Event Store feature of the converged platform provides a high level management capability called a stream, which is a collection of many topics for which shared policies are desirable. There is no equivalent in Kafka. Policies such as control of access and time-to-live are set at the stream level for MapR. There can be many streams (collections of topics) per MapR cluster.

An additional policy set at the stream level is a particularly strong capability for MapR Event Store: reliable geo-distributed replication of messages. The following figure illustrates the function of a stream as a collection of topics in a MapR Event Store.

Event Streaming MapR Event Store and Kafka

Figure 2: Unique to MapR Event Store – a stream is a collection of topics. A stream is a first class object in the MapR Data Platform. (Image © Dunning & Friedman 2016, used with permission. From Chapter 5 of book Streaming Architecture.)

The capabilities of the modern style of messaging system open new possibilities in the way people work with streaming data. The impact can go far beyond just data delivery for a particular low latency application, particularly as organizations begin to recognize the potential of these new technologies and adapt powerful stream-based designs for their data architectures.

For more ideas about using streaming data, read free online the O’Reilly book _Streaming Architecture: New Designs Using Apache Kafka and MapR Event Store, © Ted Dunning and Ellen Friedman._

To get started with sample programs, see these blogs:

This blog post was published May 16, 2016.

50,000+ of the smartest have already joined!

Stay ahead of the bleeding edge...get the best of Big Data in your inbox.

Get our latest posts in your inbox

Subscribe Now