Event processing patterns PDF Print E-mail
Event processing patterns are being represented in various ways by the various programming styles. A logic programming view can be seen within the Etalis implementation:


%A delivery_alert is reported if a delivery_confirmation has not been reported
%within ten minutes of the commited delivery time.
% check_delivery/4
exceptionAlarmAbsoluteDatime(check_delivery(DeliveryRequestId,StoreId,DriverId,
        DeliveryTime),CheckTimeDelivery)<-
        assignment(DeliveryRequestId,StoreId,ToCoordinates,DeliveryTime,
                DriverId,_ScheduledPickupTime) where
        (check_delivery_time(WaitDuration),
                addSec_Datime(WaitDuration,DeliveryTime,CheckTimeDelivery)).
print_trigger(check_delivery/4).



This Etalis example shows Delivery Alert, which is an absence pattern, designating time out.  Note that this is achieved through logic programming inference. For more details see the ETALIS FFD example .


Another pattern example is the Automatic Assignment  in CCL with implements the any patterns, selecting the first bidder which meets the eligibility criteria:

/ Automatic takes the first bid "among the selected drivers".
// "Two minutes after the broadcast ..." in the spec implies that we wait for
// the two minutes, rather than picking off the first bid as it appears.

CREATE STREAM AutoDeliveryBid ;

INSERT INTO AutoDeliveryBid
SELECT CB.*,
  DS.RequestID AS DSRequestID,
  DS.DeliveryLatitude AS DeliveryLatitude,
  DS.DeliveryLongitude AS DeliveryLongitude,
  DS.RequiredPickUpTime AS RequiredPickUpTime,
  DS.RequiredDeliveryTime AS RequiredDeliveryTime,
  DS.Store AS DSStore
FROM DeliverySelection AS DS LEFT OUTER JOIN CurrentBids AS CB
ON DS.RequestID = CB.RequestID
WHERE DS.Automatic
ORDER BY Ts PER CB.RequestID   
LIMIT 1 ROWS PER CB.RequestID;


This pattern is implemented as SQL query, creating the derived event as a stream, copying attributes from the input streams of DeliverySelection and CurrentBids, and taking the first bidder by ordering the bids and then limit the rows to one. For more details see the CCL FFD example .

 
< Prev   Next >

Latest News

Deadline Extensions Announced

The Event Processing Technical Society in conjunction with the OMG Event Processing Community of Practice is sponsoring two competitions:An Innovative Event Processing Principles Contest. The contest ...
Read More ...

ACM DEBS 2011 Call for Tutorials

               Extended Deadline March 14, 2011 (23.59 GMT) The ACM DEBS (Distributed Event Based System) is the flagship conference of the event-based systems...
Read More ...

EPTS Presents Innovative Application Contest

  Event Processing Technical Society (EPTS) Presents Innovative Event Processing Application Contest   The Event Processing Technical Society in collaboration with the OMG Event Processing...
Read More ...

EPTS Presents Innovative Principles Contest

  Event Processing Technical Society (EPTS) Presents 2010 Innovative Event Processing Principles Contest   The Event Processing Technical Society is sponsoring an Innovative Event Processi...
Read More ...

New Paper: Integrating Complex Events for Collaborating and Dynamically Changing Business Processes

Integrating Complex Events for Collaborating and Dynamically Changing Business Processes Abstract: Business processes must become agile, respond to changes in the business environment in a timely ma...
Read More ...

Upcoming EPTS Related Events

Links

Link to us

RocketTheme Joomla Templates