Title: Life is too short for imperative programming
1(No Transcript)
2Life is too short for imperative programming
3Software Crisis, 1968today
- Software project outcomes
4In Large Companies
5(No Transcript)
6Technology adoption life cycle
7Technology adoption life cycle
8Technology adoption life cycle
9The Erlang Story
- 1986Erlang emerges at Ericsson
- Functional language
- Extra support for concurrency fault tolerance
- Early 1990ssmall products
- 1996
- Open Telecoms Platform (higher-order functions
for robust telecom systems) - AXD 301 project starts
10The AXD 301
- ATM switch (telephone backbone)
- Born out of a failed project!
- 1,5 MLOC Erlang
- Seven nines reliability
- 4-10x better productivity, quality
11Erlang Story II
- 1998Erlang banned for new projects
- 1998Open source Erlang
- 1998Bluetail
- Jane Walerud VD
- Mail robustifier, Web prioritizer
12SSL Accelerator
- Alteon WebSystems' SSL Accelerator offers
phenomenal performance, management and
scalability. - Network Computing
13Kreditor
Order 100-
invoice
Order details
Kreditor
100-
97-
14- Founded May 2006
- Selling QuickCheck!
- Extra feature simplifies failing tests
15Session 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
16Session 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
17Session Border Gateway A Firewall for IP
telephony
QuickCheck
Media Proxy
18Megaco Commands
Context
Context
19Megaco Commands
Context
Context
Context
Termination
Add
20Megaco Commands
Context
Context
Add
Context
Termination
Termination
21Megaco Commands
Context
Context
Context
Termination
Termination
Modify
Stream
Stream
22Megaco Commands
Context
Context
Subtract
Context
Termination
Termination
Stream
Stream
23Megaco Commands
Context
Context
Context
Termination
Subtract
Stream
Stream
24Megaco Commands
Context
Context
25Command Sequences
We wanted to test other sequences that, according
to the IWD, should work.
Add
Modify
Add
Subtract
Modify
Subtract
26Add/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
27Add/Subtract Error
- There one day, gone the next
- This bug had just been found and fixed by the
development team
Add
Subtract
28Add/Add/Modify Error
- If the terminations have different numbers of
streams - Same underlying problem Modify assumes each
stream has two ends
Add
Add
Modify
29Add/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
30- Derivatives trading in New York
10 Microsoft shares
Option to buy ? for 100 anytime In 2007
Option to sell ? for 10 in Nov 2006
31How do they do it?
C plugins
32Simon 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 -gt 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
33New Approach
Haskell contract models
C plugins
34- Functional programming on Wall Street
- Proprietary trading
- 60 people
- OCaml primary development language
35(No Transcript)
36(No Transcript)
37(No Transcript)
38The Cat Among the Pigeons
39The Cat Among the Pigeons
- Two cores, each hyperthreaded