Erlang White Label
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Erlang White Label

  • 3,135 views
Uploaded 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.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
3,135
On Slideshare
3,049
From Embeds
86
Number of Embeds
5

Actions

Shares
Downloads
39
Comments
0
Likes
3

Embeds 86

http://www.process-one.net 57
http://blog.boxcar.io 16
http://www.linkedin.com 6
http://www.slideshare.net 5
https://www.linkedin.com 2

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. WhiteLabel Erlang Adventures in the undocumented wilds of inet_dns
  • 2. Who is this guy? Geoff Cant <nem@erlang.geek.nz> Current (xmpp|mailto): gcant@process-one.net Previously geoff@catalyst.net.nz 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.