What is GeoEvent Sampler?
Real-time data can be received in any number of data formats (text, JSON, GeoJSON, and more) over many types of protocols (HTTP, WebSocket, TCP, and more). Being able to validate and explore event data (or GeoEvents) directly in GeoEvent Manager, prior to say writing those GeoEvents to a feature layer for viewing in a web map, can be especially useful. GeoEvent Sampler is a utility in the service designer of GeoEvent Manager that samples a fixed number of GeoEvents as they are routed through elements (inputs, outputs, filters, and processors) of a published GeoEvent Service. The sampled GeoEvents can be viewed as prettified JSON or delimited text in the sampler window. Sampling GeoEvents can provide greater insight, earlier, into your real-time event data and can assist in designing, validating, and troubleshooting different routes in a GeoEvent Service.
Unlike GeoEvent Logger and GeoEvent Simulator, which are separate Windows applications installed with GeoEvent Server, GeoEvent Sampler is a utility in the service designer in GeoEvent Manager. Access GeoEvent Sampler from any new or existing GeoEvent Service by toggling the utility at the bottom of the service designer. Below is a description of the key functionality provided by GeoEvent Sampler.
Property or Function | Description |
---|---|
1 - Enable / Disable | Enable and Disable starts and stops GeoEvent Sampler on a selected route between two elements of a published GeoEvent Service. GeoEvent Sampler is disabled by default and must be enabled to sample GeoEvents on a selected route.
For details on enabling GeoEvent Sampler, see Enable GeoEvent Sampler below. |
2 - Select Route | The name of the selected route in a GeoEvent Service. Event data will be displayed in the sampler window for the selected route only. Any route between an input, output, filter, or processor element can be selected in a published GeoEvent Service. The name of the selected route is displayed as the concatenation of the connected element names. Several examples of route names include:
Hinweis:The name of the selected route is displayed when GeoEvent Sampler is enabled and a route between two elements in a GeoEvent Service is selected. |
3 - GeoEvent Sampler Utility | Click the toggle to show or hide GeoEvent Sampler in the service designer. For details on enabling GeoEvent Sampler, see Enable GeoEvent Sampler below. |
4 - Refresh | Use Refresh to clear the currently sampled GeoEvents and sample another set from the selected route. After a refresh, another set of GeoEvents will be sampled up to the value specified in the Sample Size setting. For example, if the Sample Size is set to 10 and a refresh occurs, the current GeoEvents will be cleared and another sample of 10 will appear in the sampler window. If two routes are being compared, Refresh will clear the GeoEvents for each route and each route will be sampled again. For details on comparing two routes, see Compare GeoEvents from two routes below. |
5 - Clear | Use Clear to remove sampled GeoEvents from the sampler window. After a clear, GeoEvents will continue to be sampled from the selected route up to the value specified in the Sample Size setting. For example, if the Sample Size is set to 10 and a clear occurred after 3 GeoEvents were sampled, the sampler will clear out the 3 GeoEvents and continue to sample for the remaining 7 GeoEvents. If two routes are being compared, Clear is available for each route. For details on comparing two routes, see Compare GeoEvents from two routes below. Hinweis:The ability to clear the sampler window(s) is only available after at least one GeoEvent is sampled. |
6 - View in Event Viewer | Use View in Event Viewer to visualize the geometry of the sampled GeoEvents in a web map viewer. The Event Viewer only displays the geometry of sampled GeoEvents currently displayed in the sampler window. When the Event Viewer is open, any newly sampled GeoEvents will not be displayed. Open the Event Viewer after the desired number of GeoEvents are sampled and available in the sampler window. Hinweis:Viewing sampled GeoEvents in the Event Viewer is only possible if the GeoEvents have a geometry whose field is tagged GEOMETRY in its GeoEvent Definition. Additionally, sampled GeoEvents must be in the JSON data type format, viewing as text is not supported. |
7 - Copy to Clipboard | Use Copy to Clipboard to copy the GeoEvents currently displayed in the sampler window to the system clipboard. The copied GeoEvents can then be pasted to a separate text file or text editor for storage or further review. If two routes are being compared, Copy to Clipboard is available for each route. For details on comparing two routes, see Compare GeoEvents from two routes below. Hinweis:GeoEvents are copied in the data type format defined in the Data Type setting (either Text or JSON). The data type format can be changed in Settings. |
8 - Settings | Access the settings available for sampling GeoEvents, including Data Type and Sample Size.
|
9 - Sampler Window | The GeoEvents sampled from a selected route will appear in the sampler window. Sampled GeoEvents will display as either JSON or text depending on the data type format specified in the Data Type setting. |
10 - Event Counter | The event counter displays the number of GeoEvents sampled on a selected route. The number of GeoEvents sampled will never exceed the value specified in the Sample Size setting. For example, a count of 3/10 means 3 GeoEvents, out of a maximum of 10, have been sampled. Hinweis:The event counter will reset to 0 if a new route is selected or if sampling is refreshed. |
Enable GeoEvent Sampler
GeoEvents can be sampled and displayed, in real-time, from a route (or connection) between an input, output, filter, or processor element in a published GeoEvent Service. To get started with GeoEvent Sampler, open GeoEvent Manager and either create a new GeoEvent Service or open an existing GeoEvent Service. For details on creating a new GeoEvent Service, see Creating a GeoEvent Service.
Refer to the steps below to access and enable GeoEvent Sampler in the service designer.
- Open a published GeoEvent Service and ensure it is receiving GeoEvents.
- Click on the bottom of the service designer to open GeoEvent Sampler.
- Click to open the Settings for GeoEvent Sampler and specify the desired Data Type and Sample Size. The default data type is JSON and default sample size is 10 GeoEvents.
- Click to start GeoEvent Sampler.
Hinweis:
GeoEvent Sampler can also be started by right-clicking a route between two elements in a published GeoEvent Service and choosing Sample Route. GeoEvent Sampler will open and sampling of GeoEvents will begin on the selected route.
Start sampling GeoEvents
To start sampling GeoEvents, select a route between an input, output, filter, or processor element while GeoEvent Sampler is open and enabled.
To sample GeoEvents from a route in a GeoEvent Service, create a new or open an existing published GeoEvent Service, ensure it is actively receiving GeoEvents, and follow the steps below.
- Ensure GeoEvent Sampler is open in the service designer and is enabled.
- Left-click a route in the published GeoEvent Service to begin sampling GeoEvents on that route.
- (Optional) The current sample of GeoEvents can be copied from the sampler window by clicking Copy to Clipboard.
- (Optional) The current sample of GeoEvents can be cleared from the sampler window by clicking Clear.
- (Optional) The selected route can be sampled again by clicking Refresh.
Hinweis:
GeoEvent Sampler can also be started by right-clicking a route and selecting Sample Route from the menu. GeoEvent Sampler will open, enable, and instantly begin sampling GeoEvents from the selected route if GeoEvent Sampler is not already opened and enabled.
Visualize sampled GeoEvents
The primary purpose of GeoEvent Sampler is to provide a sample of GeoEvents as text or JSON, in real-time, as they are processed in a published GeoEvent Service. GeoEvent Sampler also includes an Event Viewer which is a web map viewer that can be used to visualize and verify the geometry of processed GeoEvents.
To visualize sampled GeoEvents in the Event Viewer, create a new or open an existing published GeoEvent Service, ensure it is actively receiving GeoEvents, and follow the steps below.
- Ensure GeoEvent Sampler is open in the service designer and enabled.
- Click and confirm the Data Type is set to JSON.
- Left-click a route in the published GeoEvent Service to begin sampling GeoEvents on the selected route.
- After a sample of GeoEvents is displayed as JSON in the sampler window, click to view the GeoEvents in the Event Viewer.
- Explore the sampled GeoEvents in the Event Viewer.
- In the Event Viewer, left-click a GeoEvent, a popup appears with the attribute information.
Hinweis:
Optionally, right-click a route and from the menu and choose Sample Route to begin sampling GeoEvents.
Hinweis:
The Event Viewer only supports sampling JSON formatted GeoEvents that contain a geometry field tagged as GEOMETRY in the corresponding GeoEvent Definition. If the sampled GeoEvents are formatted as Text and do not have a geometry field tagged GEOMETRY, the View in Event Viewer will be disabled.
Compare GeoEvents from two routes
GeoEvent sampling can be performed on two different routes at the same time. Sampling two routes can be useful to compare and validate changes on related rea-time data. For example, a GeoEvent emitted by a Buffer Creator Processor should be expected to have a different geometry (polygon) from its original source geometry (point). By sampling GeoEvents from the routes going to and from the processor, you can confirm GeoEvents are not only received by the Buffer Creator Processor, but those same GeoEvents are buffered by the processor.
To compare sampled GeoEvents from two routes, create a new or open an existing published GeoEvent Service, ensure it is actively receiving GeoEvents, and follow the steps below.
- Ensure GeoEvent Sampler is open in the service designer and enabled.
- Left-click a route in a GeoEvent Service to begin sampling GeoEvents on the first selected route.
- With the first route selected, right-click a second route and choose Compare Route.
- Click to view the GeoEvents from each route in the Event Viewer.
Hinweis:
Optionally, right-click a route and from the menu choose Sample Route to start sampling the first route.
Hinweis:
Compare Route is only available once the first route is selected, otherwise it will be disabled. Routes sharing the same source element, whether an input, output, filter, or processor cannot be compared.
Notice the second selected route is a different color (orange), indicating GeoEvent sampling will be performed on these two selected routes.
With the two routes selected, two sampler windows will display in GeoEvent Sampler allowing you to compare the two routes. The left sampler window (blue) returns the sampled GeoEvents from the first selected route while the right window (orange) returns the sampled GeoEvents from the second selected route.
GeoEvent sampling can only be performed on up to two routes. When comparing two routes, changing the settings, refreshing, and opening the event viewer will apply to both sampler windows. Clearing and copying the data to the clipboard can be used independently and applies to the sampler window in which the tool is used.
GeoEvent sampling considerations and limitations
- GeoEvents are only sampled when a GeoEvent Service is published, started, and is actively receiving real-time event data. Nothing will appear in the sampler window if the GeoEvent Service is not published, stopped, or event data is not being received.
- GeoEvent Sampler can be used to perform sampling on the routes connecting inputs, outputs, processors, and filters only. Sampling inputs, outputs, processors, and filters elements is not supported.
- Consider your real-time data and service design when sampling GeoEvents.
- GeoEvent Sampler automatically disconnects and is disabled after 10 minutes of inactivity.
- GeoEvent Sampler only supports the comparison of up to two routes between elements of a GeoEvent Service.
- The order of GeoEvents sampled is not guaranteed. The order GeoEvents are ingested into GeoEvent Server may not be the same order they appear in the sampler window.
- Sampled GeoEvents are not persisted or cached. Refreshing the sampler window or the browser session will remove any currently sampled GeoEvents.
- Changing the GeoEvent Sampler settings requires a refresh. If the settings are changed during an active sampling of GeoEvents, the new settings will not take effect until refreshing GeoEvent Sampler.
- When comparing two routes, it is plausible for the first sampler window to reach its sample size before the second sampler window displays any GeoEvents. Consider that data in route may not have met a filter or processing condition and is not being received.
- The sampler window will display a progress bar when waiting to receive the first GeoEvent.
- Viewing GeoEvents in the Event Viewer is supported in offline environments. Access the global settings to configure the Event Viewer with an offline accessible basemap.