390 likes | 527 Views
”Life is too short for imperative programming”. John Hughes. Software Crisis, 1968—today. Software project outcomes. In Large Companies. Technology adoption life cycle. Technology adoption life cycle. Technology adoption life cycle. The Erlang Story. 1986—Erlang emerges at Ericsson
E N D
”Life is too short for imperative programming” John Hughes
Software Crisis, 1968—today • Software project outcomes
The Erlang Story • 1986—Erlang emerges at Ericsson • Functional language • Extra support for concurrency & fault tolerance • Early 1990s—small products • 1996 • Open Telecoms Platform (higher-order functions for robust telecom systems) • AXD 301 project starts
The AXD 301 • ATM switch (telephone backbone) • Born out of a failed project! • 1,5 MLOC Erlang • Seven nines reliability • 4-10x better productivity, quality
Erlang Story II • 1998—Erlang banned for new projects • 1998—Open source Erlang • 1998—Bluetail • Jane Walerud VD • Mail robustifier, Web prioritizer
SSL Accelerator • Alteon WebSystems' SSL Accelerator offers phenomenal performance, management and scalability. • Network Computing
Kreditor Order 100:- invoice Order details Kreditor 100:- 97:-
Founded May 2006 • Selling… QuickCheck! • Extra feature: simplifies failing tests
Session Border Gateway: A Firewall for IP telephony Monitors signalling traffic; opens and closes pinholes 2x1G Ethernet Linux ”blade” processor Media Gateway Controller Opens media pin-holes for calls in progress Media Proxy 2x10G Ethernet Hardware for packet forwarding
Session Border Gateway: A Firewall for IP telephony Media Gateway Controller InterWork Description defines a subset ITU standard protocol H.248 (Megaco) Media Proxy 150KLOC Erlang
Session Border Gateway: A Firewall for IP telephony QuickCheck Media Proxy
Megaco Commands Context Context
Megaco Commands Context Context Context Termination Add
Megaco Commands Context Context Add Context Termination Termination
Megaco Commands Context Context Context Termination Termination Modify Stream Stream
Megaco Commands Context Context Subtract Context Termination Termination Stream Stream
Megaco Commands Context Context Context Termination Subtract Stream Stream
Megaco Commands Context Context
Command Sequences • Normal sequence: We wanted to test other sequences that, according to the IWD, should work. Add Modify Add Subtract Modify Subtract
Add/Modify Error • Modify assumes there are already two terminations in the context • Same bug found in virtually every run! • New ”bug precondition” needed for Modify Add Modify
Add/Subtract Error • There one day, gone the next… • This bug had just been found and fixed by the development team Add Subtract
Add/Add/Modify Error • If the terminations have different numbers of streams • Same underlying problem: Modify assumes each stream has two ends… Add Add Modify
Add/Add/Sub/Add… Error • Extracted from a test case 160 commands long • Caused by corrupt data-structures after the first Subtract Add Add Add Subtract Subtract Add Subtract
Derivatives trading in New York Option to buy ● for $100 anytime In 2007 10 Microsoft shares Option to sell ● for $10 in Nov 2006
How do they do it? C++ plugins
Simon Peyton-Jones: Financial Contracts in Haskell • The option to acquire 10 Microsoft shares, for $100, anytime between t1 and t2 years from now anytime :: Contract -> Contract -- Acquire the underlying contract at -- any time before it expires (but -- you must acquire it) anytime: Choose when golden_handcuff = anytime shares shares = zero `or` (scaleK -100 (one Dollar) `and` scaleK 10 (one MSShare)) MS shares are a “currency” or: Choose whether
New Approach Haskell contract models C++ plugins
Functional programming on Wall Street • Proprietary trading • 60 people • OCaml primary development language
The Cat Among the Pigeons • Two cores, each hyperthreaded