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. Creating and Managing 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: Creating and Managing 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 brokers. Kafka modeled event meshes represent event flows through a single event broker or cluster.

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 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. In the Modeled Event Meshes list, 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. The Placeholder event broker is added to the modeled event mesh. You can see the details on the Event Broker Connections tab.

    Screenshot depicting the options described in the surrounding text.

  7. To also add a model event broker for an event broker service, in the top, right corner, click Connect Event Broker.

    Screenshot depicting the options described in the surrounding text.

  8. Select the checkbox next to My-First-Service. If multple event brokers appear in the list, you can start typing the name of the event broker service in the Search field to find it.

    If My-First-Service doesn't 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.

  9. Click Add, or click Cancel to close the dialog box without adding an event broker service. On the Event Broker Connections tab you see the details of the event brokers that you've added to the modeled event mesh.
  10. 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 surrounding 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 Building a Modeled Event Mesh.
  • 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. In the Application Domains list, click Fullfillment, which you imported into Designer in the previous tutorial.
  3. In the graph view, right-click the Fraud Service application and select View Details.

    Screenshot showing the settings described in the surrounding steps.

  4. Click Open Application.
  5. Select the Runtime tab.

    Screenshot depicting the options described in the surrounding text.

    The Runtime tab displays the event brokers you can add the application to in each environment.

  6. Under the Default environment, click Add Application for the Placeholder event broker.
  7. In the Application version to add list, keep the latest version selected and click Add.

    Screenshot depicting the options described in the surrounding text

    You'll see that the version you added displays in the Application Version column for the Placeholder event broker. You can only have one version of an application associated with an event broker in a modeled event mesh. If you added a different version of the application to the same event broker, it would replace the previously added version.

    Screenshot depicting the options described in the surrounding 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.

  8. Click the Details tab, and in the Event Flows section, click More ActionsScreenshot showing the settings described in the surrounding steps.for the Order Created 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 Order Created event version.

    Screenshot depicting the options described in the surrounding text.

    You'll notice that five applications subscribe to the event and one applications publishes it. We've already added the Fraud Service application to the modeled event mesh. Now we're going to add the remaining subscribing applications.

  9. Click More ActionsScreenshot showing the settings described in the surrounding steps. for the Email Service application and select Open Application.
  10. Select the Runtime tab.
  11. Under the Default environment, click Add Application for the Placeholder event broker.
  12. In the Application version to add list, keep the latest version selected and click Add.
  13. Repeat steps 8-12 to add the Order Details Service application to the modeled event mesh. In step 9, click More ActionsScreenshot showing the settings described in the surrounding steps. for the Order Details Service application Email Service application
  14. Repeat steps 8-12 again for each remaining subscribing application in the list. In step 9 click More ActionsScreenshot showing the settings described in the surrounding steps. for the application you want to add.

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.

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 surrounding 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.

You likely noticed in the graph that some events display as solid circles that are connected to applications with solid lines and others display as hollow circles connected to applications with dashed lines. The hollow circles represent events that don't have a publisher included in the modeled event mesh. The dotted lines represents subscriptions to events with no publisher. Let's fix the problem for some of the events by adding a publisher.

  1. Click the Order Created event in the graph. The event is selected in both the graph and the Events list.
  2. In the Events list, click the Order Created event name and in the Event Details dialog that opens, click Open in Designer.
  3. In the Referenced By section, click Pub to see the list of applications that publish the event.
  4. Click More ActionsScreenshot showing the settings described in the surrounding steps.for the Orders Service - Order Writer application and select Open Application.
  5. Select the Runtime tab.
  6. Under the Default environment, click Add Application for the Placeholder event broker.
  7. In the Application version to add list, keep the latest version selected and click Add.
  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 Orders Service - Order Writer application in the modeled event mesh and see that more events now have a publisher.

Screenshot depicting the results of the previous steps.

Next Steps