SlideShare uma empresa Scribd logo
1 de 46
Baixar para ler offline
Darach	
  Ennis	
  (darach@streambase.com)	
  @darachennis                   	
  
                       StreamBase	
  Systems            	
  
          Erlang	
  Factory	
  London	
  -­‐	
  	
  June	
  10th	
  2011	
  




 Complex	
  Er[jl]ang	
  Processing	
  with	
  StreamBase:      	
  
A	
  DSL	
  for	
  Low	
  Latency	
  High	
  Frequency	
  CompuOng   	
  


                   +                              +                       =
                              Copyright 2011 © StreamBase Systems, Inc.             1	
  
Agenda	
  

  What	
  is	
  ‘Complex	
  Event	
  Processing’	
  
     •  Specifically	
  flow	
  oriented	
  event	
  processing	
  (there	
  are	
  others)	
  
     •  Streams	
  &	
  Operators.	
  Windowing,	
  Branching,	
  Combining,	
  Extending	
  
  A	
  day	
  in	
  the	
  life	
  of	
  a	
  flow	
  programmer	
  
     •    RelaOvity	
  -­‐	
  Data	
  parallelism,	
  concurrency,	
  latency	
  &	
  throughput	
  
     •    ConOnuity	
  -­‐	
  ConOnuous	
  Streaming	
  Map	
  Reduce	
  
     •    Reliability	
  –	
  High	
  availability,	
  the	
  low	
  latency	
  way	
  
     •    Flow,	
  meets	
  FuncOon.	
  Embed	
  Erlang	
  in	
  process	
  via	
  Erjang	
  
  Integra?on.	
  Erlang	
  –	
  the	
  ecosystem.	
  
     •  Calling	
  Erlang	
  from	
  StreamBase	
  –	
  Simple	
  &	
  windowed	
  funcOons	
  
     •  Client/Server	
  –	
  Pushing	
  events	
  to/from	
  StreamBase	
  
     •  RabbitMQ	
  -­‐	
  Messaging	
  
  TheC.	
  Erlang	
  –	
  the	
  inspira?on.	
  Paxos,	
  in	
  StreamBase	
  

                                            Copyright 2011 © StreamBase Systems, Inc.                  2	
  
High	
  Level	
  DSLs	
  :	
  Myth	
  Vs	
  Reality	
  

Myth:	
  High	
  level	
  domain	
  
specific	
  languages	
  are	
  
too	
  slow	
  for	
  HFT.	
  

Reality:	
  High	
  level	
  domain	
  
specific	
  languages	
  can	
  deliver	
  
beLer	
  performance	
  than	
  
system	
  programming	
  languages	
  
when	
  tailored	
  to	
  a	
  specific	
  task.	
  
                                     Copyright 2011 © StreamBase Systems, Inc.   3	
  
Complex	
  Event	
  Processing	
  aka	
  Event	
  Processing	
  

  SoCware	
  organized	
  by	
  events	
  (cf:	
  object/func?on	
  oriented)	
  
     •  What’s	
  an	
  event?	
  What’s	
  an	
  object?	
  
           •  Something	
  that	
  can	
  trigger	
  processing,	
  can	
  include	
  data.	
  
     •  Naturally	
  but	
  not	
  usually	
  represents	
  a	
  “real	
  world”	
  events	
  &	
  observaOons.	
  
  Complex	
  Event	
  Processing	
  PlaTorms	
  
     •  Soeware	
  stack	
  for	
  event	
  based	
  systems,	
  event	
  driven	
  architectures	
  
     •  Event	
  Programming	
  Language	
  –	
  SQL-­‐based,	
  Rules-­‐based,	
  or	
  State-­‐based	
  
     •  Commercial	
  and	
  open	
  source:	
  StreamBase,	
  Progress,	
  Microsoe,	
  IBM,	
  
        Oracle,	
  SAP,	
  Esper,	
  Drools	
  and	
  many	
  more	
  
  Adopted	
  in	
  financial	
  services	
  and	
  other	
  markets	
  
     •  System	
  monitoring,	
  industrial	
  process	
  control,	
  logisOcs,	
  defense/
        intelligence	
  
  Other	
  Event	
  Processing	
  Approaches:	
  
     •  Erlang,	
  Scala/Akka,	
  Actors,	
  node.js,	
  .NET	
  Rx	
  
                                               Copyright 2011 © StreamBase Systems, Inc.                              4	
  
What	
  does	
  a	
  CEP	
  DSL	
  or	
  Language	
  offer?	
  

  Con?nuously	
  Observe,	
  Orient,	
  Decide	
  Act	
  (OODA)	
  on	
  event	
  
   streams	
  
                                                                                                   Wikipedia:	
  
    •    ConOnuous	
  Incremental	
  Query	
                                                       John	
  Boyd,	
  
    •    Pajern	
  matching	
  within	
  or	
  across	
  streams	
                                 OODA	
  Loop	
  

    •    Branch	
  –	
  Split,	
  Causal	
  Split,	
  Filter.	
  
    •    Combine	
  -­‐	
  Semi-­‐Join,	
  Union,	
  Gather,	
  Merge,	
  Join,	
  Pajern	
  
    •    Windows	
  –	
  Process	
  sets	
  of	
  streaming	
  data	
  
           •  Sliding	
  or	
  Tumbling,	
  Overlapping	
  or	
  Non-­‐Overlapping,	
  Gaps	
  or	
  No	
  Gaps	
  
           •  Finite	
  (1	
  second,	
  1000	
  tuples),	
  Infinite	
  
           •  Emission	
  Policies:	
  On	
  Close,	
  Every	
  odd	
  message	
  
           •  Predicate	
  based	
  –	
  Roll	
  your	
  own	
  window	
  type	
  
    •  State	
  Management	
  –	
  In	
  memory,	
  CSV	
  files,	
  CSV	
  sockets,	
  RDBMS,	
  Parallel	
  
       DBMSs,	
  Column	
  Stores,	
  KV	
  stores,	
  NoSQL,	
  NewSQL…	
  
    •  Nice	
  to	
  have:	
  	
  
           •  DeclaraOve	
  concurrency,	
  Interface	
  Polymorphism,	
  DistribuOon,	
  Extensible	
  
                                               Copyright 2011 © StreamBase Systems, Inc.                               5	
  
Challenges	
  for	
  CEP	
  

  ‘Über’	
  Ultra	
  Low	
  Latency?	
  
     •  Sub-­‐milli	
  is	
  standard,	
  sub-­‐100-­‐micro	
  is	
  desirable.	
  Less	
  is	
  more!	
  
  Large	
  Data	
  Volumes	
  
     •  Hundreds	
  of	
  thousands	
  of	
  events,	
  thousands	
  of	
  decisions,	
  per	
  thread.	
  
     •  Big	
  Data.	
  ~Hundreds	
  of	
  SMP	
  CEP	
  nodes.	
  
  Demanding	
  Opera?onal	
  Environment	
  
     •  24x7,	
  365	
  –	
  in	
  criOcal	
  environments	
  (trading,	
  surveillance,	
  uOliOes)	
  
  Sophis?cated	
  Data	
  Processing	
  (some?mes)	
  
     •  OpOons	
  pricing,	
  yield	
  curves,	
  risk	
  metrics,	
  smart	
  grid	
  capacity	
  planning,	
  
        fraud	
  detecOon.	
  
  How	
  it’s	
  done	
  (QCON	
  London	
  2011):	
  
     •  How	
  LMAX	
  did	
  it?	
  hjp://bit.ly/fUeS0P	
  
     •  How	
  we	
  did	
  it?	
  hjp://bit.ly/hM6NAP	
  <-­‐	
  Our	
  CTO	
  Richard	
  Tibbejs	
  talk	
  

                                               Copyright 2011 © StreamBase Systems, Inc.                           6	
  
StreamBase	
  Event	
  Processing	
  Plauorm	
  
                                                                      Studio	
  Integrated	
  Development	
  Environment	
                                     Visualiza?on	
  
          Developer	
  Studio	
  
          Graphical	
  StreamSQL	
  for	
  developing,	
  	
  
          back	
  tesOng	
  and	
  deploying	
  applicaOons.	
  	
  	
  

                                              StreamBase	
  
               StreamBase	
  
                                              Component	
  
               Frameworks	
  	
  
                                               Exchange	
  
                                                                                             ApplicaOons	
  




Input	
  Adapter(s)	
  
Inject	
  streaming	
  (market	
  data)	
  
                                                    Adapters	
                                                                    Adapters	
  
and	
  staOc	
  (reference	
  data)	
                                         StreamBase	
  Server	
  
                                                                                                  	
  
sources.	
  




                                                                           Event	
  Processing	
  Server	
                                       Output	
  Adapter(s)	
  
                                                                           High	
  performance	
  opOmized	
  engine	
                           Send	
  results	
  to	
  systems,	
  users,	
  user	
  
                                                                           can	
  process	
  events	
  at	
  market	
  data	
                    screens	
  and	
  databases.	
  
                                                                           speeds.	
  

                                                                                Copyright 2011 © StreamBase Systems, Inc.                                                                            7	
  
How	
  did	
  we	
  do	
  it?	
  
  Compila?on	
  and	
  Sta?c	
  Analysis	
  
     •  Design	
  the	
  language	
  for	
  it	
  
  Modular	
  abstrac?on,	
  interfaces	
  
     •  Quants	
  and	
  Developers	
  Collaborate,	
  share	
  code	
  
  Bytecode	
  genera?on	
  and	
  the	
  Janino	
  compiler	
  
     •  OpOmized	
  bytecodes,	
  in-­‐memory	
  generaOon	
  	
  
  Garbage	
  op?miza?on	
  
     •  Pooling,	
  data	
  class,	
  invasive	
  collecOons	
  
  Integra?ons,	
  C++	
  and	
  Java	
  plugins	
  
     •  Efficient	
  naOve	
  interfaces,	
  Hardware	
  acceleraOon	
  
  Adapter	
  API,	
  FIX	
  Messaging	
  
     •  Threading	
  and	
  API	
  structure	
  for	
  ultra	
  low	
  latency	
  
  Parallelism,	
  Clustering,	
  Lanes	
  and	
  Tiers	
  
     •  Scalability,	
  with	
  a	
  latency	
  bias.	
  
  Modularity	
  through	
  Named	
  Data	
  Formats,	
  Schemas	
  
     •  Sharing	
  data	
  and	
  semanOcs	
  between	
  apps	
  
                                               Copyright 2011 © StreamBase Systems, Inc.   8	
  
StreamBase	
  StreamSQL	
  EventFlow	
  



                                                           Rapid	
  Deployment	
  
                                                             &	
  Unit	
  TesOng	
  
                Modularity	
  &	
  
                Polymorphism	
  




                                                           Interfaces	
  &	
            Off	
  The	
  Shelf	
  
                Off	
  The	
  Shelf	
                     Extension	
  Points	
         Business	
  Logic	
  
                ConnecOvity	
  



                                         Copyright 2011 © StreamBase Systems, Inc.                               9	
  
Operators	
  –	
  Hi	
  Erlang.	
  Hello	
  StreamBase	
  




 Did	
  you	
  just	
  tell	
  
  me	
  to	
  go	
  flow	
  
        myself?	
  




                                  Copyright 2011 © StreamBase Systems, Inc.   10	
  
Agenda	
  

  What	
  is	
  ‘Complex	
  Event	
  Processing’	
  
     •  Specifically	
  flow	
  oriented	
  event	
  processing	
  (there	
  are	
  others)	
  
     •  Streams	
  &	
  Operators.	
  Windowing,	
  Branching,	
  Combining,	
  Extending	
  
  A	
  day	
  in	
  the	
  life	
  of	
  a	
  flow	
  programmer	
  
     •    RelaOvity	
  -­‐	
  Data	
  parallelism,	
  concurrency,	
  latency	
  &	
  throughput	
  
     •    ConOnuity	
  -­‐	
  ConOnuous	
  Streaming	
  Map	
  Reduce	
  
     •    Reliability	
  –	
  High	
  availability,	
  the	
  low	
  latency	
  way	
  
     •    Flow,	
  meets	
  FuncOon.	
  Embed	
  Erlang	
  in	
  process	
  via	
  Erjang	
  
  Integra?on.	
  Erlang	
  –	
  the	
  ecosystem.	
  
     •  Calling	
  Erlang	
  from	
  StreamBase	
  –	
  Simple	
  &	
  windowed	
  funcOons	
  
     •  Client/Server	
  –	
  Pushing	
  events	
  to/from	
  StreamBase	
  
     •  RabbitMQ	
  -­‐	
  Messaging	
  
  TheC.	
  Erlang	
  –	
  the	
  inspira?on.	
  Paxos,	
  in	
  StreamBase	
  

                                            Copyright 2011 © StreamBase Systems, Inc.                  11	
  
A	
  day	
  in	
  the	
  life…	
  Why	
  a	
  DSL?	
  

  High	
  level	
  –	
  Windowing,	
  Combina?on	
  &	
  PaLern	
  Matching	
  
   Streams	
  
  Graphical	
  –	
  ‘See’	
  the	
  flow,	
  dependencies,	
  pathways	
  
  Fast,	
  Flexible	
  SDLC	
  –	
  Deploy	
  new	
  algorithms,	
  con?nuously	
  
  Understandable	
  –	
  Rise	
  to	
  the	
  abstrac?on	
  
  Flexible	
  




                                         Copyright 2011 © StreamBase Systems, Inc.     12	
  
A	
  day	
  in	
  the	
  life..	
  More	
  is	
  more!	
  




                                         Copyright 2011 © StreamBase Systems, Inc.   13	
  
Make	
  it	
  work.	
  Measure	
  it.	
  -­‐	
  Baseline	
  ‘Noop’	
  Performance	
  




          WARNING:	
  Micro-­‐
            benchmark.	
  
              YMMV	
  

                                 Copyright 2011 © StreamBase Systems, Inc.              14	
  
Concurrency	
  –	
  Baseline	
  -­‐	
  Results	
  



                                                                              Nice.	
  1.1	
  million	
  
                                                                                 events/sec	
  




                                  Copyright 2011 © StreamBase Systems, Inc.                                 15	
  
Parallelize	
  it	
  –	
  The	
  ‘Convenient,	
  but	
  incorrect’	
  way	
  




    Execution Order & Concurrency:

    Rule 1 –            Each event processed to completion left-right
    Rule 2 –            Branches processed sequentially
    Rule 3 –            Outputs are processed sequentially
    Rule 4 –            Module output processed to completion immediately
    Rule 5 –            One operator executed at a time




                                  Copyright 2011 © StreamBase Systems, Inc.     16	
  
Gah!	
  WTF?!	
  




                    Copyright 2011 © StreamBase Systems, Inc.   17	
  
OpOmize	
  it!	
  ObservaOon	
  #1	
  




                                                                          Measure	
  the	
  cost	
  
                                                                          of	
  thread	
  context	
  
                                                                          switches.	
  Dodge	
  
                                                                                  &	
  Burn!	
  




                              Copyright 2011 © StreamBase Systems, Inc.                                 18	
  
OpOmize	
  it!	
  ObservaOon	
  #2	
  –	
  It’s	
  Map/Combine/Reduce	
  




                             Copyright 2011 © StreamBase Systems, Inc.      19	
  
CSMR	
  –	
  A	
  ‘pajern’	
  for	
  low	
  latency	
  high	
  throughput?	
  




                                 Copyright 2011 © StreamBase Systems, Inc.       20	
  
CSMR	
  –	
  A	
  ‘pajern’	
  for	
  low	
  latency	
  high	
  throughput?	
  Yup!	
  

                                                25	
  




                                                                                                20	
                                                                                         20	
  
                                                20	
  
                                                                                                                                                              18	
  
  Millions	
  of	
  tuples	
  /	
  second	
  
      Throughput	
  (Mtps)	
  	
  




                                                15	
  



                                                                                                                                                                                                                   Across	
  Region	
  
                                                                                                                                                                                    10	
  
                                                10	
                                                                           9.4	
                                                                               Within	
  Region	
  
                                                                  8	
                   8	
  



                                                  5	
     4	
                                                          4	
                            4	
  




                                                  0	
  
                                                          Gather	
                      Merge	
                   Branch	
  &	
  Join	
      Filter	
  Even	
  Random	
        Baseline	
  (Noop)	
  
                                                                          Benchmark	
  HW:	
  Dell	
  RS510,	
  8	
  core,	
  32	
  GB	
  RAM,	
  2.4GHz	
  IA-­‐64,	
  OS:	
  RHEL	
  5u3,	
  SB	
  7.0.1.2	
  




                                                                                                                     Copyright 2011 © StreamBase Systems, Inc.                                                                            21	
  
CSMR	
  +	
  GPUs	
  /	
  FPGAs?	
  Sure!	
  




We can build on SMP and cluster wide distribution algorithms to further optimize interactions with
accelerated compute technologies. We can exploit accelerated hardware messaging where regular
network IO is insufficient for distribution results over 1Ge or regular networking technologies.
The pattern above is a continuous streaming variant of Map/Reduce in EventFlow.

                                        Copyright 2011 © StreamBase Systems, Inc.                    22	
  
Similar	
  OpOmizaOon’s	
  apply	
  to	
  GPUs	
  too!	
  




                               Copyright 2011 © StreamBase Systems, Inc.   23	
  
A	
  day	
  in	
  the	
  life..	
  Reliability	
  




                                         Copyright 2011 © StreamBase Systems, Inc.   24	
  
A	
  day	
  in	
  the	
  life..	
  Reliability	
  

  Hot/Hot,	
  Hot/Warm,	
  Hot/Cold,	
  None?!	
  




                                         Copyright 2011 © StreamBase Systems, Inc.   25	
  
A	
  day	
  in	
  the	
  life..	
  Reliability	
  




                                         Copyright 2011 © StreamBase Systems, Inc.   26	
  
A	
  day	
  in	
  the	
  life..	
  Reliable	
  CSMR	
  




                                      Copyright 2011 © StreamBase Systems, Inc.   27	
  
Agenda	
  

  What	
  is	
  ‘Complex	
  Event	
  Processing’	
  
     •  Specifically	
  flow	
  oriented	
  event	
  processing	
  (there	
  are	
  others)	
  
     •  Streams	
  &	
  Operators.	
  Windowing,	
  Branching,	
  Combining,	
  Extending	
  
  A	
  day	
  in	
  the	
  life	
  of	
  a	
  flow	
  programmer	
  
     •  RelaOvity	
  -­‐	
  Data	
  parallelism,	
  concurrency,	
  latency	
  &	
  throughput	
  
     •  ConOnuity	
  -­‐	
  ConOnuous	
  Streaming	
  Map	
  Reduce	
  
     •  Reliability	
  –	
  High	
  availability,	
  the	
  low	
  latency	
  way	
  
  Integra?on.	
  Erlang	
  –	
  the	
  ecosystem.	
  
     •  Calling	
  Erlang	
  from	
  StreamBase	
  –	
  Simple	
  &	
  windowed	
  funcOons	
  
     •  Client/Server	
  –	
  Pushing	
  events	
  to/from	
  StreamBase	
  
     •  RabbitMQ	
  -­‐	
  Messaging	
  
  TheC.	
  Erlang	
  –	
  the	
  inspira?on.	
  Paxos,	
  in	
  StreamBase	
  


                                           Copyright 2011 © StreamBase Systems, Inc.                 28	
  
Operators	
  –	
  Hi	
  Erlang.	
  Hello	
  StreamBase	
  

  Aggregate	
  –	
  A	
  window	
  of	
  moving	
  data	
  
     •    Time	
  based	
  –	
  eg:	
  the	
  last	
  10	
  seconds,	
  .001	
  seconds,	
  day	
  
     •    Field	
  based	
  –	
  eg:	
  historical	
  Ome	
  (Omestamp,	
  …)	
  
     •    Tuple	
  based	
  –	
  eg:	
  the	
  last	
  1000	
  tuples	
  
     •    Predicate	
  based	
  –	
  expressions	
  determine	
  when	
  to	
  open,	
  close	
  and/or	
  emit	
  
          interesOng	
  results	
  from	
  a	
  window	
  
  Mul?-­‐dimensional	
  
     •  Give	
  me	
  the	
  last	
  seconds	
  worth	
  of	
  events	
  or	
  the	
  last	
  10000,	
  whichever	
  
        happens	
  first	
  
  Grouping	
  
     •  ParOOon	
  by	
  Symbol	
  implies	
  a	
  window	
  per	
  Symbol	
  ‘concurrently	
  –	
  on	
  the	
  
        same	
  thread’	
  




                                              Copyright 2011 © StreamBase Systems, Inc.                                 29	
  
Windows	
  in	
  the	
  Wild	
  -­‐	
  #1	
  Riak	
  

  Riak	
  Core:	
  hLps://github.com/basho/riak_core	
  
     •  Mixes	
  the	
  ‘when’	
  window	
  dimension	
  (Ome)	
  with	
  the	
  what	
  ‘aggregaOon’	
  




                                         Copyright 2011 © StreamBase Systems, Inc.                          30	
  
Windows	
  in	
  the	
  Wild	
  -­‐	
  #2	
  tlack	
  on	
  BitBucket	
  

  Thomas	
  Lackner	
  -­‐	
  tlack	
  -­‐	
  EMA:	
  
     •  hjps://bitbucket.org/tlack/erlang-­‐exponenOal-­‐moving-­‐average/overview              	
  
     •  Mixes	
  the	
  ‘when’	
  window	
  dimension	
  (Ome)	
  with	
  the	
  what	
  ‘aggregaOon’	
  
        and	
  number	
  of	
  occurrences	
  ‘how	
  many’	
  




                                          Copyright 2011 © StreamBase Systems, Inc.                         31	
  
Embedding	
  Erlang	
  (Erjang)	
  




                                                                         Prepend the dir defining our
                                                                         behaviors to the code path




                             Copyright 2011 © StreamBase Systems, Inc.                                  32	
  
Define	
  Behavioral	
  Contracts	
  




                             Copyright 2011 © StreamBase Systems, Inc.   33	
  
Implement	
  &	
  Test	
  in	
  Erlang	
  (or	
  Erjang!)	
  




                                                                               Duh!	
  
                                                                               Typo!	
  




                                   Copyright 2011 © StreamBase Systems, Inc.       34	
  
Expose	
  to	
  StreamBase	
  [	
  Call	
  by	
  Behaviour/Mod]	
  #1	
  




                                Copyright 2011 © StreamBase Systems, Inc.   35	
  
Expose	
  To	
  StreamBase	
  [Call	
  by	
  Behaviour/Mod]	
  #2	
  




                              Copyright 2011 © StreamBase Systems, Inc.   36	
  
Use,	
  Deploy	
  &	
  Run	
  
                                                                                                   Wikipedia:	
  
                                                                                                    MACD	
  




                                                                             Example:

                                                                             Continuous Streaming
                                                                             Map/Reduce with 1-second
                                                                             MACD compression.
                                                                             Linearly SMP scalable.

                                                                             Just add boxes to scale!

                                 Copyright 2011 © StreamBase Systems, Inc.                                  37	
  
Run,	
  Rabbit,	
  Run,	
  Rabbit,	
  …	
  




                                   Copyright 2011 © StreamBase Systems, Inc.   38	
  
Agenda	
  

  What	
  is	
  ‘Complex	
  Event	
  Processing’	
  
     •  Specifically	
  flow	
  oriented	
  event	
  processing	
  (there	
  are	
  others)	
  
     •  Streams	
  &	
  Operators.	
  Windowing,	
  Branching,	
  Combining,	
  Extending	
  
  A	
  day	
  in	
  the	
  life	
  of	
  a	
  flow	
  programmer	
  
     •  RelaOvity	
  -­‐	
  Data	
  parallelism,	
  concurrency,	
  latency	
  &	
  throughput	
  
     •  ConOnuity	
  -­‐	
  ConOnuous	
  Streaming	
  Map	
  Reduce	
  
     •  Reliability	
  –	
  High	
  availability,	
  the	
  low	
  latency	
  way	
  
  Integra?on.	
  Erlang	
  –	
  the	
  ecosystem.	
  
     •  Calling	
  Erlang	
  from	
  StreamBase	
  –	
  Simple	
  &	
  windowed	
  funcOons	
  
     •  Client/Server	
  –	
  Pushing	
  events	
  to/from	
  StreamBase	
  
     •  RabbitMQ	
  -­‐	
  Messaging	
  
  TheC.	
  Erlang	
  –	
  the	
  inspira?on.	
  Paxos,	
  in	
  StreamBase	
  


                                           Copyright 2011 © StreamBase Systems, Inc.                 39	
  
SB	
  Paxos	
  –	
  Entrypoint	
  (cc	
  @kevsmith!)	
  




                                Copyright 2011 © StreamBase Systems, Inc.   40	
  
SB	
  Paxos	
  –	
  Autonomic,	
  Self	
  Healing	
  Ring	
  




                                  Copyright 2011 © StreamBase Systems, Inc.   41	
  
SB	
  Paxos	
  –	
  Generic	
  FSM	
  ‘Behaviour’	
  




                                 Copyright 2011 © StreamBase Systems, Inc.   42	
  
SB	
  Paxos	
  –	
  Generic	
  FSM	
  ‘Behaviour’	
  –	
  Paxos	
  FSM	
  
StateMap,State,TransiOon,NextState,AcOon,DescripOon,	
  
BasicPaxosMap,IniOal,Bootstrap,Proposer,Prepare,"..."	
  
BasicPaxosMap,IniOal,PromiseOk,Accepter,PromiseOk,"..."	
  
BasicPaxosMap,IniOal,PromiseNotOk,Done,PromiseNotOk,"..."	
  
BasicPaxosMap,IniOal,Accepted,Learner,Response,"When	
  ..."	
  
BasicPaxosMap,Proposer,Accept,Proposer,Accept,"..."	
  
BasicPaxosMap,Proposer,PromiseNotOk,Proposer,DoNothing,"..."	
  
BasicPaxosMap,Proposer,Response,Done,Gone,DoStop,"..."	
  
BasicPaxosMap,Accepter,Accept,Learner,Accept,"..."	
  
BasicPaxosMap,Accepter,Accepted,Learner,Response,"..."	
  
BasicPaxosMap,Learner,Accepted,Done,Response,"..."	
  
BasicPaxosMap,Learner,Done,Gone,DoStop,"..."	
  




                                    Copyright 2011 © StreamBase Systems, Inc.   43	
  
Shameless	
  Plugs	
  

  StreamBase	
  
     •  You	
  could	
  build	
  one	
  of	
  these	
  yourself,	
  or	
  use	
  ours…	
  
     •  Download	
  and	
  test	
  out	
  the	
  full	
  product	
  hjp:/www.streambase.com	
  
     •  Build	
  something	
  and	
  submit	
  to	
  the	
  StreamBase	
  Component	
  Exchange	
  
        hjp://sbx.streambase.com	
  	
  	
  
     •  Contact	
  us	
  to	
  buy	
  or	
  to	
  an	
  OEM	
  partner,	
  offices	
  London,	
  Boston,	
  New	
  York	
  
     •  We’re	
  hiring	
  
     •  We’re	
  training	
  
           •  hjp://www.streambase.com/developers-­‐training-­‐events.htm	
  

  DEBS	
  –	
  Distributed	
  Event	
  Based	
  Systems	
  
     •  Academic	
  (ACM)	
  Conference	
  outside	
  NYC	
  in	
  July	
  
  EPTS	
  –	
  Event	
  Processing	
  Technology	
  Society	
  
     •  hjp://ep-­‐ts.org	
  industry	
  consorOum	
  

                                         Ques?ons?	
  
                                              Copyright 2011 © StreamBase Systems, Inc.                                 44	
  
Acknowledgements	
  

  Erlang,	
  Erlang	
  Solu?ons,	
  Erlang	
  UG	
  London,	
  &	
  Erlang	
  Factory	
  
         •    hjp://www.erlang.org/	
  
         •    hjp://www.erlang-­‐soluOons.com/	
  	
  
         •    hjp://www.erlang-­‐soluOons.com/etc/usergroup/london	
  	
  
         •    hjp://www.erlang-­‐factory.com/	
  
  Erjang	
  –	
  The	
  Java	
  based	
  Erlang	
  Virtual	
  Machine	
  
         •  hjps://github.com/trifork/erjang/wiki/	
  	
  
  erlIDE	
  
         •  hjp://erlide.sourceforge.net/	
  	
  
  @?bbeLs	
  –	
  I	
  stole	
  borrowed	
  some	
  of	
  his	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  slides!	
  
  Download	
  StreamBase	
  and	
  tell	
  us	
  what	
  you	
  think:	
  
         •  hjp://www.streambase.com	
  


                                                                 Copyright 2011 © StreamBase Systems, Inc.                                                  45	
  
Download	
  StreamBase	
  and	
  More	
  InformaOon	
  
      hjp://www.streambase.com              	
  




           QuesOons?	
  


          +                            +                       =
                   Copyright 2011 © StreamBase Systems, Inc.       46	
  

Mais conteúdo relacionado

Mais procurados

Cloud product presentation
Cloud product presentationCloud product presentation
Cloud product presentationSKALI Group
 
Anywhere, anytime, any place - embrace the Martini Principle
Anywhere, anytime, any place - embrace the Martini PrincipleAnywhere, anytime, any place - embrace the Martini Principle
Anywhere, anytime, any place - embrace the Martini PrincipleHarold Teunissen
 
Capture is Powerful - Harvey Spencer presentation to AIIM Ottawa Event Oct 27...
Capture is Powerful - Harvey Spencer presentation to AIIM Ottawa Event Oct 27...Capture is Powerful - Harvey Spencer presentation to AIIM Ottawa Event Oct 27...
Capture is Powerful - Harvey Spencer presentation to AIIM Ottawa Event Oct 27...Cheryl McKinnon
 
SoftLayer Presentation at Stifel Nicolaus Event Feb 10 2011 vfinal
SoftLayer Presentation at Stifel Nicolaus Event Feb 10 2011 vfinalSoftLayer Presentation at Stifel Nicolaus Event Feb 10 2011 vfinal
SoftLayer Presentation at Stifel Nicolaus Event Feb 10 2011 vfinalSoftLayer Technologies
 
Adding intelligence to your dcim solution rf code
Adding intelligence to your dcim solution rf codeAdding intelligence to your dcim solution rf code
Adding intelligence to your dcim solution rf codeAFCOM
 
Self-Service Access and Exploration of Big Data
Self-Service Access and Exploration of Big DataSelf-Service Access and Exploration of Big Data
Self-Service Access and Exploration of Big DataInside Analysis
 
SKALI On The Cloud
SKALI On The CloudSKALI On The Cloud
SKALI On The CloudSKALI Group
 
Research on big data
Research on big dataResearch on big data
Research on big dataRoby Chen
 
HP Storage Works -Clemes Esser
HP Storage Works -Clemes EsserHP Storage Works -Clemes Esser
HP Storage Works -Clemes EsserHPDutchWorld
 
Hadoop for shanghai dev meetup
Hadoop for shanghai dev meetupHadoop for shanghai dev meetup
Hadoop for shanghai dev meetupRoby Chen
 
WebSocket - Enabling Technology for Dynamic Web Applications
WebSocket - Enabling Technology for Dynamic Web ApplicationsWebSocket - Enabling Technology for Dynamic Web Applications
WebSocket - Enabling Technology for Dynamic Web ApplicationsBergmans Mechatronics LLC
 
Large-Scale Search Discovery Analytics with Hadoop, Mahout, Solr
Large-Scale Search Discovery Analytics with Hadoop, Mahout, SolrLarge-Scale Search Discovery Analytics with Hadoop, Mahout, Solr
Large-Scale Search Discovery Analytics with Hadoop, Mahout, SolrDataWorks Summit
 
To_Infinity_and_Beyond_Internet_Scale_Workloads_Data_Center_Design_v6
To_Infinity_and_Beyond_Internet_Scale_Workloads_Data_Center_Design_v6To_Infinity_and_Beyond_Internet_Scale_Workloads_Data_Center_Design_v6
To_Infinity_and_Beyond_Internet_Scale_Workloads_Data_Center_Design_v6John Sing
 
MarkLittle_EnterpriseMiddlewareForThe21stCentury
MarkLittle_EnterpriseMiddlewareForThe21stCenturyMarkLittle_EnterpriseMiddlewareForThe21stCentury
MarkLittle_EnterpriseMiddlewareForThe21stCenturyKostas Mavridis
 
Managing content in_a_mobile_world
Managing content in_a_mobile_worldManaging content in_a_mobile_world
Managing content in_a_mobile_worldQuestexConf
 
Introduction to Enterprise Cloud Economics
Introduction to Enterprise Cloud EconomicsIntroduction to Enterprise Cloud Economics
Introduction to Enterprise Cloud EconomicsEverest Group
 
AWS Partner Presentation - Riverbed
AWS Partner Presentation - RiverbedAWS Partner Presentation - Riverbed
AWS Partner Presentation - RiverbedAmazon Web Services
 

Mais procurados (20)

Cloud product presentation
Cloud product presentationCloud product presentation
Cloud product presentation
 
Anywhere, anytime, any place - embrace the Martini Principle
Anywhere, anytime, any place - embrace the Martini PrincipleAnywhere, anytime, any place - embrace the Martini Principle
Anywhere, anytime, any place - embrace the Martini Principle
 
Capture is Powerful - Harvey Spencer presentation to AIIM Ottawa Event Oct 27...
Capture is Powerful - Harvey Spencer presentation to AIIM Ottawa Event Oct 27...Capture is Powerful - Harvey Spencer presentation to AIIM Ottawa Event Oct 27...
Capture is Powerful - Harvey Spencer presentation to AIIM Ottawa Event Oct 27...
 
SoftLayer Presentation at Stifel Nicolaus Event Feb 10 2011 vfinal
SoftLayer Presentation at Stifel Nicolaus Event Feb 10 2011 vfinalSoftLayer Presentation at Stifel Nicolaus Event Feb 10 2011 vfinal
SoftLayer Presentation at Stifel Nicolaus Event Feb 10 2011 vfinal
 
Adding intelligence to your dcim solution rf code
Adding intelligence to your dcim solution rf codeAdding intelligence to your dcim solution rf code
Adding intelligence to your dcim solution rf code
 
Self-Service Access and Exploration of Big Data
Self-Service Access and Exploration of Big DataSelf-Service Access and Exploration of Big Data
Self-Service Access and Exploration of Big Data
 
SKALI On The Cloud
SKALI On The CloudSKALI On The Cloud
SKALI On The Cloud
 
Research on big data
Research on big dataResearch on big data
Research on big data
 
Security data deluge
Security data delugeSecurity data deluge
Security data deluge
 
HP Storage Works -Clemes Esser
HP Storage Works -Clemes EsserHP Storage Works -Clemes Esser
HP Storage Works -Clemes Esser
 
OMG DDS Interoperability Demo 2009
OMG DDS Interoperability Demo 2009OMG DDS Interoperability Demo 2009
OMG DDS Interoperability Demo 2009
 
Hadoop for shanghai dev meetup
Hadoop for shanghai dev meetupHadoop for shanghai dev meetup
Hadoop for shanghai dev meetup
 
WebSocket - Enabling Technology for Dynamic Web Applications
WebSocket - Enabling Technology for Dynamic Web ApplicationsWebSocket - Enabling Technology for Dynamic Web Applications
WebSocket - Enabling Technology for Dynamic Web Applications
 
Large-Scale Search Discovery Analytics with Hadoop, Mahout, Solr
Large-Scale Search Discovery Analytics with Hadoop, Mahout, SolrLarge-Scale Search Discovery Analytics with Hadoop, Mahout, Solr
Large-Scale Search Discovery Analytics with Hadoop, Mahout, Solr
 
To_Infinity_and_Beyond_Internet_Scale_Workloads_Data_Center_Design_v6
To_Infinity_and_Beyond_Internet_Scale_Workloads_Data_Center_Design_v6To_Infinity_and_Beyond_Internet_Scale_Workloads_Data_Center_Design_v6
To_Infinity_and_Beyond_Internet_Scale_Workloads_Data_Center_Design_v6
 
MarkLittle_EnterpriseMiddlewareForThe21stCentury
MarkLittle_EnterpriseMiddlewareForThe21stCenturyMarkLittle_EnterpriseMiddlewareForThe21stCentury
MarkLittle_EnterpriseMiddlewareForThe21stCentury
 
Managing content in_a_mobile_world
Managing content in_a_mobile_worldManaging content in_a_mobile_world
Managing content in_a_mobile_world
 
Introduction to Enterprise Cloud Economics
Introduction to Enterprise Cloud EconomicsIntroduction to Enterprise Cloud Economics
Introduction to Enterprise Cloud Economics
 
Tom Krcha - Future of Flash
Tom Krcha - Future of FlashTom Krcha - Future of Flash
Tom Krcha - Future of Flash
 
AWS Partner Presentation - Riverbed
AWS Partner Presentation - RiverbedAWS Partner Presentation - Riverbed
AWS Partner Presentation - Riverbed
 

Semelhante a Complex Er[jl]ang Processing with StreamBase

StreamBase - Embedded Erjang - Erlang User Group London - 20th April 2011
StreamBase - Embedded Erjang - Erlang User Group London - 20th April 2011StreamBase - Embedded Erjang - Erlang User Group London - 20th April 2011
StreamBase - Embedded Erjang - Erlang User Group London - 20th April 2011darach
 
InfoSphere Streams Technical Overview - Use Cases Big Data - Jerome CHAILLOUX
InfoSphere Streams Technical Overview - Use Cases Big Data - Jerome CHAILLOUXInfoSphere Streams Technical Overview - Use Cases Big Data - Jerome CHAILLOUX
InfoSphere Streams Technical Overview - Use Cases Big Data - Jerome CHAILLOUXIBMInfoSphereUGFR
 
Real-Time Data Flows with Apache NiFi
Real-Time Data Flows with Apache NiFiReal-Time Data Flows with Apache NiFi
Real-Time Data Flows with Apache NiFiManish Gupta
 
Hadoop in the Enterprise - Dr. Amr Awadallah @ Microstrategy World 2011
Hadoop in the Enterprise - Dr. Amr Awadallah @ Microstrategy World 2011Hadoop in the Enterprise - Dr. Amr Awadallah @ Microstrategy World 2011
Hadoop in the Enterprise - Dr. Amr Awadallah @ Microstrategy World 2011Cloudera, Inc.
 
21st Century Service Oriented Architecture
21st Century Service Oriented Architecture21st Century Service Oriented Architecture
21st Century Service Oriented ArchitectureBob Rhubart
 
Sybase Complex Event Processing
Sybase Complex Event ProcessingSybase Complex Event Processing
Sybase Complex Event ProcessingSybase Türkiye
 
21st Century SOA
21st Century SOA21st Century SOA
21st Century SOABob Rhubart
 
Introducing SQL Server Data Services
Introducing SQL Server Data ServicesIntroducing SQL Server Data Services
Introducing SQL Server Data Servicesgoodfriday
 
Introducing SQL Server Data Services
Introducing SQL Server Data ServicesIntroducing SQL Server Data Services
Introducing SQL Server Data Servicesgoodfriday
 
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...Tomek Borek
 
Music city data Hail Hydrate! from stream to lake
Music city data Hail Hydrate! from stream to lakeMusic city data Hail Hydrate! from stream to lake
Music city data Hail Hydrate! from stream to lakeTimothy Spann
 
SnapLogic corporate presentation
SnapLogic corporate presentationSnapLogic corporate presentation
SnapLogic corporate presentationpbridges
 
Webinar: The Modern Streaming Data Stack with Kinetica & StreamSets
Webinar: The Modern Streaming Data Stack with Kinetica & StreamSetsWebinar: The Modern Streaming Data Stack with Kinetica & StreamSets
Webinar: The Modern Streaming Data Stack with Kinetica & StreamSetsKinetica
 
21st Century SOA
21st Century SOA21st Century SOA
21st Century SOABob Rhubart
 
Jimwebber soa
Jimwebber soaJimwebber soa
Jimwebber soad0nn9n
 
Cloud Computing - Making IT Simple
 Cloud Computing - Making IT Simple Cloud Computing - Making IT Simple
Cloud Computing - Making IT SimpleBob Rhubart
 
Streaming Solutions for Real time problems
Streaming Solutions for Real time problemsStreaming Solutions for Real time problems
Streaming Solutions for Real time problemsAbhishek Gupta
 
SQL and NoSQL in SQL Server
SQL and NoSQL in SQL ServerSQL and NoSQL in SQL Server
SQL and NoSQL in SQL ServerMichael Rys
 
Hadoop World 2011: How Hadoop Revolutionized Business Intelligence and Advanc...
Hadoop World 2011: How Hadoop Revolutionized Business Intelligence and Advanc...Hadoop World 2011: How Hadoop Revolutionized Business Intelligence and Advanc...
Hadoop World 2011: How Hadoop Revolutionized Business Intelligence and Advanc...Cloudera, Inc.
 
Best Practices For Building and Operating A Managed Data Lake - StampedeCon 2016
Best Practices For Building and Operating A Managed Data Lake - StampedeCon 2016Best Practices For Building and Operating A Managed Data Lake - StampedeCon 2016
Best Practices For Building and Operating A Managed Data Lake - StampedeCon 2016StampedeCon
 

Semelhante a Complex Er[jl]ang Processing with StreamBase (20)

StreamBase - Embedded Erjang - Erlang User Group London - 20th April 2011
StreamBase - Embedded Erjang - Erlang User Group London - 20th April 2011StreamBase - Embedded Erjang - Erlang User Group London - 20th April 2011
StreamBase - Embedded Erjang - Erlang User Group London - 20th April 2011
 
InfoSphere Streams Technical Overview - Use Cases Big Data - Jerome CHAILLOUX
InfoSphere Streams Technical Overview - Use Cases Big Data - Jerome CHAILLOUXInfoSphere Streams Technical Overview - Use Cases Big Data - Jerome CHAILLOUX
InfoSphere Streams Technical Overview - Use Cases Big Data - Jerome CHAILLOUX
 
Real-Time Data Flows with Apache NiFi
Real-Time Data Flows with Apache NiFiReal-Time Data Flows with Apache NiFi
Real-Time Data Flows with Apache NiFi
 
Hadoop in the Enterprise - Dr. Amr Awadallah @ Microstrategy World 2011
Hadoop in the Enterprise - Dr. Amr Awadallah @ Microstrategy World 2011Hadoop in the Enterprise - Dr. Amr Awadallah @ Microstrategy World 2011
Hadoop in the Enterprise - Dr. Amr Awadallah @ Microstrategy World 2011
 
21st Century Service Oriented Architecture
21st Century Service Oriented Architecture21st Century Service Oriented Architecture
21st Century Service Oriented Architecture
 
Sybase Complex Event Processing
Sybase Complex Event ProcessingSybase Complex Event Processing
Sybase Complex Event Processing
 
21st Century SOA
21st Century SOA21st Century SOA
21st Century SOA
 
Introducing SQL Server Data Services
Introducing SQL Server Data ServicesIntroducing SQL Server Data Services
Introducing SQL Server Data Services
 
Introducing SQL Server Data Services
Introducing SQL Server Data ServicesIntroducing SQL Server Data Services
Introducing SQL Server Data Services
 
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
 
Music city data Hail Hydrate! from stream to lake
Music city data Hail Hydrate! from stream to lakeMusic city data Hail Hydrate! from stream to lake
Music city data Hail Hydrate! from stream to lake
 
SnapLogic corporate presentation
SnapLogic corporate presentationSnapLogic corporate presentation
SnapLogic corporate presentation
 
Webinar: The Modern Streaming Data Stack with Kinetica & StreamSets
Webinar: The Modern Streaming Data Stack with Kinetica & StreamSetsWebinar: The Modern Streaming Data Stack with Kinetica & StreamSets
Webinar: The Modern Streaming Data Stack with Kinetica & StreamSets
 
21st Century SOA
21st Century SOA21st Century SOA
21st Century SOA
 
Jimwebber soa
Jimwebber soaJimwebber soa
Jimwebber soa
 
Cloud Computing - Making IT Simple
 Cloud Computing - Making IT Simple Cloud Computing - Making IT Simple
Cloud Computing - Making IT Simple
 
Streaming Solutions for Real time problems
Streaming Solutions for Real time problemsStreaming Solutions for Real time problems
Streaming Solutions for Real time problems
 
SQL and NoSQL in SQL Server
SQL and NoSQL in SQL ServerSQL and NoSQL in SQL Server
SQL and NoSQL in SQL Server
 
Hadoop World 2011: How Hadoop Revolutionized Business Intelligence and Advanc...
Hadoop World 2011: How Hadoop Revolutionized Business Intelligence and Advanc...Hadoop World 2011: How Hadoop Revolutionized Business Intelligence and Advanc...
Hadoop World 2011: How Hadoop Revolutionized Business Intelligence and Advanc...
 
Best Practices For Building and Operating A Managed Data Lake - StampedeCon 2016
Best Practices For Building and Operating A Managed Data Lake - StampedeCon 2016Best Practices For Building and Operating A Managed Data Lake - StampedeCon 2016
Best Practices For Building and Operating A Managed Data Lake - StampedeCon 2016
 

Mais de darach

Thing. An unexpected journey. Devoxx UK 2014
Thing. An unexpected journey. Devoxx UK 2014Thing. An unexpected journey. Devoxx UK 2014
Thing. An unexpected journey. Devoxx UK 2014darach
 
FunctionalJS - May 2014 - Streams
FunctionalJS - May 2014 - StreamsFunctionalJS - May 2014 - Streams
FunctionalJS - May 2014 - Streamsdarach
 
Deconstructing Lambda
Deconstructing LambdaDeconstructing Lambda
Deconstructing Lambdadarach
 
Streams and Things
Streams and ThingsStreams and Things
Streams and Thingsdarach
 
Big Data, Mob Scale.
Big Data, Mob Scale.Big Data, Mob Scale.
Big Data, Mob Scale.darach
 
Meta Programming with Streams and Pipes
Meta Programming with Streams and PipesMeta Programming with Streams and Pipes
Meta Programming with Streams and Pipesdarach
 
Erlang/Sapiens
Erlang/SapiensErlang/Sapiens
Erlang/Sapiensdarach
 
QCON London 2013
QCON London 2013QCON London 2013
QCON London 2013darach
 
EFL Munich - February 2013 - "Conversational Big Data with Erlang"
EFL Munich - February 2013 - "Conversational Big Data with Erlang"EFL Munich - February 2013 - "Conversational Big Data with Erlang"
EFL Munich - February 2013 - "Conversational Big Data with Erlang"darach
 
Streamy, Pipy, Analyticy
Streamy, Pipy, AnalyticyStreamy, Pipy, Analyticy
Streamy, Pipy, Analyticydarach
 
Tech mesh london 2012
Tech mesh london 2012Tech mesh london 2012
Tech mesh london 2012darach
 

Mais de darach (11)

Thing. An unexpected journey. Devoxx UK 2014
Thing. An unexpected journey. Devoxx UK 2014Thing. An unexpected journey. Devoxx UK 2014
Thing. An unexpected journey. Devoxx UK 2014
 
FunctionalJS - May 2014 - Streams
FunctionalJS - May 2014 - StreamsFunctionalJS - May 2014 - Streams
FunctionalJS - May 2014 - Streams
 
Deconstructing Lambda
Deconstructing LambdaDeconstructing Lambda
Deconstructing Lambda
 
Streams and Things
Streams and ThingsStreams and Things
Streams and Things
 
Big Data, Mob Scale.
Big Data, Mob Scale.Big Data, Mob Scale.
Big Data, Mob Scale.
 
Meta Programming with Streams and Pipes
Meta Programming with Streams and PipesMeta Programming with Streams and Pipes
Meta Programming with Streams and Pipes
 
Erlang/Sapiens
Erlang/SapiensErlang/Sapiens
Erlang/Sapiens
 
QCON London 2013
QCON London 2013QCON London 2013
QCON London 2013
 
EFL Munich - February 2013 - "Conversational Big Data with Erlang"
EFL Munich - February 2013 - "Conversational Big Data with Erlang"EFL Munich - February 2013 - "Conversational Big Data with Erlang"
EFL Munich - February 2013 - "Conversational Big Data with Erlang"
 
Streamy, Pipy, Analyticy
Streamy, Pipy, AnalyticyStreamy, Pipy, Analyticy
Streamy, Pipy, Analyticy
 
Tech mesh london 2012
Tech mesh london 2012Tech mesh london 2012
Tech mesh london 2012
 

Último

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 

Último (20)

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 

Complex Er[jl]ang Processing with StreamBase

  • 1. Darach  Ennis  (darach@streambase.com)  @darachennis   StreamBase  Systems   Erlang  Factory  London  -­‐    June  10th  2011   Complex  Er[jl]ang  Processing  with  StreamBase:   A  DSL  for  Low  Latency  High  Frequency  CompuOng   + + = Copyright 2011 © StreamBase Systems, Inc. 1  
  • 2. Agenda     What  is  ‘Complex  Event  Processing’   •  Specifically  flow  oriented  event  processing  (there  are  others)   •  Streams  &  Operators.  Windowing,  Branching,  Combining,  Extending     A  day  in  the  life  of  a  flow  programmer   •  RelaOvity  -­‐  Data  parallelism,  concurrency,  latency  &  throughput   •  ConOnuity  -­‐  ConOnuous  Streaming  Map  Reduce   •  Reliability  –  High  availability,  the  low  latency  way   •  Flow,  meets  FuncOon.  Embed  Erlang  in  process  via  Erjang     Integra?on.  Erlang  –  the  ecosystem.   •  Calling  Erlang  from  StreamBase  –  Simple  &  windowed  funcOons   •  Client/Server  –  Pushing  events  to/from  StreamBase   •  RabbitMQ  -­‐  Messaging     TheC.  Erlang  –  the  inspira?on.  Paxos,  in  StreamBase   Copyright 2011 © StreamBase Systems, Inc. 2  
  • 3. High  Level  DSLs  :  Myth  Vs  Reality   Myth:  High  level  domain   specific  languages  are   too  slow  for  HFT.   Reality:  High  level  domain   specific  languages  can  deliver   beLer  performance  than   system  programming  languages   when  tailored  to  a  specific  task.   Copyright 2011 © StreamBase Systems, Inc. 3  
  • 4. Complex  Event  Processing  aka  Event  Processing     SoCware  organized  by  events  (cf:  object/func?on  oriented)   •  What’s  an  event?  What’s  an  object?   •  Something  that  can  trigger  processing,  can  include  data.   •  Naturally  but  not  usually  represents  a  “real  world”  events  &  observaOons.     Complex  Event  Processing  PlaTorms   •  Soeware  stack  for  event  based  systems,  event  driven  architectures   •  Event  Programming  Language  –  SQL-­‐based,  Rules-­‐based,  or  State-­‐based   •  Commercial  and  open  source:  StreamBase,  Progress,  Microsoe,  IBM,   Oracle,  SAP,  Esper,  Drools  and  many  more     Adopted  in  financial  services  and  other  markets   •  System  monitoring,  industrial  process  control,  logisOcs,  defense/ intelligence     Other  Event  Processing  Approaches:   •  Erlang,  Scala/Akka,  Actors,  node.js,  .NET  Rx   Copyright 2011 © StreamBase Systems, Inc. 4  
  • 5. What  does  a  CEP  DSL  or  Language  offer?     Con?nuously  Observe,  Orient,  Decide  Act  (OODA)  on  event   streams   Wikipedia:   •  ConOnuous  Incremental  Query   John  Boyd,   •  Pajern  matching  within  or  across  streams   OODA  Loop   •  Branch  –  Split,  Causal  Split,  Filter.   •  Combine  -­‐  Semi-­‐Join,  Union,  Gather,  Merge,  Join,  Pajern   •  Windows  –  Process  sets  of  streaming  data   •  Sliding  or  Tumbling,  Overlapping  or  Non-­‐Overlapping,  Gaps  or  No  Gaps   •  Finite  (1  second,  1000  tuples),  Infinite   •  Emission  Policies:  On  Close,  Every  odd  message   •  Predicate  based  –  Roll  your  own  window  type   •  State  Management  –  In  memory,  CSV  files,  CSV  sockets,  RDBMS,  Parallel   DBMSs,  Column  Stores,  KV  stores,  NoSQL,  NewSQL…   •  Nice  to  have:     •  DeclaraOve  concurrency,  Interface  Polymorphism,  DistribuOon,  Extensible   Copyright 2011 © StreamBase Systems, Inc. 5  
  • 6. Challenges  for  CEP     ‘Über’  Ultra  Low  Latency?   •  Sub-­‐milli  is  standard,  sub-­‐100-­‐micro  is  desirable.  Less  is  more!     Large  Data  Volumes   •  Hundreds  of  thousands  of  events,  thousands  of  decisions,  per  thread.   •  Big  Data.  ~Hundreds  of  SMP  CEP  nodes.     Demanding  Opera?onal  Environment   •  24x7,  365  –  in  criOcal  environments  (trading,  surveillance,  uOliOes)     Sophis?cated  Data  Processing  (some?mes)   •  OpOons  pricing,  yield  curves,  risk  metrics,  smart  grid  capacity  planning,   fraud  detecOon.     How  it’s  done  (QCON  London  2011):   •  How  LMAX  did  it?  hjp://bit.ly/fUeS0P   •  How  we  did  it?  hjp://bit.ly/hM6NAP  <-­‐  Our  CTO  Richard  Tibbejs  talk   Copyright 2011 © StreamBase Systems, Inc. 6  
  • 7. StreamBase  Event  Processing  Plauorm   Studio  Integrated  Development  Environment   Visualiza?on   Developer  Studio   Graphical  StreamSQL  for  developing,     back  tesOng  and  deploying  applicaOons.       StreamBase   StreamBase   Component   Frameworks     Exchange   ApplicaOons   Input  Adapter(s)   Inject  streaming  (market  data)   Adapters   Adapters   and  staOc  (reference  data)   StreamBase  Server     sources.   Event  Processing  Server   Output  Adapter(s)   High  performance  opOmized  engine   Send  results  to  systems,  users,  user   can  process  events  at  market  data   screens  and  databases.   speeds.   Copyright 2011 © StreamBase Systems, Inc. 7  
  • 8. How  did  we  do  it?     Compila?on  and  Sta?c  Analysis   •  Design  the  language  for  it     Modular  abstrac?on,  interfaces   •  Quants  and  Developers  Collaborate,  share  code     Bytecode  genera?on  and  the  Janino  compiler   •  OpOmized  bytecodes,  in-­‐memory  generaOon       Garbage  op?miza?on   •  Pooling,  data  class,  invasive  collecOons     Integra?ons,  C++  and  Java  plugins   •  Efficient  naOve  interfaces,  Hardware  acceleraOon     Adapter  API,  FIX  Messaging   •  Threading  and  API  structure  for  ultra  low  latency     Parallelism,  Clustering,  Lanes  and  Tiers   •  Scalability,  with  a  latency  bias.     Modularity  through  Named  Data  Formats,  Schemas   •  Sharing  data  and  semanOcs  between  apps   Copyright 2011 © StreamBase Systems, Inc. 8  
  • 9. StreamBase  StreamSQL  EventFlow   Rapid  Deployment   &  Unit  TesOng   Modularity  &   Polymorphism   Interfaces  &   Off  The  Shelf   Off  The  Shelf   Extension  Points   Business  Logic   ConnecOvity   Copyright 2011 © StreamBase Systems, Inc. 9  
  • 10. Operators  –  Hi  Erlang.  Hello  StreamBase   Did  you  just  tell   me  to  go  flow   myself?   Copyright 2011 © StreamBase Systems, Inc. 10  
  • 11. Agenda     What  is  ‘Complex  Event  Processing’   •  Specifically  flow  oriented  event  processing  (there  are  others)   •  Streams  &  Operators.  Windowing,  Branching,  Combining,  Extending     A  day  in  the  life  of  a  flow  programmer   •  RelaOvity  -­‐  Data  parallelism,  concurrency,  latency  &  throughput   •  ConOnuity  -­‐  ConOnuous  Streaming  Map  Reduce   •  Reliability  –  High  availability,  the  low  latency  way   •  Flow,  meets  FuncOon.  Embed  Erlang  in  process  via  Erjang     Integra?on.  Erlang  –  the  ecosystem.   •  Calling  Erlang  from  StreamBase  –  Simple  &  windowed  funcOons   •  Client/Server  –  Pushing  events  to/from  StreamBase   •  RabbitMQ  -­‐  Messaging     TheC.  Erlang  –  the  inspira?on.  Paxos,  in  StreamBase   Copyright 2011 © StreamBase Systems, Inc. 11  
  • 12. A  day  in  the  life…  Why  a  DSL?     High  level  –  Windowing,  Combina?on  &  PaLern  Matching   Streams     Graphical  –  ‘See’  the  flow,  dependencies,  pathways     Fast,  Flexible  SDLC  –  Deploy  new  algorithms,  con?nuously     Understandable  –  Rise  to  the  abstrac?on     Flexible   Copyright 2011 © StreamBase Systems, Inc. 12  
  • 13. A  day  in  the  life..  More  is  more!   Copyright 2011 © StreamBase Systems, Inc. 13  
  • 14. Make  it  work.  Measure  it.  -­‐  Baseline  ‘Noop’  Performance   WARNING:  Micro-­‐ benchmark.   YMMV   Copyright 2011 © StreamBase Systems, Inc. 14  
  • 15. Concurrency  –  Baseline  -­‐  Results   Nice.  1.1  million   events/sec   Copyright 2011 © StreamBase Systems, Inc. 15  
  • 16. Parallelize  it  –  The  ‘Convenient,  but  incorrect’  way   Execution Order & Concurrency: Rule 1 – Each event processed to completion left-right Rule 2 – Branches processed sequentially Rule 3 – Outputs are processed sequentially Rule 4 – Module output processed to completion immediately Rule 5 – One operator executed at a time Copyright 2011 © StreamBase Systems, Inc. 16  
  • 17. Gah!  WTF?!   Copyright 2011 © StreamBase Systems, Inc. 17  
  • 18. OpOmize  it!  ObservaOon  #1   Measure  the  cost   of  thread  context   switches.  Dodge   &  Burn!   Copyright 2011 © StreamBase Systems, Inc. 18  
  • 19. OpOmize  it!  ObservaOon  #2  –  It’s  Map/Combine/Reduce   Copyright 2011 © StreamBase Systems, Inc. 19  
  • 20. CSMR  –  A  ‘pajern’  for  low  latency  high  throughput?   Copyright 2011 © StreamBase Systems, Inc. 20  
  • 21. CSMR  –  A  ‘pajern’  for  low  latency  high  throughput?  Yup!   25   20   20   20   18   Millions  of  tuples  /  second   Throughput  (Mtps)     15   Across  Region   10   10   9.4   Within  Region   8   8   5   4   4   4   0   Gather   Merge   Branch  &  Join   Filter  Even  Random   Baseline  (Noop)   Benchmark  HW:  Dell  RS510,  8  core,  32  GB  RAM,  2.4GHz  IA-­‐64,  OS:  RHEL  5u3,  SB  7.0.1.2   Copyright 2011 © StreamBase Systems, Inc. 21  
  • 22. CSMR  +  GPUs  /  FPGAs?  Sure!   We can build on SMP and cluster wide distribution algorithms to further optimize interactions with accelerated compute technologies. We can exploit accelerated hardware messaging where regular network IO is insufficient for distribution results over 1Ge or regular networking technologies. The pattern above is a continuous streaming variant of Map/Reduce in EventFlow. Copyright 2011 © StreamBase Systems, Inc. 22  
  • 23. Similar  OpOmizaOon’s  apply  to  GPUs  too!   Copyright 2011 © StreamBase Systems, Inc. 23  
  • 24. A  day  in  the  life..  Reliability   Copyright 2011 © StreamBase Systems, Inc. 24  
  • 25. A  day  in  the  life..  Reliability     Hot/Hot,  Hot/Warm,  Hot/Cold,  None?!   Copyright 2011 © StreamBase Systems, Inc. 25  
  • 26. A  day  in  the  life..  Reliability   Copyright 2011 © StreamBase Systems, Inc. 26  
  • 27. A  day  in  the  life..  Reliable  CSMR   Copyright 2011 © StreamBase Systems, Inc. 27  
  • 28. Agenda     What  is  ‘Complex  Event  Processing’   •  Specifically  flow  oriented  event  processing  (there  are  others)   •  Streams  &  Operators.  Windowing,  Branching,  Combining,  Extending     A  day  in  the  life  of  a  flow  programmer   •  RelaOvity  -­‐  Data  parallelism,  concurrency,  latency  &  throughput   •  ConOnuity  -­‐  ConOnuous  Streaming  Map  Reduce   •  Reliability  –  High  availability,  the  low  latency  way     Integra?on.  Erlang  –  the  ecosystem.   •  Calling  Erlang  from  StreamBase  –  Simple  &  windowed  funcOons   •  Client/Server  –  Pushing  events  to/from  StreamBase   •  RabbitMQ  -­‐  Messaging     TheC.  Erlang  –  the  inspira?on.  Paxos,  in  StreamBase   Copyright 2011 © StreamBase Systems, Inc. 28  
  • 29. Operators  –  Hi  Erlang.  Hello  StreamBase     Aggregate  –  A  window  of  moving  data   •  Time  based  –  eg:  the  last  10  seconds,  .001  seconds,  day   •  Field  based  –  eg:  historical  Ome  (Omestamp,  …)   •  Tuple  based  –  eg:  the  last  1000  tuples   •  Predicate  based  –  expressions  determine  when  to  open,  close  and/or  emit   interesOng  results  from  a  window     Mul?-­‐dimensional   •  Give  me  the  last  seconds  worth  of  events  or  the  last  10000,  whichever   happens  first     Grouping   •  ParOOon  by  Symbol  implies  a  window  per  Symbol  ‘concurrently  –  on  the   same  thread’   Copyright 2011 © StreamBase Systems, Inc. 29  
  • 30. Windows  in  the  Wild  -­‐  #1  Riak     Riak  Core:  hLps://github.com/basho/riak_core   •  Mixes  the  ‘when’  window  dimension  (Ome)  with  the  what  ‘aggregaOon’   Copyright 2011 © StreamBase Systems, Inc. 30  
  • 31. Windows  in  the  Wild  -­‐  #2  tlack  on  BitBucket     Thomas  Lackner  -­‐  tlack  -­‐  EMA:   •  hjps://bitbucket.org/tlack/erlang-­‐exponenOal-­‐moving-­‐average/overview   •  Mixes  the  ‘when’  window  dimension  (Ome)  with  the  what  ‘aggregaOon’   and  number  of  occurrences  ‘how  many’   Copyright 2011 © StreamBase Systems, Inc. 31  
  • 32. Embedding  Erlang  (Erjang)   Prepend the dir defining our behaviors to the code path Copyright 2011 © StreamBase Systems, Inc. 32  
  • 33. Define  Behavioral  Contracts   Copyright 2011 © StreamBase Systems, Inc. 33  
  • 34. Implement  &  Test  in  Erlang  (or  Erjang!)   Duh!   Typo!   Copyright 2011 © StreamBase Systems, Inc. 34  
  • 35. Expose  to  StreamBase  [  Call  by  Behaviour/Mod]  #1   Copyright 2011 © StreamBase Systems, Inc. 35  
  • 36. Expose  To  StreamBase  [Call  by  Behaviour/Mod]  #2   Copyright 2011 © StreamBase Systems, Inc. 36  
  • 37. Use,  Deploy  &  Run   Wikipedia:   MACD   Example: Continuous Streaming Map/Reduce with 1-second MACD compression. Linearly SMP scalable. Just add boxes to scale! Copyright 2011 © StreamBase Systems, Inc. 37  
  • 38. Run,  Rabbit,  Run,  Rabbit,  …   Copyright 2011 © StreamBase Systems, Inc. 38  
  • 39. Agenda     What  is  ‘Complex  Event  Processing’   •  Specifically  flow  oriented  event  processing  (there  are  others)   •  Streams  &  Operators.  Windowing,  Branching,  Combining,  Extending     A  day  in  the  life  of  a  flow  programmer   •  RelaOvity  -­‐  Data  parallelism,  concurrency,  latency  &  throughput   •  ConOnuity  -­‐  ConOnuous  Streaming  Map  Reduce   •  Reliability  –  High  availability,  the  low  latency  way     Integra?on.  Erlang  –  the  ecosystem.   •  Calling  Erlang  from  StreamBase  –  Simple  &  windowed  funcOons   •  Client/Server  –  Pushing  events  to/from  StreamBase   •  RabbitMQ  -­‐  Messaging     TheC.  Erlang  –  the  inspira?on.  Paxos,  in  StreamBase   Copyright 2011 © StreamBase Systems, Inc. 39  
  • 40. SB  Paxos  –  Entrypoint  (cc  @kevsmith!)   Copyright 2011 © StreamBase Systems, Inc. 40  
  • 41. SB  Paxos  –  Autonomic,  Self  Healing  Ring   Copyright 2011 © StreamBase Systems, Inc. 41  
  • 42. SB  Paxos  –  Generic  FSM  ‘Behaviour’   Copyright 2011 © StreamBase Systems, Inc. 42  
  • 43. SB  Paxos  –  Generic  FSM  ‘Behaviour’  –  Paxos  FSM   StateMap,State,TransiOon,NextState,AcOon,DescripOon,   BasicPaxosMap,IniOal,Bootstrap,Proposer,Prepare,"..."   BasicPaxosMap,IniOal,PromiseOk,Accepter,PromiseOk,"..."   BasicPaxosMap,IniOal,PromiseNotOk,Done,PromiseNotOk,"..."   BasicPaxosMap,IniOal,Accepted,Learner,Response,"When  ..."   BasicPaxosMap,Proposer,Accept,Proposer,Accept,"..."   BasicPaxosMap,Proposer,PromiseNotOk,Proposer,DoNothing,"..."   BasicPaxosMap,Proposer,Response,Done,Gone,DoStop,"..."   BasicPaxosMap,Accepter,Accept,Learner,Accept,"..."   BasicPaxosMap,Accepter,Accepted,Learner,Response,"..."   BasicPaxosMap,Learner,Accepted,Done,Response,"..."   BasicPaxosMap,Learner,Done,Gone,DoStop,"..."   Copyright 2011 © StreamBase Systems, Inc. 43  
  • 44. Shameless  Plugs     StreamBase   •  You  could  build  one  of  these  yourself,  or  use  ours…   •  Download  and  test  out  the  full  product  hjp:/www.streambase.com   •  Build  something  and  submit  to  the  StreamBase  Component  Exchange   hjp://sbx.streambase.com       •  Contact  us  to  buy  or  to  an  OEM  partner,  offices  London,  Boston,  New  York   •  We’re  hiring   •  We’re  training   •  hjp://www.streambase.com/developers-­‐training-­‐events.htm     DEBS  –  Distributed  Event  Based  Systems   •  Academic  (ACM)  Conference  outside  NYC  in  July     EPTS  –  Event  Processing  Technology  Society   •  hjp://ep-­‐ts.org  industry  consorOum   Ques?ons?   Copyright 2011 © StreamBase Systems, Inc. 44  
  • 45. Acknowledgements     Erlang,  Erlang  Solu?ons,  Erlang  UG  London,  &  Erlang  Factory   •  hjp://www.erlang.org/   •  hjp://www.erlang-­‐soluOons.com/     •  hjp://www.erlang-­‐soluOons.com/etc/usergroup/london     •  hjp://www.erlang-­‐factory.com/     Erjang  –  The  Java  based  Erlang  Virtual  Machine   •  hjps://github.com/trifork/erjang/wiki/       erlIDE   •  hjp://erlide.sourceforge.net/       @?bbeLs  –  I  stole  borrowed  some  of  his                                        slides!     Download  StreamBase  and  tell  us  what  you  think:   •  hjp://www.streambase.com   Copyright 2011 © StreamBase Systems, Inc. 45  
  • 46. Download  StreamBase  and  More  InformaOon   hjp://www.streambase.com   QuesOons?   + + = Copyright 2011 © StreamBase Systems, Inc. 46