What are CloudEvents? By David Boyne
What are CloudEvents? By David Boyne
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?
- CloudEvents is a specification that originally started in December 2017 as part of the Serverless Working Group.
- CloudEvents was designed to help us define standards for our events.
- It’s easy for us to publish any message/event without any event design considerations, CloudEvents is designed to help with this.
- CloudEvents entered incubation in 2019 with the release of 1.0.0 version.
- In 2024 Cloud Native Computing Foundation announced graduation of CloudEvents.
Protocol and SDK support
- CloudEvents is not tied to any language or protocol and is flexible with it’s integration.
- CloudEvents support many different protocols and bindings including HTTP, AMQP, MQTT, NATS, Avro, Kafka and WebSockets.
- CloudEvents have open source SDKs to help you integrate with CloudEvents these include Python, JavaScript, Ruby, PHP, Java, Go, CSharp and Rust.
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
- CloudEvents and Beyond! - Doug Davis gives us a great intro into CloudEvents but also what’s beyond that, talking about discoverability and the future.
- CloudEvents - A first step towards serverless interop - Another one by Doug Davis goes into CloudEvents and helps us understand more.
- Introducing CloudEvents Discovery - David Baldwin gives us a peak into CloudEvents discovery why it’s important and thoughts.
Explore other visuals
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 13,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.