Your SlideShare is downloading. ×
Using functional programming within an industrial product group: perspectives and perceptions
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Using functional programming within an industrial product group: perspectives and perceptions

1,173
views

Published on

We present a case-study of using OCaml within a large product development project, focussing on both the technical and non- technical issues that arose as a result. We draw comparisons between the …

We present a case-study of using OCaml within a large product development project, focussing on both the technical and non- technical issues that arose as a result. We draw comparisons between the OCaml team and the other teams that worked on the project, providing comparative data on hiring patterns and cross-team code contribution.

Published in: Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,173
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Using Functional Programming within an Industrial Product Group: Perspectives and Perceptions
    presenter
  • 2. XenServer: an operating system virtualisation platform
    Why is XenServer interesting?
    It is widely distributed
    50k companies; largest customer >20k physical machines
    It is low-level mission-critical infrastructure
    Hypervisor, kernel, management stack, Windows GUI
    It is written in C,OCaml, Python, C#
    Around 11 full-timeOCamldevs; 130kLOC ofOCaml
    About Us
  • 3. Why did we chooseOCaml?
    Several of us used it before and trusted it.
    We believed it would make us more productive.
    As a startup, there was a culture of risk-taking and innovation.
    … and no-one was able to stop us 
  • 4. A mix of programming styles
    Imperative
    Most I/O, Xen and OS syscalls. “A type-safe C”
    Functional
    Bin packing algorithms for failure planning
    Combinators for domain communication
    wait_for (
    any_of
    [ ‘OK, value_to_appear “/path1”;
    ‘Failed, value_to_become "/path" v
    ] )
    Meta Programming
    Database accessors, RPC stubs, API specification
  • 5. What (some) people said
    “the tool-chain is not mature enough”
    “we will not be able to hireOCamlpeople”
    “no-one will buy the company”
    “people in other teams will not be able to contribute any code”
  • 6. “the tool-chain is not mature enough”
    In 4.5 years of heavy use, we found one (obscure) compiler bug
    It was already fixed in CVS when we reported it
    The binaries are subjected to 2,000 machine-hours of testing every night, with regular week-long soak stress tests
    Last seg-fault was over 3 years ago
    There was a missing “%s” in our custom C bindings
    … and an extra “%s” in some Python code
  • 7. “we will not be able to hireOCamlpeople”
    FromOctober 2006 –April 2010, 12OCaml engineers hired (25% of engineering hires, as planned)
    Only 2 had previousOCamlexperience
    Training time was dominated by learning the product, not the language
    Advertising on caml-list, haskell-café got great candidates
  • 8. “no-one will buy the company”
    Argument: in the due-diligence phase, a suitor will detect the presence of a “non-standard” “research” langage likeOCamland conclude we’re not serious
    Reality: on 22nd October 2007, Citrix paid $500M for XenSource after a comprehensive code review.
  • 9. “people in other teams will not be able to contribute any code”
  • 10. “… what about contribution size”
  • 11. Concerns
    Foreign Function Interface
    Requires much knowledge of the GC, and bugs can be subtle. But we like how fast it is!
    Profiling support
    More of a generic UNIX issue, but interactions of threads, process and hypercalls can be “interesting”.
  • 12. Conclusion
    We’re very happy withOCaml !
    Great tools
    Nice language
    Excellent people
    Our code is open-source (LGPL), check it out: http://www.xen.org/products/cloudxen.html
    Questions?

×