Your SlideShare is downloading. ×
Erlang White Label
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

Erlang White Label


Published on

Geoff Cant Whitelabel Erlang covers the trials, tribulations and technologies used in building a whitelabel ejabberd hosting service. …

Geoff Cant Whitelabel Erlang covers the trials, tribulations and technologies used in building a whitelabel ejabberd hosting service.

The talk explains the rationale behind the choices of web server, templating system, email module, page optimizers and other web framework components. The talk also covers the documented and undocumented DNS query and caching modules in OTP and introduces 'dns' - a convenient new API for using them. Finally, the talk describes some tips and tricks useful for whitelabel hosting solutions that require customer DNS updates.

Published in: Technology, News & Politics

  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. WhiteLabel Erlang Adventures in the undocumented wilds of inet_dns
  • 2. Who is this guy? Geoff Cant <> Current (xmpp|mailto): Previously archaelus on http:// github, irc:freenode/ #erlang
  • 3. What have I been up to? ejabberd debugging virtual hosting debugging large clusters porting patches debugging patches
  • 4. What have I been up to? Whitelabel ejabberd hosting
  • 5. A rant in four parts Web Frameworks (why Mochiweb) Other libraries (ejango, esmtp, erlydtl) DNS (OTP Undocumented) Tricks and Lessons
  • 6. Web Frameworks Erlyweb YAWS inets The Erlang Web Nitrogen
  • 7. Mochiweb. (No logo, ‘cause they’re too busy coding)
  • 8. Other pieces Templating URL Routing Form validation Email
  • 9. Templating erlydtl Templates compile to modules Well known template syntax (Django-ish) Template
  • 10. URL Routing Must work with RESTful URLs Must be reversible - able to generate URLs too ejango.url_routes
  • 11. Form Validation Generate forms and validate form posts Couldn’t find anything available already Declarative DSL for form specification ejango.form, ejango.form_validator
  • 12. Sending Email smtp_fsm Erlware smtp No attachments? This should be much easier. esmtp
  • 13. Mail Sending API
  • 14. Mime Attachment API
  • 15. DNS Need to verify ownership of domain Need to add XMPP SRV records inet:gethostbyname ... To the githubs!
  • 16. DNS Undocumented inet_res:getbyname/2 inet_res:nnslookup/5 inet_db - caching inet_dns - packet encoding/decoding, bugs ‘dns’ -- the way forward.
  • 17. Here be Dragons. Sometimes it’s undocumented for a reason The TXT RR is subtle. I reimplemented the same bug.
  • 18. My DNS decoder TXT RRs are <<Len:8, Data:Len/binary>>* Binary pattern matching rocks
  • 19. Whitelabel Tricks Check SOA to test if domain exists Bypass DNS caching
  • 20. YSlow Optimisations Initially got a D on my YSlow report Decided to gzip and minify content, move js blocks around ejango.static:compress_docroot/1, ejango.static:serve_compressed/3
  • 21. Minifying...
  • 22. Lessons Hierarchal modules are a world of hurt. Metaprogramming in Erlang is still too hard. Never trust ADSL routers. ...
  • 23. Use Github.
  • 24. A small plea for help I have way too many github projects Adopt my code? Interested in collaborating?
  • 25. Fin.