Siddhi CEP 2nd sideshow presentation

893 views

Published on

The sideshow used at the 2nd presentation of the project Siddhi CEP

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Siddhi CEP 2nd sideshow presentation

  1. 1. S IDDHI -CEP A H IGH P ERFORMANCE C OMPLEX E VENT P ROCESSING E NGINE
  2. 2. Q UICK R ECAP <ul><ul><li>What is CEP? </li></ul></ul><ul><ul><li>Why Siddhi? </li></ul></ul>
  3. 3. W HAT IS CEP <ul><li>In abstract, the tasks of the CEP is to identify meaningful patterns, relationships and data abstractions among unrelated events and fire an immediate response such as an Alert message. </li></ul>
  4. 4. W HY S IDDHI ? <ul><ul><li>Cons in current CEP solutions </li></ul></ul><ul><ul><li>Proprietary </li></ul></ul><ul><ul><li>Not enough support for complex queries </li></ul></ul><ul><ul><li>Less efficient - High latency and memory consumption </li></ul></ul><ul><ul><li>Advantages in Siddhi </li></ul></ul>
  5. 5. P ROGRESS SO FAR ...
  6. 6. P ROGRESS SO FAR ... <ul><ul><li>Initial research  </li></ul></ul><ul><ul><li>System Design </li></ul></ul><ul><ul><li>1 st iteration </li></ul></ul><ul><ul><li>Web site </li></ul></ul><ul><ul><li>Improved Siddhi API </li></ul></ul><ul><ul><li>2 nd iteration  </li></ul></ul><ul><ul><ul><li>All major functionalities are implemented   </li></ul></ul></ul><ul><ul><li>Profiling and Performance Testing </li></ul></ul>
  7. 7. S IDDHI F UNCTIONALITIES <ul><li>Filter </li></ul><ul><li>State Machine (Sequence Query) </li></ul><ul><li>Join Event Streams </li></ul><ul><li>Time Window </li></ul><ul><li>Length Window </li></ul>
  8. 8. API TO W RITE Q UERIES <ul><li>Sample query for Filter </li></ul><ul><li>Query query = qf.createQuery( </li></ul><ul><li>                    &quot;StockQuote&quot; , </li></ul><ul><li>                    qf.output(&quot;price=CSEStream.price&quot;) , </li></ul><ul><li>                    qf.inputStream(cseEventStream), </li></ul><ul><li>                    qf.condition(&quot;CSEStream.symbol&quot;, EQUAL, &quot;IBM&quot;) </li></ul><ul><li>            ); </li></ul>
  9. 9. API TO W RITE Q UERIES <ul><li>Sample query for Sequence Query </li></ul><ul><li>Query query = qf.createQuery( </li></ul><ul><li>                    &quot;StockQuote&quot; , </li></ul><ul><li>                    qf.output(&quot;action=$0.action&quot;, &quot;priceA=$1.price&quot;, &quot;priceA=$2.price&quot;),  </li></ul><ul><li>                    qf.inputStreams(cseEventStream, infoStock), </li></ul><ul><li>                    qf.sequence( </li></ul><ul><li>                            qf.condition(&quot;infoStock.action&quot;, EQUAL, &quot;buy&quot;), </li></ul><ul><li>                            qf.every( </li></ul><ul><li>                                    qf.condition(&quot;CSEStream.price&quot;, GREATERTHAN, &quot;75&quot;), </li></ul><ul><li>                                    qf.condition(&quot;CSEStream.price&quot;, GREATERTHAN, &quot;$1.price&quot;) </li></ul><ul><li>                            ) </li></ul><ul><li>                    ) </li></ul><ul><li>            ); </li></ul>
  10. 10. API TO W RITE Q UERIES <ul><li>Aggregators </li></ul><ul><li>avg </li></ul><ul><li>count </li></ul><ul><li>max </li></ul><ul><li>min </li></ul><ul><li>sum </li></ul><ul><li>Query query = qf.createQuery( </li></ul><ul><li>                    &quot;StockQuote&quot;, </li></ul><ul><li>                    qf.output( &quot;symbol=CSEStream.symbol“, &quot;avgPrice= avg(CSEStream.price) &quot;, </li></ul><ul><li> &quot;count=count(CSEStream.symbol)&quot;), </li></ul><ul><li>                    qf.inputStream(cseEventStream), </li></ul><ul><li>                    qf.condition(&quot;CSEStream.symbol&quot;, EQUAL, &quot;IBM&quot;) </li></ul><ul><li>            ); </li></ul>
  11. 11. P ERFORMANCE T ESTING <ul><li>  </li></ul>Details of the machine we used Hardware : Intel- Core 2 Duo 2.10 GHz Memory 1.9GB OS : Ubuntu Release 9.10 Kernel Linux 2.6.31-14-generic GNOME - 2.28.1
  12. 12. P ERFORMANCE C OMPARISON WITH E SPER <ul><li>  </li></ul>Performance Comparison for a simple filter without a window Events Siddhi (ms) Esper (ms) 10 4 5 100 5.6 9.8 1000 34.5 55.2 10,000 252.6 491 100,000 961.4 1669.2 1000,000 3730.6 5546.8
  13. 13. P ERFORMANCE C OMPARISON WITH E SPER <ul><li>  </li></ul>Performance Comparison for a timed window query for average calculation for a given symbol Events Siddhi (ms) Esper (ms) 10 5 9 100 10.6 16.2 1000 52 109.2 10,000 419.2 1159.2 100,000 1302.8 2724 1000,000 7883.2 11589.8
  14. 14. P ERFORMANCE C OMPARISON WITH E SPER <ul><li>  </li></ul>Performance Comparison for a State machine query Events Siddhi (ms) Esper (ms) 10 5.8 30 100 11 58.4 1000 98.6 333 10,000 550.4 2285.6 100,000 1606 9663.2 1000,000 12563 77641
  15. 15. Questions?
  16. 16. Thank You 

×