Download - Erlang White Label
WhiteLabel ErlangAdventures in the undocumented wilds of inet_dns
Who is this guy?Geoff Cant <[email protected]>Current (xmpp|mailto):[email protected] [email protected] on http://github, irc:freenode/#erlang
What have I been up to?ejabberd
debuggingvirtual hostingdebugging large clustersporting patchesdebugging patches
What have I been up to?Whitelabel ejabberd hosting
Web Frameworks (why Mochiweb)Other libraries (ejango, esmtp, erlydtl)DNS (OTP Undocumented)Tricks and Lessons
A rant in four parts
ErlywebYAWSinetsThe Erlang WebNitrogen
Web Frameworks
Mochiweb.(No logo, ‘cause they’re too busy coding)
Other piecesTemplatingURL RoutingForm validationEmail
TemplatingerlydtlTemplates compile to modulesWell known template syntax (Django-ish)Template
URL RoutingMust work with RESTful URLsMust be reversible - able to generate URLs tooejango.url_routes
Form ValidationGenerate forms and validate form postsCouldn’t find anything available alreadyDeclarative DSL for form specificationejango.form, ejango.form_validator
Sending Emailsmtp_fsmErlware smtpNo attachments?This should be much easier.esmtp
Mail Sending API
Mime Attachment API
DNSNeed to verify ownership of domainNeed to add XMPP SRV recordsinet:gethostbyname...To the githubs!
DNS Undocumentedinet_res:getbyname/2inet_res:nnslookup/5inet_db - cachinginet_dns - packet encoding/decoding, bugs‘dns’ -- the way forward.
Here be Dragons.Sometimes it’s undocumented for a reasonThe TXT RR is subtle.I reimplemented the same bug.
My DNS decoderTXT RRs are <<Len:8, Data:Len/binary>>* Binary pattern matching rocks
Whitelabel TricksCheck SOA to test if domain existsBypass DNS caching
YSlow OptimisationsInitially got a D on my YSlow reportDecided to gzip and minify content, move js blocks aroundejango.static:compress_docroot/1, ejango.static:serve_compressed/3
Minifying...
LessonsHierarchal modules are a world of hurt.Metaprogramming in Erlang is still too hard.Never trust ADSL routers....
Use Github.
A small plea for helpI have way too many github projectsAdopt my code?Interested in collaborating?
Fin.