|
Project Information
Members
Featured
Downloads
Links
|
Ideally your application works perfectly all the time. But the real world is always less than ideal. So, wouldn't it be great if the person that cared about a specific event in the application could be emailed in the time interval that they cared about? Alertleon really shines in its ability to get the right alert emailed to the right person at the right time. But what does that really mean? In some ways you could think of Alertleon as an alternate to logging, except instead of looking in log files you get problems emailed right to you. It is true that some logging frameworks have email capability, but they are so limited in what they can do. Think about the normal case of dealing with errors and warnings. If you have an error there are key people that need to be notified in a timely matter that really do not need to know about the warnings. Plus the errors need to go out at a much faster interval, but the warnings do not. In either case there is always the potential to get spammed if the event happens over and over and that also needs to be managed. The way that Alertleon deals with all this is very elegant and simple. You start by setting up different alert queues. The reason you would set up different queues is so that different parts of the application can send alerts differently on a case by case basis. Then you configure each queue's mail settings. This includes the normal settings such as the server, port and recipients, but also includes more powerful settings such as when the queue should send out the alerts. To ensure that the same email does not keep getting sent in a given interval the queue will filter out alerts that are the same. The elegance of Alertleon comes in how you wire it up. First off, to handle the configuration Alertleon uses Configleon. This buys you the ability to define global settings and override them for each environment. Then secondly, you set up your queues with a clever use of Java Enums. This allows you to put an alert anywhere in your code and have names that mean something to you. The beauty is that each enum you define is all it takes to set up a different queue. As an example of using the alert system, here is how you create an alert that is being sent to the PRODUCT_DATA queue. AlertQueue.PRODUCT_DATA.add(Product.class, "This is a detailed error message"); Before I get to the details of how to setup Alertleon you might be asking yourself when would I really use this? At the place I work we use it as a way for the system to tell us when something is configured wrong. In our situation we do not know ahead of time if something is configured correctly because the data comes from a different system and is very date driven. One day things may be fine and the next day it is not right. So now if something is wrong an alert is sent off to the person that knows how to fix the problem. The technology team does not even need to be involved. This application has been road tested for over a year and I am very happy that it is now open sourced! To learn how to use Alertleon read the AlertQueue page. Then be sure to use the groups page if you have any questions or problems. Also, if you like or dislike using Alertleon let us know that too. Feel free to drop me a quick message at jeff.johnston.mn@gmail.com if that works better for you. As a young project is great to get all sorts of feedback. In Other News...Here are a few other frameworks and tools that I have developed.
|