Programming

What Is SAP Event Mesh?

An event-driven architecture is a software architecture using events as the core means for interaction between its software components, including capture, communication, processing, and persistence of events.

 

As one of the hottest trends today, event-driven architectures offer many advantages over synchronous, more traditional approaches, resulting in many businesses looking into how they can put these architectures to use. Most businesses look for the real-time benefits first, such as an event occurring in an SAP backend system and consumers across the customer landscape getting notified of this significant change in real time.

 

However, there are more advantages that are often overlooked, such as loose coupling, incremental development, and handling of peak loads, and these easily and efficiently cross vendor boundaries using events.

 

Consider an instance where you have a business partner in an SAP system that gets updated, and another process in the enterprise needs to be informed about this update. For example, a sales order gets created or updated, and a related business processes needs to be informed about this change or inventory need to be updated based on logistics such as delivery notifications or transport events. In the SAP context, this is considered an event and is a significant change in the state of an object in an enterprise system.

 

Events hold context data such as content type, time of the occurrence, version, and so on. Depending on the type of events, the information it holds varies, but the players or entities involved are common, which are event, event source, event consumer, and event or message broker. An event is a significant change in the status of a business partner, an event source is where the event is occurring, an event consumer listens for and reacts to the event, and an event/message broker passes the events from the event producer to the event consumers. There are two types of events based on the information these events hold:

  • Notification event: Notification events are used as informing events to notify consumers of change, and they contain a minimal set of data sufficient for the event consumer to take action. In this case, as shown in the figure below, when the consumer gets notified of an event, it needs to process a subsequent action such as an API call to get further information. The event itself has minimal information.

Notification Event Based on an SAP Side-by-Side Extension

 

Some of the obvious advantages are that notification events are very small, only the minimal required data set is shared, access to data can be controlled well, and they can be very efficient depending on the number of required API calls to fetch additional data. Some of the challenges are that an additional synchronous step is required, it can be inefficient depending on the number of required API calls to fetch additional data, and it’s not enough to just have a suitable event—a suitable API is needed as well.

  • Data event: Data events contain all the data of the business objects for which the event has occurred, and there is no need for the event consumer to take any additional steps to get details of the event, as shown here.

Data Event Based on an SAP Side-by-Side Extension

 

The advantages of data events are that all potentially needed data is included in the event, no additional backend call is needed, the size of the event is a lot bigger (as SAP Backend/Event expected), the payload potentially will contain sensitive data, and it’s good for use cases in which the consumer requires a full data set. Some of the challenges are that there might be loss of control in respect to potentially sensitive data, it raises topics such as data access and protection, and there is higher resource consumption for the source, event broker, and consumer.

 

Event-driven architecture has both technology and business benefits. Loose coupling fosters flexibility and scalability, enabling systems to adapt and expand seamlessly. This approach also enhances fault tolerance through the application of appropriate patterns, ensuring systems can withstand disruptions more effectively. Moreover, by incrementally integrating event consumers and sources, operations are streamlined, leading to better quality outcomes and smoother processes. Additionally, this methodology facilitates the incorporation of new real-time integrations and extensions, ushering in innovative possibilities for system enhancement and evolution.

 

From a business standpoint, it enhances situational awareness by staying informed about pertinent events in real time, empowering businesses to make decisions based on the latest information available. Using this up-to-date data allows for more informed and timely business decisions, facilitating agility and adaptability. Hyper-automation of business processes further accelerates reaction times and reduces costs, optimizing efficiency across operations. Moreover, embracing an open approach that transcends vendor boundaries, fosters collaboration, and innovation, and paves the way for the exploration of new and diverse business scenarios.

 

The next figure shows SAP’s event-driven ecosystem today. SAP provides a full-blown event-driven ecosystem consisting of event sources, event brokers (i.e., SAP Event Mesh and SAP Integration Suite, advanced event mesh), and event consumers. Event sources include backends such as SAP S/4HANA, SAP SuccessFactors, and SAP ERP. Event consumers include applications built on SAP Business Technology Platform (SAP BTP), SAP Build, and selected backends.

 

SAP’s Event-Driven Ecosystem

 

We’ll start by taking a closer look at standard SAP Event Mesh, and then discuss the advanced solution. The next figure shows the three basic communication patterns of messaging and event-driven architectures that are applicable in SAP Event Mesh.

 

Basic Communication Patterns of Messaging and Event-Driven Architectures

 

Let’s walk through each:

  1. The first communication pattern is on a message queue, which is a software engineering component that buffers messages. Messages are stored in the queue until they are processed and deleted. Each message is processed exactly once, by a single consumer. The message is stored in the queue until a message consumer retrieves the message and acts on it.
  2. The second communication pattern is based on a topic, a software engineering concept that allows you to send a message to multiple devices that have subscribed to a specific topic. Topics don’t retain messages, meaning the messages aren’t buffered. As a result, consumers that aren’t listening in when a message is being broadcasted to a topic will miss out on the message.
  3. The third communication pattern is based on queue subscriptions and offers an approach to combine the advantages of both queues and topics. In queue subscriptions, an application publishes messages to a topic that directly sends the message to the queue.

SAP Event Mesh is an events and message management cloud-based service that’s part of SAP BTP. It’s typically used to decouple application logic, develop microservices, and support event-driven architectures.

 

As an event broker, it allows events from one application (event source) to be dynamically routed and received asynchronously by other applications. You can build event-driven extensions and integrations on SAP BTP and subscribe to real-time business events from core SAP systems. Potential SAP event sources currently include SAP S/4HANA Cloud, on-premise SAP S/4HANA, SAP ERP, and SAP SuccessFactors. The event enablement of additional SAP backends is underway. Available events are documented in SAP Business Accelerator Hub (https://api.sap.com/content-type/Events/events/events).

 

All SAP S/4HANA events are created and delivered by SAP. You don’t have an option to modify or create new ones; you can only consume these events. All the events are notification events, and there are no data events. SAP SuccessFactors events are very robust. Every single intelligent service event that SAP SuccessFactors provides can be made available through SAP Event Mesh. There are both notification and data events, and the events can be modified to your needs. For SAP ERP and on-premise SAP S/4HANA (from SAP NetWeaver 7.31 onward), there is an event enablement add-on with which you can create event-driven scenarios. You also can create your own events, notifications, and data events. You can also enable delta loads through which you can manage what’s changed.

 

SAP Event Mesh as a message broker allows for sending and receiving messages and decouples applications and services in your system landscapes. This loose coupling results in higher throughput because the sender doesn’t need to know about the receiving applications or services, and its resources aren’t blocked while it waits for a response. Asynchronous communication ensures greater scalability because sending applications can simply fire and forget.

 

You can use open standards and protocols for publishing and consuming messages from queues and topics, namely Advanced Message Queuing Protocol (AMQP), Message Queuing Telemetry Transport (MQTT), and Hypertext Transfer Protocol (HTTP 1.1) with REST APIs. Libraries for Java and Node.js are available. You can connect applications and microservices seamlessly using these standard protocols and protocol-agnostic libraries that can be used at the application configuration level for Java and Node.js.

 

Note: Let’s briefly discuss the differences between events and other terms used in contexts such as APIs and Kafka.

 

APIs let you read and write data, call functions, and start processes. They are like a contract between a client and the server and need to be called explicitly. The calls are synchronous using the blocking communication type. Events, on the other hand, let you react to change by informing that something has changed. Event notification informs the interested parties of significant changes. Once the interested parties register for an event, no additional action is needed. The notification is asynchronous with the nonblocking communication type.

 

Kafka is an event block and stores the events. Events can be stored for a certain time and replayed. SAP Event Mesh is an event broker and distributes the events. Events are buffered for a certain time and distributed. With SAP Event Mesh, you can’t replay events, and the event is gone once it’s consumed.

 

Now let’s move on to the advanced solution: SAP Integration Suite, advanced event mesh. SAP has been delivering event-driven integration through SAP Event Mesh (previously SAP Cloud Platform Enterprise Messaging) for several years. Recently, it has added SAP Integration Suite, advanced event mesh to help customers support more integration scenarios and manage and monitor events across their entire lifecycle.

 

SAP Integration Suite, advanced event mesh, stands as a fully managed service at the forefront of event streaming and management, facilitating enterprise-grade event-driven architecture within SAP’s ecosystem. As an integral component of SAP’s event-driven ecosystem, it empowers end-to-end event-driven architectures, offering a range of benefits and key capabilities. It complements the basic offering of SAP Event Mesh, catering to more demanding scenarios with a comprehensive eventing platform. It provides enterprise-grade performance, reliability, security, and governance and is a distributed mesh of event brokers that can be deployed across environments. It scales from small to very large use cases, and brokers can be deployed in existing public or private cloud environments.

 

SAP Integration Suite, advanced event mesh takes advantage of a complete event streaming, event management, and monitoring platform that incorporates best practices, expertise, and technology for event-driven architecture on a single platform. Through real-time updates on significant business changes across the ecosystem, it enables businesses to stay agile and responsive. Loose coupling of business applications and infrastructure enhances flexibility and scalability, while breaking down silos and extending beyond vendor boundaries with open standards and protocols.

 

Its key capabilities include a distributed mesh of event brokers deployable across environments, scalable from small to large use cases, adaptable to various cloud environments, and supporting event streaming, management, and monitoring. Through event streaming you can deploy event broker services, create event meshes, and optimize and monitor your event-driven system. Event management lets you design, discover, visualize, share, and manage various aspects of your event-driven architecture. You can also model your event-driven architecture to visualize component relationships.

 

Additionally, it provides an advanced management toolset with features such as message routing and filtering, ensuring efficient and effective event handling. Event monitoring and insights provide monitoring dashboards and configurable notifications to detect potential issues before they negatively impact your brokers and event broker services.

 

As listed here and shown in the table below, let’s compare the two solutions to understand commonalities and differences:

  • Both solutions are fully managed cloud services and can be used to integrate SAP and non-SAP systems through a network of event brokers.
  • While SAP Event Mesh works out of the box with SAP event sources, SAP Integration Suite, advanced event mesh requires a bit more work. If out-of-the-box experience is important to you, we recommend frontending SAP event sources with SAP Event Mesh, which can then rout events to brokers in SAP Integration Suite, advanced event mesh.
  • When it comes to sizing, SAP Integration Suite, advanced event mesh allows for larger payloads and storage, providing greater use case flexibility.
  • The following capabilities are unique to SAP Integration Suite, advanced event mesh:
    • Manage and monitor events, which is essential to ensure governance. As you scale event-based integration across your business and with third parties, event management becomes a must.
    • Enable event lifecycle management from design to publishing to discovery. This way, you can set, establish, and enforce best practices and then facilitate sharing and reuse.
    • Create and publish event API products, which are groups of asynchronous APIs that fulfill some specific business functions. With them, you can provide separate LoBs and any third parties all the information they need to subscribe and leverage a set of events. The documentation and code are AsyncAPI compliant. The code can be automatically generated.
    • Run natively on various public clouds, including AWS, Microsoft Azure, and Google Cloud Platform. Note the SAP Event Mesh can also run on multiple public clouds but only within SAP BTP. In addition, SAP Integration Suite, advanced event mesh can also run on-premise and at the edge.
    • Support event transactions. Client applications can send or receive multiple messages in single atomic transactions within a session to maintain data consistency.
    • Allow new and existing clients to ask a broker to resend messages previously delivered, for example, when the receiving application crashes before committing messages to its database or a newly started application requires historical data to make decisions based on messages just received.

Comparison of SAP Event Mesh and SAP Integration Suite, Advanced Event Mesh

 

Editor’s note: This post has been adapted from a section of the book SAP Business Technology Platform by Smitha Banda, Shibaji Chandra, and Chun Aun Gooi.

Recommendation

SAP Business Technology Platform
SAP Business Technology Platform

Discover SAP’s unified technology platform with this introductory guide! Get started with the building blocks of SAP Business Technology Platform: architecture design, runtime environments, and the development approach. Take a tour of the integrated tools and services for application development, business logic, automation, integration, security, and more. With detailed implementation examples for practical use cases, this is your guidebook to the complete SAP BTP ecosystem!

Learn More
SAP PRESS
by SAP PRESS

SAP PRESS is the world's leading SAP publisher, with books on ABAP, SAP S/4HANA, SAP IBP, intelligent technologies, SAP Business Technology Platform, and more!

Comments