Download presentation
Presentation is loading. Please wait.
1
Progress Apama Fundamentals
Introduction to Apama SCRIPT NOTES: Welcome to the Apama Fundamentals 3-day workshop. Presenter’s Name Presenter’s Job Title and Association Date
2
Objectives Objectives of the 3-day workshop Objectives of this module
Learn how to develop an event-processing application with Progress Apama Gain knowledge of Apama concepts and tools Objectives of this module Introduction to basic Apama concepts Overview of what you’ll learn over the next three days SCRIPT NOTES: The main objective of the Apama Fundamentals course is to teach you how to use Progress Apama to build an event processing application. The primary focus is the hands-on exercises where you get to use the Apama tools. To supplement the lab exercises, we’ll provide both PPT presentations and handouts (also available online as PDF files). When you are done, you should have enough knowledge and experience with Apama that you can go back to work and get started building your own Apama application.
3
Topics What is an Event? What is Event Processing Software?
What is an Apama Application? How Does Apama Work? How Does Apama Process Events? The Apama Application Model Overview of Apama Components and Tools Overview of the Apama Fundamentals Sample Application Agenda for the Next Three Days SCRIPT NOTES: Here is a list of the topics we will cover in this first module.
4
What is an Event? An event is a piece of data that represents that something happened Events flow in streams within every organization Examples of events include: Financial market events: “Buy 10,000 shares of IBM at $80.45” Supply chain events: “RFID tag was scanned at 1:39PM at dock door 10” Security events: “TCP/IP address just accessed server 5” SCRIPT NOTES: Streams of events can be generated by a myriad of technologies including real time messaging, batch files, user clicks on website, or Radio Frequency ID (RFID) events Some examples of events include: Financial market events Supply chain events Security events (TCP/IP = Transmission Control Protocol/Internet Protocol - the basic communication language or protocol of the Internet. It can also be used as a communications protocol in a private network.)
5
What is Event Processing Software?
Software that makes it easy for applications to identify patterns in real-time events Complex event processing (CEP) consists of: Correlating event streams using values of events and the time that events were received Producing derived events that are processed in turn and are output CEP allows applications to apply real-time intelligence to streaming data, by making it easy to identify: Sequences of events (A followed by B, then C) with conditional (the value of A is >100) or temporal (within 5 minutes) constraints SCRIPT NOTES: CEP is a new class of software that makes it easy for applications to identify patterns in events in real-time and Apama is the industry’s leading CEP platform. A pattern is an arrangement – or sequence – of events. Event Correlation is a technique for making sense of a large number of events and pinpointing the few events that are really important in that mass of information.
6
Event Processing versus Static Data Processing
Static Data Processing: “How many fraudulent credit card transactions occurred last week?” Event Streams SCRIPT NOTES: To put Event Processing into context with respect to how it differs from traditional computing: Traditional computing utilizes databases and data warehouses, which are designed to analyze static data. Static data captures information about a moment in time. Static business data, for example, could be a table of customer data, transactions at retail stores, or shipments that have occurred within a company's supply chain. Database-oriented computing helps applications answer questions like: “How many fraudulent credit card transactions occurred last week?” [CLICK] Real time computing requires event processing that operates on streams of events that are occurring in real time. With event processing, a business can identify patterns and make instant decisions while they still matter enabling applications to answer questions like: “When 3 transactions against the same credit card number occur within any 5 second window, deny the next request, flag the account, and send a message to the fraud detection dashboard.” Time Complex Event Processing: “When 3 credit card authorizations for the same card occur in any 5 second window, deny the request and check for fraud.”
7
What is an Apama Application?
An event-processing application that includes: Event Detection A (potentially complex) condition occurring across multiple independent sources of information When IBM’s stock price moves .5% higher than HP’s stock price Action Execution Steps to take when the detected condition is found Buy 10,000 shares of Microsoft in clips of 100 unless the average price of IBM’s stock drops back below the same threshold Action execution may modify subsequent event detection! Instructor notes: Use this slide for Finance audiences, use the following slide for BAM audiences. SCRIPT NOTES: An Apama application provides Event Detection - can detect a pattern in a stream of data that's occurring. Now it could be a very simple pattern, when this price goes above this threshold - but it also could be something more complex. So this example is similar to a real example of something Apama has been used for. The price movement of a particular stock being greater than some running average calculation within a specified time frame. Apama does not just detect events, it takes action when it detects them. The notion of an Action Execution could be very simple - it could be send an to somebody, or flash an alert on somebody's screen. But it also could be something such as complex as auto-trading 10,000 units of Microsoft in clips of Rule-driven action execution is, in some way, part of the application. What happens in the action part can modify what the application looks for in the detection part. For example, when trading stock, the application still looks for how the price is moving. If the prices do move, then it might cancel the search for one type of stock and start looking for a different type of stock.
8
What is an Apama Application?
Example If the MSFT price moves outside 2% of MSFT-15-MIN-VWAP Followed by S&P500 moving by 0.5% AND either of the following is true: - IBM’s price moves up by 5% OR - MSFT’s price moves down by 2% All within any 2 minute time period THEN buy MSFT sell IBM MSFT (NASDAQ) IBM (NYSE) MSFT 15-MIN-VWAP S&P500 Instructor notes: Use this slide for Financial Market audiences. SCRIPT NOTES: Here is a graphical example where there are 4 data feeds of financial market information coming into the Apama platform. [CLICK] We have a feed from the NASDAQ market and one from the NYSE market, the American equities market. We have a 3rd feed in green which is labeled the "Microsoft 15 minute VWAP" which is a volume-weighted average price - it's just an average and there are lots of different ways of averaging - this is just one, and it's giving the 15-minute average of the Microsoft stock price. And the final feed there is the S&P500 index, which is an index over the NYSE and the 500 largest firms primarily by market capitalization. The first point is that we could be receiving all 4 of those feeds from some external provider. For example, Bloomberg will use a VWAP feed. Alternatively, we could be calculating the 15-minute VWAP and the S&P500 from the other two feeds. The data is there to allow us to calculate those things. But for the purposes of the applications looking at those feeds, it doesn't matter - it's transparent to the user whether the feeds are derived by Apama, or coming from external systems. The ability to derive feeds, feed them back into the platform, then have rules which execute across those, is one of the characteristics of the Apama platform. So we're going to build up a "synthetic" trading rule - this is not meant to be real, just demonstrates certain capabilities. [CLICK] So first we check if Microsoft outside of a percentage of its VWAP, so it's deviating from it's volume-weighted price. Here 2% and 15 minutes might all be parameters we can change on the fly. [CLICK] Now we're looking at building that up into a more complex sequence, or a temporal sequence... So we check if that happens followed by something else, and that's a movement from a completely different feed of data. So this is cutting across the data feeds, looking at a chronological ordering to try and detect a pattern. [CLICK] Now we're going to build up the complexity using traditional Boolean type logic… AND something else happening OR something else happening that we're interested in - but [CLICK] we're actually interested in any of that happening within a 2 minute time window. We’re not interested if this happens over the course of several days - but if it happens within 2 minutes though, that is interesting – so this is demonstrating the notion of a temporal constraint. Then if we detect that then [CLICK] we're doing to do something, and we've simplified what we're going to do ... simply buy one stock and sell the other. But you can see from that the kind of logic, the kind of things you can do with Apama when operating across real-time streaming data. So that's really to give you a flavor of an Apama application looks like. This is a trading application, but this could be in any domain. For example, if we get a phone call from a phone number followed by a phone call from the same number from a location more than 100 miles away within 10 minutes, there's probably been some phone cloning going on, then, that's fraud. It's the same pattern of event detection. time Real-time data streams Temporal sequencing Complex event sequences real-time data streams Real-time constraints Automated actions
9
How Does Apama Work? A new approach to event processing through new algorithms Apama indexes the queries, not the data Data “flows over” queries to search for matches Unique indexing technology Queries indexed in proprietary data-structure Supports multi-dimensional indexing Very high performance and scalability Data Queries Apama Reaction SCRIPT NOTES: Apama provides a new approach to processing events. Instead of indexing data, Apama indexes queries. Data flows over the queries to search for specific event patterns. 11
10
visibility of all data flows
How Does Apama Work? real-time CEP rules example event Instrument SHELL Price 541.50 Volume 100000 … CEP engine visibility of all data flows London Stock Exchange Instructor Notes: Introduce the Apama Correlator here. SCRIPT NOTES: The Event Correlator is the Apama complex event processing engine. Streams of event data come into the Apama correlator. In this example, the event streams contain market data, such as the price, volume and other information about an instrument (type of stock). You write an Apama application (real-time CEP rules) that defines what patterns of events to look for, and what to do (what actions to take) after the patterns of events are found. For example, if the shell stock price falls to 525, then buy 100 shares. NY Stock Exchange Reuters News real-time data feeds
11
Run the Apama Event Correlator
Objective To see the event correlator in action Instructions See the “Exercise: Run the Event Correlator” handout (file name: 1-115_RunTheCorrelator.pdf) Lab Exercise Instructors notes: Depending on how much time you have, you can do this as a live demo or as a lab exercise. If you chose to do a demo to save some time, you can give the students lab exercise notes handout so they can reproduce the demo on their own later. SCRIPT NOTES: The Apama Event Correlator is the heart of Apama. Let’s take a break from the slides and took a look at the correlator in action. Look at event stream. Look at the instructions (.mon file). Start the correlator. Inject the instructions. Tell the correlator where to send the output. Inject the events. Look at the output.
12
How Does Apama Process Events?
Derived and/or complex events Created in response to incoming events Processed internally like external events Derived events are processed before the next external event All effects of an external event are processed before the next external event Example: Order Update Instructor notes: This is an animated slide showing how an event is processed in the event correlator. Touches a bit on how internal events are routed/processed before external events. SCRIPT NOTES: [CLICK] In this example, two events have come into the correlator: an Order Update and a Market Depth Order. [CLICK] The correlator processes the Order Update event completely, including any internal events it generates, [CLICK] before the next event in the queue. In this way, the event correlator process is predictable and deterministic. If the correlator started processing the next event before the first one was complete, we could get different results depending on how many and how quickly other events are coming into the queue Trade Position Update Position Warning Market Depth Open P&L Change Portfolio P&L Change Profit Warning 14 14
13
The Apama Application Model
Apama is a distributed system with processes for: Integration Core Processing Visualization Allows for scaling an application based on hardware Dashboard Client Dashboard Server Correlator Dashboard Client Instructors notes: Do not discuss dashboards and the IAF in detail at this point. SCRIPT NOTES: Apama is a distributed platform. It has a number of different processes. They can run on the same machine or on different machines. They all communicate with each other via our own socket-based custom transport which has been optimized for low latency and high performance. Apama has three main types of processes: - Integration processes - Core processes - Visualization processes Having this separation allows you to create an application that is scalable depending on your hardware, as long as you design your application properly. [CLICK] First, there are the integration processes. You cannot have an Apama application without some sort of integration. The examples shown include: JDBC adapter - shipped with Apama, out-of-the-box QFIX - to integrate with the popular QFIX Financial Market Data and Order Management Systems JMS - to connect to a JMS message bus [CLICK] Once you have the integration pieces, you can think about the core processing network Many applications just use one correlator. This diagram shows you that you can set up your application to use multiple correlators to service different adapters and performing collaborative work. [CLICK] Instead, Apama has a process called the dashboard server. (A dashboard is a GUI for an Apama application.) If all of the clients connected directly to the core processing node (the correlator), it would get overloaded just handling the connections and would not get any actual processing done. Instead, we use dashboard servers to connect to the correlators. They can connect to more than one correlator, but typically they connect to just one. [CLICK] And then multiple clients connect to one or more of the servers. A clients can be a Windows-based or a web-based application. IAF - JDBC IAF - QFIX IAF - JMS
14
The Apama Application Model
Day 1 Core Processing Layer The correlator Instructions for the correlator Write code in MonitorScript Write code in Java Use a graphical tool (Event Modeler) Visualization layer Dashboard server Dashboard (or other) clients Integration layer Connection to external software components Integration Application Framework (IAF) Client APIs Day 2 SCRIPT NOTES: Here is another look at the three layers of the Apama Application model: [CLICK] And here is a preview of our agenda for the next three days. Day 1 (today) – You’ll be learning more about the event correlator and how to write instructions in MonitorScript, Apama’s scripting language. (This Fundamentals course does not cover writing Java programs – for info on how to do that, see the Apama Documentation.) Day 2, you’ll learn how to build an Apama application with a graphical modeling tool called the Event Modeler. You’ll also learn how to create a user interface for an application. The Apama user interface is called a dashboard. Finally, on Day 3, you’ll learn how to connect your Apama application to external software components. For this workshop, you’ll use a file adapter to understand event data coming in from a file (to simulate a market data feed – for demonstration purposes ) For this Fundamentals workshop, Client APIS will be discussed briefly, but not in detail . Day 3
15
Overview of Apama Components and Tools
External software you want to integrate Apama Development Tools Apama Studio Dashboard Builder MonitorScript Java Scenario Event Modeler Integration Adapter Framework Management and Monitoring (EMM) Event Correlator GUIs and Container Processes using Client APIs SCRIPT NOTES: You’ve seen an example of a running Apama application. Let’s take a look at how Apama works. There is a whole range of capabilities in the Apama product - from quick development and deployment, to custom development using a broad set of API’s, to monitoring and management tools. The Event Correlator is Apama’s engine - you can think of this as the runtime piece of the Apama platform. You can't have Apama without the Event Correlator. Event Correlation is a technique for making sense of a large number of events and pinpointing the few events that are really important in that mass of information. [CLICK] The Event Correlator understands instructions written in MonitorScript (Apama’s native scripting language), and Java. Our Integrated Development Environment (IDE) is called Apama Studio. Within this Eclipse-based environment, you can write Apama applications in MonitorScript or Java. The correlator also understands instructions provided by a type of file called a scenario. To create scenarios, you use the Event Modeler, a graphical-based tool that allows you to assemble an application with very little writing of code. [CLICK] The Dashboard Builder is for creating graphical interfaces for Apama applications. The GUI of choice is the Apama Dashboard, which communicates with the Event Correlator via a Dashboard Server. [CLICK] Alternately, an existing GUI or a GUI made with another tool, can interact with Apama in the same way that a Dashboard does via a programming interface that you create with the Client SDK. [CLICK] The Integration Adapter Framework allows you to connect Apama with other software. We provide out of the box a set of adapters for translating events from a non-Apama format to Apama format. This allows the correlator to analyze the event. An adapter plugs into the Apama Integration Adapter Framework (IAF) and injects events into the correlator. Adapters can be bi-directional converting event formats in both directions. The majority of those are for connecting to financial data feeds, order management systems and so on, but we do provide adapters more generically for things like messaging middleware, TIBCO Rendezvous, JMS for connection to Sonic for example, which is a Progress technology. If we don’t already provide an adapter out-of-the-box, the IAF framework enables you to create your own integration with Apama. For the other pieces, though, we have deployments that use some components, others that use different ones. They are by and large, optional tools depending on your application. [CLICK] For play back and Analysis we have the Apama ADBC (Apama Database Connector) adapter provides a mechanism to capture and to replay event streams from JDBC/ODBC compliant third party databases. Together, the ADBC standard adapter and Apama Studio’s Data Player let you analyze the actual performance of scenarios already in production, and also investigate the likely behavior of Apama scenarios prior to deployment. The Enterprise Management and Monitoring tool (EMM)– a graphical tool that enables users to start, stop and manage multiple event processing engines (called Correlators) as well as start/stop/manage the various Adapters being used by their system. Allows users to monitor the deployment of Apama across multiple machines, being able to start and stop processes, monitor load, and so on. Dashboard GUI Playback and Analysis Dashboard Server
16
Demonstration Sample Application – What You Will Build
Instructors Notes: Use the screen capture on this slide OR a live demo by running the Limit_Lab_3_Complete project SCRIPT NOTES: Here is a screen capture of the final dashboard, the Apama user interface, for this workshop's sample application called Limit Lab. The Limit Lab sample application is an implementation an off-market limit order trading strategy - for details see the handout entitled: "About the Apama Fundamentals Limit Lab Sample Application" (filename: 1-120_AboutSampleApplication.pdf). Today, Day 1, you will write MonitorScript code that monitors a simulated event stream of prices for Progress and Microsoft stock. Your program will take user input (the type and quantity of stock options to buy or sell), and monitor the event stream for when the market stock price falls or rises so that it can execute your buy or sell order. You will also write code that monitors your position - that is, how many options of a particular type of stock you have bought or sold, as well as the total cost or profit (cash). In Day 2, you will use the Event Modeler to create a scenario application that does the same thing - so that you can compare the two development methods. You will also learn how to build a dashboard that allows an end-user to view and interact with the application. Finally, on Day 3, you will use an adapter to access the event data - learning how to use the Integrated Adapter Program to interact with external software. For our sample application, you'll learn how to configure a file adapter.
17
Apama Fundamentals: 3-Day Agenda
Setting Up Your Development Environment Writing a MonitorScript Application Day 2 Creating a Scenario Application Building a User Interface Day 3 Interacting with External Software
18
Apama Fundamentals Training
Introduction to Apama Presenter’s Name Presenter’s Job Title and Association Date
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.