What are CloudEvents? By David Boyne

What are CloudEvents? By David Boyne

What are CloudEvents?

CloudEvents is a specification for describing event data in a common way. As their website says “Events are everywhere, yet event publishers tend to describe events differently.”

Many event-driven architectures start simple, with producers and consumers. Over time your architecture evolves and you design more events/messages. Messages can also travel through many different brokers/middleware as it’s routed between systems.

CloudEvents is designed to help the industry define a set of standards for our messages. Using these standards brokers and integrations have a way of understand your messages without having to know about the business logic.

What are CloudEvents?

Protocol and SDK support

Binary format

  • Using Binary format you can define your CloudEvents using headers.
  • This keeps the structure of your event as it was, as the producer published it.
  • Headers are set and can be read by brokers to understand the event, who published it (ce-type), it’s origin (ce-source) and a unique id.
  • CloudEvents supports additional headers that can be useful. For example the dataschema can be useful to define to point consumers or brokers to the schema of your event. This may be useful as brokers can use this information to validate your message before it’s published downstream.
  • Extensions are also supported with CloudEvents. The community mentions that as extensions get on boarded and used more, they may end up in the optional version of the spec.

Structured format

  • Using structured format, you can define your CloudEvents using the message payload itself.
  • You have to define the Content-Type header to be application/cloudevents+json
  • The payload of the event contains required, optional and extensions as well as the data of your message.
  • Brokers that integrate with CloudEvents will understand binary or structured formats. So decide which one you prefer here and what offers more flexibility for your teams.

Extra Resources

  • CloudEvents website - Website for CloudEvents for you to dive deeper.
  • Cloud Native Computing Foundation announced graduation of CloudEvents - Nice milestone for CloudEvents, read more to understand how CloudEvents is growing, whos using it and the future. CloudEvents Roadmap - If your are interested to know what the roadmap looks like for CloudEvents.
  • AsyncAPI - If you like standards and specs, then you will like AsyncAPI. Specification for building event-driven architectures allowing us to define producers, consumers and much more.
  • Why event design is important - Visual I created to help you understand why event design is important, what is event first thinking and how can you start to treat your events as first class citizens of your architecture.
  • Avoiding big balls of mud in event-driven architecture - It’s easy for us to add producers and consumers over time without much consideration around design, domains and integration boundaries. This visual helps you understand more.
  • Exposing too much information in your events - Visual here to help you understand what information you should expose in your events. Think about coupling, think about exposing implemention details.
  • What are events? - Simple visual to help you understand events. What are they, why are they important?

Videos that can help

Want to work together?

If you're interested in collaborating, I offer consulting, training, and workshops. I can support you throughout your event-driven architecture journey, from design to implementation. Feel free to reach out to discuss how we can work together, or explore my services on EventCatalog.

Download EDA Visuals

Join over 10,000 others learning EDA and download all the EDA visuals directly to your computer. This document updates everytime a new visual is added so make sure you come back to get the latest.

Download now →
Diagrams and thoughts by @boyney123 to help you learn.