Skip to main content link. Accesskey S
  • Anonymous
  • Log on
  • Help
  • IBM logo
  • IBM Web Experience Factory wiki
  • All Wikis
  • Home
  • Community Articles
  • Product Documentation
  • Learning Center


Search

Advanced Search

Categories

Tag Cloud

  • 6.1
  • 6.1.2
  • 6.1.5
  • 6.1.5.1
  • 7.0
  • Ajax
  • Alerts
  • Annotations
  • attachment
  • best practices
  • BlackBerry
  • builder
  • builder faq
  • builders
  • charts
  • Code samples
  • Connections
  • css
  • Custom builder
  • CustomBuilder
  • dashboard
  • Data Access
  • data access faq
  • Data and variables
  • Database
  • Databases
  • Debugging
  • demo
  • demo models
  • demo projects
  • demo widget
  • demos
  • deployment
  • deployment faq
  • Deployment scenarios
  • development
  • dojo
  • Domino
  • faq
  • fixpack
  • General FAQ
  • getting started
  • Help
  • HTML
  • html templates
  • ILOG
  • integration
  • iPhone
  • JViews
  • Learning
  • Logging
  • lotus connections
  • Lotus Widget Factory
  • media dashboard
  • media pf
  • media widget
  • mobile
  • mobile smartphone development
  • Model development
  • new
  • Notifications
  • overview
  • page automation
  • Portal
  • Portal Integration
  • portal integration faq
  • Portlet
  • Portlet Factory 7
  • presentation
  • presentation faq
  • Profiling
  • Quickr
  • REST
  • rest faq
  • REST Service Call
  • restructure handler
  • rich ui
  • sample
  • sample application
  • samples
  • schema
  • Security
  • Smartphones
  • SOA
  • social
  • Source Control
  • sql
  • summary and drilldown
  • Team development
  • Troubleshooting
  • ui
  • User Interface
  • video
  • web 2.0
  • Web Experience Factory
  • Web Experience Factory 8
  • Web Services
  • websphere dashboard framework
  • wef
  • wpf
InformationInformation
You are currently viewing machine translated content. IBM translation might be available. Click IBM Translated Product Documentation to see what is available.X


Home > Best Practices for WebSphere Dashboard Framework > WebSphere Dashboard Framework - Best practices for developing alerts
Rate this article 1 starRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

WebSphere Dashboard Framework - Best practices for developing alerts 

expanded Abstract
collapsed Abstract
No abstract provided.
ShowTable of Contents
HideTable of Contents
  • 1 General best practices
    • 1.1 New for WebSphere Dashboard Framework 6.1.5: Run Alerts models in WebSphere Application Server during development
    • 1.2 Deploy your Alerts project to both the WebSphere Application Server and the Portal Server during development
    • 1.3 Store alerts XML files in a project during development
    • 1.4 Enable caching to improve performance
    • 1.5 Use alerts logging to test and debug alert definitions
    • 1.6 Enable tracing as a debugging tool.
    • 1.7 Enable statistics logging to help pinpoint performance problems
  • 2 Designing Alerts for Performance
    • 2.1 Data Providers
    • 2.2 Alert Caching
    • 2.3 Alert Design Best Practices

General best practices



Follow these best practices when creating alerts for dashboard applications.

New for WebSphere Dashboard Framework 6.1.5: Run Alerts models in WebSphere Application Server during development


You can test your alerting application more conveniently by running alert models in WebSphere Application Server from the Designer user interface. Add the following value to the override.properties file located in the deployed_project_name/WEB-INF/config folder:
com.ibm.wdf.access.handler.class=com.ibm.wdf.access.VMMAccessDelegate

This property allows you to create alert definitions in the Designer user interface by running the ManageAlerts.model, which is located in WEB-INF/models/solutions/alerting/admin folder. You can also view My Alerts by running the MyAlertsPortlet.model, which is located in the WEB-INF/models/solutions/alerting folder.

Deploy your Alerts project to both the WebSphere Application Server and the Portal Server during development


Generally, a dashboard application that contains alerts is designed to run on WebSphere Portal. However, also deploying your project to WebSphere Application Server lets you connect Designer to the data source defined in WebSphere Application Server. This is helpful when you leverage the Alert Data builder to incorporate an SQL call result to the Alerts engine.

Store alerts XML files in a project during development


By default, XML files generated for alerts become part of the deployed WAR file in the portal server's installedApps folder. Storing files in the project during development prevents them from being overwritten when WAR files are redeployed and allows you to edit the files in Designer during development and testing.

Here are the properties and default paths for the various types of alerting data. The paths specified here match the default paths created in the project by the Alerts Module feature set. The paths specified must be complete paths from the root of the drive where you installed IBM WebSphere Portlet Factory Designer. For the alerts examples below, assume that the Eclipse workspace folder is created at c:\MyProjects\workspace and the project name is "MyFirstProject." The slashes in these paths are front slashes (/) and not back slashes (\) as these values need to have a universal interpretation for a variety of operating systems.

# Acknowledgments 
bowstreet.solutions.alerting.xmlFilePersistenceManager.acknowledgementFilePath=C:/MyProjects/workspace/MyFirstProject/WebContent/WEB-INF/solutions/alerting/xml_persistence/acknowledgements 
# Alert Definitions 
bowstreet.solutions.alerting.xmlFilePersistenceManager.alertDefFilePath=C:/MyProjects/workspace/MyFirstProject/WebContent/WEB-INF/solutions/alerting/xml_persistence/alert_defs 
# Generic Alerts 
bowstreet.solutions.alerting.xmlFilePersistenceManager.genericAlertFilePath=C:/MyProjects/workspace/MyFirstProject/WebContent/WEB-INF/solutions/alerting/xml_persistence/generic_alerts 
# Notifications 
bowstreet.solutions.alerting.xmlFilePersistenceManager.notificationFilePath=C:/MyProjects/workspace/MyFirstProject/WebContent/WEB-INF/solutions/alerting/xml_persistence/notifications 
# Notifier Definitions 
bowstreet.solutions.alerting.xmlFilePersistenceManager.notifierDefFilePath=C:/MyProjects/workspace/MyFirstProject/WebContent/WEB-INF/solutions/alerting/xml_persistence/notifier_defs 
# User Alerts 
bowstreet.solutions.alerting.xmlFilePersistenceManager.userAlertFilePath=C:/MyProjects/workspace/MyFirstProject/WebContent/WEB-INF/solutions/alerting/xml_persistence/user_alerts 
# User Contexts 
bowstreet.solutions.alerting.xmlFilePersistenceManager.userContextFilePath=C:/MyProjects/workspace/MyFirstProject/WebContent/WEB-INF/solutions/alerting/xml_persistence/user_contexts 


Enable caching to improve performance


Enable caching of alerts to improve performance. Edit an override.properties file located in the deployed_project_name/WEB-INF/config folder to include the following lines to enable caching for your type of persistence manager:

Database persistence manager

bowstreet.solutions.alerting.databasePersistenceManager.enableCaching=true 
bowstreet.solutions.alerting.databasePersistenceManager.cacheTimeoutInterval=60 


XML-file persistence manager

bowstreet.solutions.alerting.xmlFilePersistenceManager.enableAlertDefCaching=true 
bowstreet.solutions.alerting.xmlFilePersistenceManager.enableNotifierDefCaching=true 
bowstreet.solutions.alerting.xmlFilePersistenceManager.enableUserContextCaching=true 


Use alerts logging to test and debug alert definitions


You will need to review the WEB-INF/logs/alertsEngine.txt log while testing and debugging alert definitions. Leave the default logging enabled for the alerts engine so that it generates a log on the server that contains runtime warning and error messages. You can change the name, location, and logging level by editing the set of alerts engine specific property values in the WEB-INF/config/log4j.properties file.

Enable tracing as a debugging tool.


To help debug certain complex problems, enable tracing in the log by setting the following property in the WEB-INF/config/log4j.properties file.

bowstreet.solutions.alerting.alertsEngine.enableTracing=true 


Enable statistics logging to help pinpoint performance problems


To track server statistics, set the logging level to INFO in the WEB-INF/config/log4j.properties file. Statistics, such as those shown below, are stored in the WEB-INF/logs/serverStats.txt file.

Alerts Engine: 10 Latency: 568 
Alerts Engine/Evaluate: 8 Latency: 707 
Alerts Engine/Evaluate/JavaBasedAlert: 1 Latency: 62 
Alerts Engine/Evaluate/IteratedAlert: 2 Latency: 2765 
Alerts Engine/Evaluate/ModelBasedAlert: 1 Latency: 16 
Alerts Engine/Evaluate/JEPBasedAlert: 2 
Alerts Engine/Evaluate/EBITAAlert: 2 Latency: 23 
Alerts Engine/Xml-File Persistence Manager: 2 Latency: 15 
Alerts Engine/Xml-File Persistence Manager/Load User Contexts: 1 
Alerts Engine/Xml-File Persistence Manager/Load Alert Defs: 1 Latency: 31 
Alerts Engine/Cache Hits: 2 
Alerts Engine/Cache Misses: 8 


This output is useful when debugging your alert implementations since it tells you what alerts were evaluated and how long the evaluations took. For example, the line /Alerts Engine/Evaluate/EBITAAlert: 2 Latency: 23 tells you that the evaluator for EBITAAlert was invoked two times and these invocations took 23 milliseconds in total.

The lines

Alerts Engine/Cache Hits: 2 
Alerts Engine/Cache Misses: 8 


tell you that the Alerts Engine found at least one cached alert that precluded the need for two invocations of an evaluator, but that eight other times it was required to invoke alert evaluators to satisfy alert requests.

Designing Alerts for Performance



The Dashboard Framework alerts engine is a data-driven process. The engine uses one or more alert definitions and one or more data provider models to determine the set of alerts active at any point in time for any user. There are many factors that influence the overall performance of the alerts engine, but, in general, the two biggest factors are the amount of data required to generate alerts and how long those alerts can be cached by the engine.

Data Providers



Each alert definition uses a provider model to retrieve data from a back-end. This data is typically in the form of a row-set (rows of columns, usually from a database query). Each time the alerts engine needs to determine the set of active alerts for a definition it may need to invoke the provider model and retrieve the available alerting data. If the engine decides to invoke the provider model it will iterate over the returned rows evaluating the alert for each row's unique set of columns. At the end of this evaluation process the engine will have generated zero or more alerts from the row-set. The majority of the time required to process an alert definition is therefore dependent upon the performance of the back-end and, perhaps more importantly, the number of rows returned by the data provider.

Alert Caching



Alerts can be cached by the alerts engine. When caching is enabled the engine will first look in the cache to determine whether it has perviously generated alerts that are still valid. If valid alerts are found in the cache they are returned by the engine. On the other hand, if caching is disabled or cached alerts have expired, then the engine will be forced to invoke the data provider model to retrieve the current set of alerting data and re-evaluate each row. When the engine has completed the re-evaluation process it will cache the alerts if caching is enabled. From this it can plainly be seen that the alerts engine does far less work when it can return cached alerts.

Alert Design Best Practices



Design alert definitions that use small bounded sets of aggregate data rather than “raw” low-level data with unbounded sizes. Since alerting performance is so strongly influenced by the amount of data required for evaluation you can increase alerting performance by only relying upon aggregated data. For example, when designing an alert that works with sales data the most performant option would likely be to use a data provider that returns summary sales data aggregated by region or office. The number of sales regions and offices would be small and bounded therefore no matter how many sales records are created the amount of data retrieved by the alerts engine remains small and constant.

Enable caching in the alerts engine and design alert definitions so that generated alerts are cachable.

Avoid creating alert definitions that use data with a short lifetime. For example, you can create an alert definition in which the generated alerts expire one minute after they are created and cached. This short lifetime could cause the engine to invoke the data provider model every minute and retrieve all of the required data. A better approach is to choose data whose lifetime spans one or more days.


expanded Article information
collapsed Article information
Category:
Best Practices for WebSphere Dashboard Framework, WebSphere Dashboard Framework, Best Practices,
Tags:
best practices, dashboard, alerts

This Version: Version 57 November 2, 2011 2:50:56 PM by Rob Flynn  IBMer

expanded Attachments (0)
collapsed Attachments (0)

 


expanded Versions (18)
collapsed Versions (18)
Version Comparison     
Version Date Changed by               Summary of changes
This version (57) Nov 2, 2011 2:50:56 PM Rob Flynn  
56 Nov 2, 2011 2:49:04 PM Rob Flynn  
55 Nov 2, 2011 2:45:10 PM Rob Flynn  
54 Nov 2, 2011 2:44:49 PM Rob Flynn  
53 Nov 2, 2011 2:42:16 PM Rob Flynn  
52 Nov 2, 2011 2:41:44 PM Rob Flynn  
51 Nov 2, 2011 2:40:17 PM Rob Flynn  
50 Nov 2, 2011 9:17:29 AM Rob Flynn  
49 Nov 2, 2011 9:16:40 AM Rob Flynn  
48 Nov 2, 2011 9:11:26 AM Rob Flynn  
47 Nov 2, 2011 9:08:42 AM Rob Flynn  
46 Nov 2, 2011 9:08:03 AM Rob Flynn  
45 May 5, 2010 8:06:12 PM Kerry Thompson  
44 May 5, 2010 8:05:21 PM Kerry Thompson  
43 Apr 29, 2010 11:28:57 AM Kerry Thompson  
42 Jan 4, 2010 3:47:43 PM Rob Flynn  
41 Jan 4, 2010 3:46:22 PM Rob Flynn  
39 Mar 12, 2009 3:59:30 PM Kerry Thompson  
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedSubscribe to RSSHelpAbout
  • All Lotus and WebSphere Portal wikis
  • IBM developerWorks
  • IBM Software support
  • IBM Social Business User Experience Blog
  • IBMSocialBizUX on Twitter
  • IBMSocialBizUX on Facebook
  • Lotus product forums
  • IBM Social Business UX blog
  • IBM Collaboration Solutions
  • Recently added feedRecently added
  • Recently edited feedRecently edited
  • Recently added comments feedRecently Added Comments
  • Wiki Help
  • Forgot user name/password
  • Wiki design feedback
  • Content feedback
  • About the wiki
  • About IBM
  • Privacy
  • Contact IBM
  • IBM Terms of use
  • Wiki terms of use