Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Erlang Factory 2012 - Darren.pdf

Avatar for rlee319 rlee319
April 03, 2012
150

Erlang Factory 2012 - Darren.pdf

Avatar for rlee319

rlee319

April 03, 2012
Tweet

Transcript

  1. Darren  Schreiber     •  Co-­‐Founder  /  CEO  at  2600hz

      •  Architect  behind  the  2600hz  Pla=orm  and  blue.box   •  Co-­‐Author  of  FreeSWITCH  High-­‐Performance  Telephony  Book   and  the  FreeSWITCH  Cookbook   •  Computer  Science  /  Business  Management  Graduate  from  RPI   •  Contributor  /  Author  of  Various  Open-­‐Source  Projects   About  Me  
  2. •  Carriers  Don’t  Do  Very  Much  Themselves   – We  didn’t

     know  this   – This  never  ceases  to  amaze  me     •  They  Just  Buy  Stuff   •  Their  Asset  Is   – Their  Brand   – Their  Customer  Base   – Their  Cables  &  Towers   The  Promise  of  VoIP  
  3.     Maybe  we  can  teach  them…     What

     to  teach?   The  Promise  of  VoIP  
  4. Network  Change  Is  OK   Network  Agnos9c  is  OK  

    Network  Access  is  OK     Proprietary  is  Not   Required   The  Promise  of  VoIP  
  5. Lots  of  Mature  Tools   –  OpenSIPs   –  FreeSWITCH

      –  CDR  Tool   –  DTH  /  BillSo[   –  Yate   –  So[  Clients   –  Etc.   All  of  them  live  on  their  own   –  …  yet  depend  on  each  other   Open  Source  VoIP  is  Fragmented   Switching  Tools   Business  Tools   Media  Handling   Load  Balancing   Deployment   Monitoring   Logging  /  CDRs   Billing   Provisioning  
  6. Need  to  Understand  Common  Needs   –   Scale  easily  

    –   Reliability   –   Flexibility   –   Ownership   Choosing  Our  Glue  
  7. 2600hz  Pla=orm  =  Glue   – AMQP   – CouchDB   – FreeSWITCH

      – OpenSIPs   – HTTP  /  REST   – Business  Logic  (WhApps)   – Erlang   Why  These  Components?   2600hz  Pla=orm  
  8. All  Components  are  Modular!   Whistle  VoIP  Pla=orm   ZeroMQ

      AMQP   Messaging   whApp  VM   Session  Control   VM   Call  Center   Hosted   PBX   RouTng  /   Trunking   FreeSWITCH   OpenSIPs   SMS   Engine   Asterisk   Billing   APIs  
  9. Erlang  =  Super  Glue     –  Built  for  Telecom

      –  Strong  Supervision   –  Inherently  Distributable   –  Highly  Concurrent   –  Asynchronous  Design  is  Easy   –  Code  is  Short,  Concise,  Powerful   –  Cross-­‐Pla=orm  (even  Windows  &  MIPS!)   –  Fast   –  EASY   Our  Research:  the  Core  
  10. Event  Processing  in  PHP   •  191  Lines  to  Parse

     Events  (text)   •  Slow!   Event  Processing  in  Erlang   Our  Research  :  the  Core   •  23  Lines  to  Parse  Events  (naTve)   •  Fast!  
  11. Need  :  Real-­‐Tme  Messaging   –  Call  Control   – 

    Resource  Monitoring   Why  AMQP   –  Built-­‐in  Messaging  is  Fast   •  Designed  for  Financial  Systems   –  Easy  to  Scale  &  Cluster   –  Most  Important:  Directed  Messaging   •  Messages  only  go  where  they  need  to  go   •  On  a  busy  switching  environment,  this  is  criTcal   •  MulTple  Strategies  for  DirecTng  Messages   Our  Research  :  Messaging  
  12. How  AMQP  relates  to  telecom   •  One  VoIP  channel

     is  going  to  produce:   •  1  Request  /  MulTple  IniTal  Responses   •  100  or  so  call  events  published   •  0-­‐>Many  messages  for  call  manipulaTon   •  ExpecTng  300  calls/second  per  box   •  ExpecTng  3,000-­‐4,000  events  per  second  max   Our  Research  :  Messaging  
  13. Need  :  Scalable  Storage,  Flexible  Schema   –  Heavy  Read,

     Less  Write  (reconfigure  infrequently)   –  Features  Change  Constantly   •  0  downTme  for  maintenance  is  goal     CouchDB  (is  Awesome)   –  NoSQL  –  based   •  Schema  changes  regularly,  but  usually  based  on  core  object  (translates   well  to  a  document)   –  Databases  are  Lightweight  Concepts   –  ReplicaTon  is  Stupidly  Simple   •  A  database,  list  of  documents,  or  a  view   –  Sharding  is  Stupidly  Simple  &  Flexible   Our  Research  :  Storage  
  14. Our  Research  :  Storage   Main  Data  Cluster   Hosted

      PBX   Service   Hosted  Call   Center   Service   SIP   Trunking   Pla=orm   Customer’s   PBX  
  15. Need  :  Fast  Deployment,  Easy  Management   –  Growth  in

     Customers  Usually  Inconsistent   –  Resource  Demand  Varies  by  SituaTon   –  Resource  Demand  Varies  by  Component     Why  Erlang?   –  One  VM  and  Library  to  Deploy   –  Networking  is  Built-­‐In   –  Many,  many  lightweight  threads  possible   –  Everything  can  live  anywhere   Our  Research  :  Scalability  
  16. Our  Research  :  Scalability   Typical   VoIP   Network

      So[  Switch   Call  RouTng   Voicemail   REST  APIs   Media   Handling   Conferencing   Monitoring   Billing   Database  
  17. Your   DataCenter   Amazon   Cloud   Your  

    Garage   Synapse   Cloud   Our  Research  :  Scalability   Whistle   VoIP   Network   So[  Switch   Call  RouTng   Voicemail   REST  APIs   Media   Handling   Conferencing   Monitoring   Billing   Database  
  18. Need  :  Monitoring,  Up-­‐Time   –  This  needs  to  be

     built-­‐in  because  it’s  expected   –  Nothing  standard  really  out  there     Why  FreeSWITCH  +  Erlang?   –  Round-­‐trip  media  monitoring  with  audio   –  Test  true  audio  latency  on  circuits   –  Test  true  up-­‐Tme  across  all  call  paths   Our  Research  :  Maintenance  
  19. Need  :  APIs,  Easy  Mashups,  Simple   –  Whistle  =

     The  UlTmate  Mashup  Tool     Why  REST  /  Crossbar?   –  Layer  1:  AbstracTon  of  real-­‐Tme  events   –  Layer  2:  AbstracTon  of  common  features   –  Layer  3:  Provide  Common  Interface   •  REST  keeps  it  easy  and  language  agnosTc   Our  Research  :  Simplicity  
  20. REST  APIs   Call  Handling  APIs   RabbitMQ   FreeSWITCH

      SMS  Engine   Database   APIs   CouchDB   ConfiguraTon   Documents   Our  Research  :  Simplicity   Aqach  Anywhere  
  21. Lets see it in action! Low-Level! •  The couch database!

    •  Spinning up additional capacity! •  Watching load-balancing and call processing between multiple servers! High-Level! •  Using the REST/JSON API! •  The docs & available APIs! Sample Apps! •  Trunk Store! •  Hosted PBX! Interactive Demos Are More Fun
  
  22. Past! –  Prohibitively Expensive Switching Equipment! –  Maintenance / Monitoring

    Engineers! –  Proprietary / Difficult Interconnects! ! Present! –  Spin Up a Powerful Soft Switch! –  Interconnect with CLECs Instantly! –  Utilize Open-Source Tools! –  Bundle, Bundle, Bundle!! ! Future! –  Outsourced Monitoring and Management! –  Automatic Integration! –  API-based Everything! THE NEW WORLD OF VOIP!
  23. API-Driven Media Networks! –  Signaling is via open-standards! –  Agnostic

    to type of media! ! Automated Infrastructure Management! –  Spin up, spin down servers at will! –  Works on commodity hardware! –  Measures capabilities of hardware automatically! ! Intelligent Monitoring! –  Detects faults automatically! –  Modifies infrastructure accordingly! THE FUTURE!