View Source

h2. Processing Events Using Structured Stages

This example uses the IEP capability to call out to external IEP processes. In some systems, the event processing is partly filtering partly qualifying (adding data). When the qualification is using a lot of orthogonal information, we can end up with a fully connected staging model, like:
\\ !WithoutStaging2.png|thumbnail!

We can see how this can become heavily linked as we add to the processing information. The goal of this exercise is to show how to use the external IEP process calling to avoid this.
\\

h3. Technical Complexity

Medium

h3. Purposes

* Allow the processing of events in multiple steps
* Avoid creating IEP processes that are overly complex.
* Allow for extensibility in the IEP design

h3. Example Situation

* Need to acquire orthogonal information about an event, and forward the resulting qualified event.
* Is the event about an employee or a customer
** From which region of the world does the event originate?
*** Match the request to the proper region to get access to the proper inventory.
**** Check for the item requested, and if yes, forward the event.

If we were to do this in a single stage, this is what the process could look like: !iepWithoutStaging.PNG|thumbnail!
 
In the design section, we'll see what staging would do this interesting process...\\

h3. Design

This design makes use of the iep external process  calling. For this example, we would use only two stages.
# Determination if the request comes from an employee or a client.
# Determination of the location of the request (which part of the world) to query the proper inventory database.
\\

h4. Process Flow, Stage 1
\\ !StagingFirstPart.PNG|align=center!
 
\\

h4. Process Flow, Stage 2
\\ !StagingSecondPart.PNG|align=center!
 
\\

h4. Implementation Model


h3. IEP Constructs Used

* Inbound stream
* Projection and Filters
* Partitionned Windows
* Insert Stream
* Union
* Stream Output
* External IEP Process Callout

h4.


h3.


h3. Construction Instructions and files


h4.

* The Netbeans project for this example can be found [there|http://mediacast.sun.com/users/Serge_Blais/media/iepStagedEx1|Source code].
* A sample of a test message can be found in the test section of the composite application
* A sql script to populate the DB is in the process files of the iep project. It has to be run *{_}after{_}* the deployment of the application.

h3. Example Limitations

The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact