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:
- Create a Modeled Event Mesh
- Add Event Brokers to Your Modeled Event Mesh
- Add Applications to a Modeled Event Mesh
- Tour Your Model Architecture
Before You Begin
- Complete the tutorial Designing Your Event-Driven Architecture to add applications and events into Designer that you can use to build a modeled event mesh
- Complete the tutorial Creating Your First Event Broker Service so you can see how easy it is to add an event broker service to your modeled event mesh
- Log into PubSub+ Cloud. For more information, see Accessing PubSub+ Cloud
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.
- In the Cloud Console, click the Runtime Event Manager card or the icon
on the left navigation bar.
- Click Create Modeled Event Mesh.
- In the Modeled Event Mesh Name field, type "Tutorial".
- Select Solace as the modeled event mesh Type.
- In the Description field, add information about the modeled event mesh, for example: "Model of my Tutorial event flows".
-
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.
- 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:
- On the Modeled Event Meshes page, click Tutorial to open the modeled event mesh you just created.
- Select the Event Broker Connections tab.
- In the top, right corner, click Connect Event Broker.
- Click New Event Broker.
-
We're going to create a placeholder event broker by entering only a name. In the Name field, type "Placeholder".
-
Click Connect Event Broker.
-
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.
- 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.
-
Click the Architecture tab. As you can see, now it's time to add objects (application and event versions) to your modeled event mesh.
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.
- In the Cloud Console, click the Designer icon
on the left navigation bar.
- On the Application Domains page, click AcmeRetail - Store Operations, which you imported into Designer in the previous tutorial.
- On the Applications tab click the Smart Shelf Inventory Control application.
-
In the Versions list, click More Actions
for version 0.1.2 and select Add to Environment.
- In the Environment list, select Default.
- In the Modeled Event Mesh list, select Tutorial.
-
In the Event Broker list, select Placeholder.
- 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.
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.
-
In the Event Flows section, click More Actions
for the Product event and select Open Event.
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.
-
Click More Actions
for version 0.1.3 of the Data Product - Real-time Customer Sentiment application and select Open Application.
- Click More Actions
for the version and select Add to Environment.
- Select the same environment options as you did previously for the Smart Shelf Inventory Control application and click Add.
- Repeat steps 1-4 to add version 0.1.5 of the Point of Sale System application to the modeled event mesh.
- Open the Product event again and in the Referenced By section, select Pub.
- 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.
- Click the Runtime Event Manager icon
on the left navigation bar.
- On the Modeled Event Meshes tab, click Tutorial.
- 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.
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.
Let's fix the problem.
-
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.
- Click the Fraud event in the graph. The Fraud event is selected in both the graph and the Events list.
- Click the Fraud event name in the list and in the Event dialog, click Open in Designer.
- In the Referenced By section click Pub to see the list of applications that publish the event.
- Click More Actions
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.
- Click More Actions
for the version and select Add to Environment.
- Add the application to the Placeholder event broker.
- To take another look at the graph, click the Runtime Event Manager icon
on the left navigation bar.
- 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.
Next Steps
- Now that you understand how to use the tools in Event Portal, see Discovering Runtime Data to learn how to connect Event Portal to your runtime event brokers and discover runtime data.
- Try out the Runtime Event Manager audit and import features using the sample data in the Learning Center.
- To find out more about Event Portal see PubSub+ Event Portal.
- If you haven't completed the event streaming tutorials, see Creating Your First Event Broker Service.