Erlang White Label
Post on 24-Jan-2015
Embed Size (px)
DESCRIPTIONGeoff CantWhitelabel 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.
- 1. WhiteLabel Erlang Adventures in the undocumented wilds of inet_dns
2. Who is this guy? Geoff Cant Current (xmpp|mailto): email@example.com Previously firstname.lastname@example.org archaelus on http:// github, irc:freenode/ #erlang 3. What have I been up to?ejabberddebuggingvirtual hostingdebugging large clustersporting patchesdebugging patches 4. What have I been up to?Whitelabel ejabberd hosting 5. A rant in four partsWeb Frameworks (why Mochiweb)Other libraries (ejango, esmtp,erlydtl)DNS (OTP Undocumented)Tricks and Lessons 6. Web FrameworksErlywebYAWSinetsThe Erlang WebNitrogen 7. Mochiweb. (No logo, cause theyre too busy coding) 8. Other piecesTemplatingURL RoutingForm validationEmail 9. Templating erlydtl Templates compile to modules Well known template syntax (Django-ish) Template 10. URL RoutingMust work with RESTful URLsMust be reversible - able to generateURLs tooejango.url_routes 11. Form ValidationGenerate forms and validate formpostsCouldnt find anything availablealreadyDeclarative DSL for form specificationejango.form, ejango.form_validator 12. Sending Emailsmtp_fsmErlware smtpNo attachments?This should be much easier.esmtp 13. Mail Sending API 14. Mime Attachment API 15. DNSNeed to verify ownership of domainNeed to add XMPP SRV recordsinet: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 its undocumented for a reason The TXT RR is subtle. I reimplemented the same bug. 18. My DNS decoderTXT RRs are