Evaluating Erlang: Are High-level Languages suitable for Robust Telecoms Software? Jan Nystrom SafeCom'05 – Henry Nystrom, Phil Trinder, David King
Collaborative Research Motorola Labs & Heriot-Watt University Lifetime –Dec 2002 – Feb 2006 (~3 years) Resources –£184,000 (~$320,000) from UK Research Council (EPSRC) –Post-doc for 3 years –Joint supervision from Motorola Labs & Heriot-Watt
Objectives Commercial –Produce strong evidence that Erlang can improve Motorola software productivity –Disseminate work within Motorola Scientific –Investigate impact of language constructs on distributed software
Problem Domain Distributed High Availability (downtime of minutes per year, 5NINES) Complex software (millions of lines of code) Continuous operation (years) In service upgrade
Characteristics General purpose programming language, originally developed in Ericsson for Telecoms Massive concurrency Soft real-time response Garbage collected memory Highly available (hot upload) Fault tolerant (exceptions, error detection) Open Source –OTP Library (Open Telecom Platform) Commercial support
Erlang Success Stories Ericsson AXD301 in Engine –Size = 1,136,150 lines in Erlang –Availability = % (9NINES) Alteon (Nortel) SSL Accelerator –Size 74,440 lines in Erlang Ericsson GPRS System T-mobile, SMS System, UK Teba Bank, Credit Card Systems, South Africa Reference: Joe Armstrong, PhD thesis, 2003.
Research Strategy Implement some telecoms applications in Erlang –Dispatch Call Controller (this talk) –Zone Controller Data mobility (current project) Compare –availability (recovery from process failures) –resilience (high throughput) –dynamic adaptability (performance when processes are added)
Dispatch Call Controller The server part of a Dispatch Call Control Critical functionality –Dynamic scalability –Resource reclamation –Fault tolerance –Soft real time
DCC Architecture
Multiple Failures
Service Instance Failures
Increase in Throughput of Voice Messages
Dynamic Adaptability
Results Summary Availability –At a service level of at least 99.9% of all voice messages delivered on time. –can handle process failures (single, multiple, repeated), without significant impact on throughput. Resilience –performance does not degrade for massive overloading, e.g. over 1000%. Dynamic-adaptability –performance upgrades/degrades proportionally when processes are added/removed.
Programme Comparison 13%147Service 1136%1741Testing 2661%2994Platform 38100%4884Total ModulesPercentageLines of Code Part 150.4%83IDL %21340C %21423Total Classes/ Instances PercentageLines of Code Part Erlang C++
What features of Erlang helped? Automatic memory management Automatic process management Fault-tolerance – using the Mnesia data- base for recovery from failure, exception handling Behaviours – supervisor, generic servers etc. High-level programming – pattern matching, polymorphism, etc.
What now? Implement a component of a real product (Zone Controller Data Mobility), and compare Compare with Java/CORBA, C++/CORBA, SDL.