The Migration from Erlang to OTP A case study of a heavy duty TCP/IP client/server application Francesco Cesarini [email_a...
The Product... <ul><li>IDEALX runs in-house customer projects </li></ul><ul><ul><li>Based on Open Source components </li><...
The Product...
Building the Prototype. <ul><li>A team of 4 software engineers </li></ul><ul><li>Erlang Knowledge </li></ul><ul><ul><li>Al...
Building the Prototype. <ul><li>Decide to take in external help </li></ul><ul><ul><li>Code & Architecture review </li></ul...
Building the Prototype. multiplexing multiplexing de-multiplexing de-multiplexing state/error handling users sockets liste...
How could they miss OTP? How do I apply object oriented  design in Erlang? Mickaël Rémond Joe Armstrong You do not need to...
How could they miss OTP? <ul><li>The name Open Telecom Platform </li></ul><ul><ul><li>They were developing XML based produ...
To the Rescue! <ul><li>OTP training: 2.5 days </li></ul><ul><ul><li>Only behaviours were covered </li></ul></ul><ul><li>Co...
To the Rescue! multiplexing multiplexing de-multiplexing state/error handling users sockets listener de-multiplexing socke...
To the Rescue! <ul><li>25 days work from prototype to product </li></ul><ul><ul><li>Included training, redesign, rewriting...
The Moral of the Story. <ul><li>OTP design principles and behaviours fill a gap that existed in pure Erlang </li></ul><ul>...
The Moral of the Story. <ul><li>We who work with OTP should promote it better </li></ul><ul><ul><li>Advantages </li></ul><...
Upcoming SlideShare
Loading in...5
×

The Migration From Erlang To Otp A Case Study Of A Heavy Duty Tcpip Clientserver Application

2,023

Published on

Published in: Technology, News & Politics
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,023
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
66
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

The Migration From Erlang To Otp A Case Study Of A Heavy Duty Tcpip Clientserver Application

  1. 1. The Migration from Erlang to OTP A case study of a heavy duty TCP/IP client/server application Francesco Cesarini [email_address] Mickaël Rémond [email_address]
  2. 2. The Product... <ul><li>IDEALX runs in-house customer projects </li></ul><ul><ul><li>Based on Open Source components </li></ul></ul><ul><ul><li>develop what is not available </li></ul></ul><ul><ul><li>release reusable applications on their site </li></ul></ul><ul><li>Develop an Instant Messaging Server </li></ul><ul><ul><li>For one of the largest French ISPs </li></ul></ul><ul><ul><li>Handle 10,000 simultaneous users </li></ul></ul><ul><ul><li>Based on the Jabber protocol </li></ul></ul><ul><ul><li>Scaleable during runtime </li></ul></ul><ul><ul><li>Allow flexible addition of services </li></ul></ul>
  3. 3. The Product...
  4. 4. Building the Prototype. <ul><li>A team of 4 software engineers </li></ul><ul><li>Erlang Knowledge </li></ul><ul><ul><li>All self-taught </li></ul></ul><ul><ul><li>Had been active in in-house Erlang projects </li></ul></ul><ul><ul><li>Used the erlang-questions mailing list </li></ul></ul><ul><li>They had a working prototype in 5 weeks </li></ul><ul><ul><li>Handled 900 simultaneous users </li></ul></ul><ul><ul><li>Had performance and reliability problems </li></ul></ul><ul><li>Delivered to an impressed customer </li></ul>
  5. 5. Building the Prototype. <ul><li>Decide to take in external help </li></ul><ul><ul><li>Code & Architecture review </li></ul></ul><ul><ul><li>Improve performance </li></ul></ul><ul><ul><li>Explain OTP behaviours </li></ul></ul><ul><li>The code review showed </li></ul><ul><ul><li>Well written code </li></ul></ul><ul><ul><li>Little use of higher order functions </li></ul></ul><ul><ul><li>Lots of unnecessary concurrency </li></ul></ul><ul><ul><li>NO OTP behaviours or design principles!! </li></ul></ul>
  6. 6. Building the Prototype. multiplexing multiplexing de-multiplexing de-multiplexing state/error handling users sockets listener sockets
  7. 7. How could they miss OTP? How do I apply object oriented design in Erlang? Mickaël Rémond Joe Armstrong You do not need to apply OO design as Erlang has something more powerful called behaviours!
  8. 8. How could they miss OTP? <ul><li>The name Open Telecom Platform </li></ul><ul><ul><li>They were developing XML based products </li></ul></ul><ul><ul><li>They were developing products for ISPs </li></ul></ul><ul><ul><li>They were not developing telecom products </li></ul></ul><ul><li>They did not find the documentation </li></ul><ul><ul><li>Relations between behaviours not evident </li></ul></ul><ul><ul><li>No tutorials </li></ul></ul><ul><li>Found very few OTP examples online </li></ul>
  9. 9. To the Rescue! <ul><li>OTP training: 2.5 days </li></ul><ul><ul><li>Only behaviours were covered </li></ul></ul><ul><li>Code review: 1 day </li></ul><ul><li>New system architecture design: 0.5 days </li></ul><ul><ul><li>No documents necessary </li></ul></ul><ul><li>‘ Code rewrite’ examples: 1 day </li></ul><ul><ul><li>Using higher order functions </li></ul></ul><ul><ul><li>How to remove deeply nested cases </li></ul></ul><ul><ul><li>Bit syntax, etc. </li></ul></ul>
  10. 10. To the Rescue! multiplexing multiplexing de-multiplexing state/error handling users sockets listener de-multiplexing sockets supervisor simple 1-1
  11. 11. To the Rescue! <ul><li>25 days work from prototype to product </li></ul><ul><ul><li>Included training, redesign, rewriting, testing </li></ul></ul><ul><li>Code reduction of 50% </li></ul><ul><li>Free goodies from OTP </li></ul><ul><ul><li>Restart strategies, application control, etc. </li></ul></ul><ul><li>Problems </li></ul><ul><ul><li>Limit of TCP connections per Unix process </li></ul></ul><ul><ul><li>One listen socket for many Erlang nodes </li></ul></ul><ul><ul><li>Windows NT database performance </li></ul></ul>
  12. 12. The Moral of the Story. <ul><li>OTP design principles and behaviours fill a gap that existed in pure Erlang </li></ul><ul><ul><li>Structuring of programs </li></ul></ul><ul><ul><li>Reuse of Code </li></ul></ul><ul><ul><li>Methodology </li></ul></ul><ul><ul><li>Development strategy </li></ul></ul><ul><li>For some one downloading Erlang/OTP off the web, finding/understanding design principles and behaviours is not obvious/easy. </li></ul>
  13. 13. The Moral of the Story. <ul><li>We who work with OTP should promote it better </li></ul><ul><ul><li>Advantages </li></ul></ul><ul><ul><li>The gap it fills </li></ul></ul><ul><ul><li>More and better examples </li></ul></ul><ul><ul><li>Help existing open source projects </li></ul></ul><ul><li>Hopefully, this will result in others not doing the same mistake </li></ul><ul><ul><li>Happy users = Many users </li></ul></ul><ul><ul><li>Many users = Fun user conferences </li></ul></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×