A Load Generation Framework for CEP Application Testing and Demos

 

1 Introduction

Have you ever lamented over how difficult it is to test a CEP application, let alone doing a demo? Common challenges include:

  • How to generate events for testing a CEP application?
  • How to demo a CEP application?
  • Cannot be real-time, it takes too long
  • Lack of infrastructure during demo
  • Need repeatable outcome

In this article, I am going to show you a framework that I developed which allows you to define external events in a CSV file, play them back to your CEP application in demonstrations in accelerated time. This framework can also be used to generate a large volume of events based on event arrival distribution either in realtime or accelerated time to load test your CEP application. It is such a versatile tool that you can even use it to perform discrete event simulation (not described in this article).

The framework solves all the problems listed earlier by allowing you to:

  • Configure load to drive your CEP application
  • Run your CEP application in accelerated time
  • See the results quickly
  • Use it as a reusable infrastructure for CEP application testing and demos
  • Achieve repeatable outcome

Examples will be provided to showcase the capabilities of the framework including playing back configured events for a CEP application and realtime load generation using JBoss Fuse/A-MQ and event arrival patterns (distributions).

This article is divided into the following main sections:

  • The Optometrist CEP Application – this CEP application shows how to configure individual events to drive the CEP application in a CSV file.
  • The Stock Price CEP Application – this is a simple CEP Application which illustrates the event generation capability based on event arrival distribution.
  • Realtime Load Generation via Fuse and A-MQ integration – this section illustrates how realtime load generation can be achieved running multiple instances of the load generator to feed the Stock Price application via Fuse and A-MQ by applying software design patterns to loosely couple the load generator and the CEP application.
  • How it works – shows the UML class diagram containing the load testing framework classes, their attributes, operations and relationships. It also describes how the framework works including how the load generator is loosely coupled to your CEP application using the Observer design pattern.

The first few sections give you an overview of the capabilities of the framework. The “How it works” section outlines how the framework works. Continue reading A Load Generation Framework for CEP Application Testing and Demos