Creating a Model of Your Event-Driven Architecture

This tutorial teaches you how to use the objects in Event Portal to create and visualize a model of your event-driven architecture (EDA). A modeled event mesh represents event flows operating in a specific runtime environment. Modeled event meshes help you define and visualize the event flows between publishing and subscribing applications within your EDA.

You can build modeled event meshes using objects created in Designer and objects imported into Event Portal. You create modeled event meshes within environments. Environments in PubSub+ Cloud represent runtime environments within your organization. For example, you may have several development environments for different lines of business, testing environments, a staging environment, and a production environment.

In this tutorial, we'll use Runtime Event Manager and Designer to complete the following tasks:

  1. Create a Modeled Event Mesh
  2. Add Event Brokers to Your Modeled Event Mesh
  3. Add Applications to a Modeled Event Mesh
  4. Tour Your Model Architecture

Before You Begin

Create a Modeled Event Mesh

Let's create your first modeled event mesh in Runtime Event Manager. Whether you want to design a new event flow or import flows from your existing EDA into Event Portal, you need to have at least one modeled event mesh before you can start modeling or connect Event Portal with your runtime.

  1. In the Cloud Console, click the Runtime Event Manager card or the icon on the left navigation bar.
  2. Click Create Modeled Event Mesh.
  3. In the Modeled Event Mesh Name field, type "Tutorial".
  4. Select Solace as the modeled event mesh Type.
  5. In the Description field, add information about the modeled event mesh, for example: "Model of my Tutorial event flows".
  6. In the Environment list, select Default. All new PubSub+ Cloud accounts have an environment named Default. You can create additional environments. To learn more, see: Environments.

  7. Click Create.

Add Event Brokers to Your Modeled Event Mesh

An event broker in a modeled event mesh represents a runtime event broker in an event flow. You must add at least one event broker to a modeled event mesh before you can add application versions and event versions to the model. Solace modeled event meshes can include multiple event meshes. Kafka modeled event meshes represent event flows through a single event broker.

When you create a model event broker, you can include details of the runtime event broker that it represents, or you can create a placeholder event broker with just a name and add the runtime details later.

You can also easily add model event brokers to represent the event broker services that your organization has created in Cluster Manager without having to manually add all of the connection details.

To add event brokers to your modeled event mesh, perform these steps:

  1. On the Modeled Event Meshes page, click Tutorial to open the modeled event mesh you just created.
  2. Select the Event Broker Connections tab.
  3. In the top, right corner, click Connect Event Broker.
  4. Click New Event Broker.
  5. We're going to create a placeholder event broker by entering only a name. In the Name field, type "Placeholder".

    Screenshot depiction the options described in the surrounding text.

  6. Click Connect Event Broker.

    Screenshot depicting the options described in the surronding text.

  7. To also add a model event broker for an event broker service, select the checkbox next to My-First-Service. If My-First-Service does not appear in the Add Existing Event Broker dialog, either the tutorial Creating Your First Event Broker Service has not been completed or that event broker service has already been added to a different modeled event mesh. You can continue on and complete the tutorial without adding it.

  8. Click Add. On the Event Broker Connections tab you see the details of the event brokers that you've added to the modeled event mesh.
  9. Click the Architecture tab. As you can see, now it's time to add objects (application and event versions) to your modeled event mesh.

    Screenshot depicting the options described in the surronding text.

Add Applications to a Modeled Event Mesh

Event Portal offers three ways to add applications to a modeled event mesh.

  • Add an application version to an event broker from Designer.
  • Associate an application version from one event broker to additional event brokers in the same or a different modeled event mesh in Runtime Event Manager. For more information, see Associating an Application with Additional Event Brokers.
  • Scan a runtime event broker connected to the modeled event mesh and use runtime data to import applications. For more information about connecting your runtime to Event Portal and using Runtime Event Manager to create a model of your own runtime data, see Discovering Runtime Data.

In this tutorial we'll show you how to add application versions from Designer. When you add an application version to a modeled event mesh, any event versions that the application publishes or subscribes to are also added to the model.

  1. In the Cloud Console, click the Designer icon on the left navigation bar.
  2. On the Application Domains page, click AcmeRetail - Store Operations, which you imported into Designer in the previous tutorial.
  3. On the Applications tab click the Smart Shelf Inventory Control application.
  4. In the Versions list, click More ActionsScreenshot showing the settings described in the surrounding steps.for version 0.1.2 and select Add to Environment.

    Screenshot depicting the options described in the surronding text.

  5. In the Environment list, select Default.
  6. In the Modeled Event Mesh list, select Tutorial.
  7. In the Event Broker list, select Placeholder.

    Screenshot depicting the options described in the surrounding text

  8. Click Add.

You'll see in the application details that the environment you added the application to now displays in the Appears In list. If you expand the list, you can see the name of the modeled event mesh and the event broker you added the application to.

Screenshot depicting the options described in the surronding text.

Your modeled event mesh should include all of the applications and events that are part of your event flow, so we're going to add more applications that belong to the event flow before we take a look at the results.

  1. In the Event Flows section, click More ActionsScreenshot showing the settings described in the surrounding steps.for the Product event and select Open Event.

    Screenshot depicting the options described in the surrounding text.

    In the Referenced By section of the event details, you can see all of the applications that publish and subscribe to the Product event version.

    You'll notice that several versions of an application can reference the same version of an event. In most cases, depending on whether you're modeling a new event flow or an established event mesh, your modeled event mesh should include either the most recent Draft version or the most recent Released version. We're going to add the most recent Released versions of the applications to the modeled event mesh.

  2. Click More ActionsScreenshot showing the settings described in the surrounding steps.for version 0.1.3 of the Data Product - Real-time Customer Sentiment application and select Open Application.

    Screenshot depicting the options described in the surronding text.

  3. Click More ActionsScreenshot showing the settings described in the surrounding steps.for the version and select Add to Environment.
  4. Select the same environment options as you did previously for the Smart Shelf Inventory Control application and click Add.
  5. Repeat steps 1-4 to add version 0.1.5 of the Point of Sale System application to the modeled event mesh.
  6. Open the Product event again and in the Referenced By section, select Pub.
  7. Repeat steps 2-4 for version 0.2.1 of the In-store Fulfillment Mobile Application.

Tour Your Model Architecture

Now that we've associated several applications and the events they publish and subscribe to with an event broker in your modeled event mesh, let's go have another look at the architecture tab.

  1. Click the Runtime Event Manager icon on the left navigation bar.
  2. On the Modeled Event Meshes tab, click Tutorial.
  3. On the Architecture tab, in the graph view, click Settings and select Show Warnings.

The Architecture tab displays both a list view and a graph view of the applications you added to the modeled event mesh and events they publish and subscribe to.

Screenshot depicting the options described in the surronding text.

The positions of the objects in the graph are automatically generated by Event Portal, so the object positioning in your view may not exactly match the picture. You can drag objects to reposition them. For more information about all of options and icons in the Graph View, see Viewing a Modeled Event Mesh.

The applications and events we've added to the panel use the following icons to represent the objects in your modeled event mesh:

Icon Description

Application

Event

Unpublished event: an application version subscribes to the event but no other application version in the modeled event mesh publishes it

 

Event path: the arrow indicates the direction of the event. If the arrow points away from an application, the application publishes the event. If the arrow points toward an application, the application subscribes to or consumes the event.

If an issue needs to be fixed with an event or with an application that publishes it or subscribes to it, the event path appears as a dashed line.

Note that there is an issue with the Fraud event, indicated by the orange dot and the dashed line to the application.

Screenshot depicting the options described in the surronding text.

Let's fix the problem.

  1. Hover the mouse over the Fraud event in the graph. A pop-up indicates that the event isn't published by an application in the modeled event mesh.

  2. Click the Fraud event in the graph. The Fraud event is selected in both the graph and the Events list.
  3. Click the Fraud event name in the list and in the Event dialog, click Open in Designer.
  4. In the Referenced By section click Pub to see the list of applications that publish the event.
  5. Click More ActionsScreenshot showing the settings described in the surrounding steps.for version 1.0.2 of the Customer Loyalty Management application and select Open Application so we can add the application to the modeled event mesh.
  6. Click More ActionsScreenshot showing the settings described in the surrounding steps.for the version and select Add to Environment.
  7. Add the application to the Placeholder event broker.
  8. To take another look at the graph, click the Runtime Event Manager icon on the left navigation bar.
  9. On the Modeled Event Meshes tab, click Tutorial.

You'll see the Customer Loyalty Management application in the modeled event mesh and see that all events are now published.

Screenshot depicting the results of the previous steps.

Next Steps