SlideShare a Scribd company logo
WhiteLabel Erlang
Adventures in the undocumented wilds of inet_dns
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
Erlang White Label
Erlang White Label
What have I been up to?
 ejabberd
   debugging
   virtual hosting
   debugging large clusters
   porting patches
   debugging patches
What have I been up to?
     Whitelabel ejabberd hosting
A rant in four parts
 Web Frameworks (why Mochiweb)
 Other libraries (ejango, esmtp,
 erlydtl)
 DNS (OTP Undocumented)
 Tricks and Lessons
Web Frameworks
 Erlyweb
 YAWS
 inets
 The Erlang Web
 Nitrogen
Mochiweb.
(No logo, ‘cause they’re too busy coding)
Other pieces
 Templating
 URL Routing
 Form validation
 Email
Templating
erlydtl
Templates
compile to
modules
Well known
template syntax
(Django-ish)
Template
URL Routing
 Must work with RESTful URLs
 Must be reversible - able to generate
 URLs too
 ejango.url_routes
Erlang White Label
Form Validation
 Generate forms and validate form
 posts
 Couldn’t find anything available
 already
 Declarative DSL for form specification
 ejango.form, ejango.form_validator
Erlang White Label
Sending Email
 smtp_fsm
 Erlware smtp
 No attachments?
 This should be much easier.
 esmtp
Mail Sending API
Mime Attachment API
DNS
 Need to verify ownership of domain
 Need to add XMPP SRV records
 inet:gethostbyname
 ...
 To the githubs!
Erlang White Label
DNS Undocumented
inet_res:getbyname/2
inet_res:nnslookup/5
inet_db - caching
inet_dns - packet
encoding/decoding,
bugs
‘dns’ -- the way forward.
Here be Dragons.
Sometimes it’s
undocumented
for a reason
The TXT RR is
subtle.
I reimplemented
the same bug.
My DNS decoder
 TXT RRs are
 <<Len:8,
   Data:Len/binary>>*
 Binary pattern matching
 rocks
Whitelabel Tricks
 Check SOA to test if domain exists
 Bypass DNS caching
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
Minifying...
Lessons
 Hierarchal modules are a world of
 hurt.
 Metaprogramming in Erlang is still
 too hard.
 Never trust ADSL routers.
 ...
Use Github.
A small plea for help
 I have way too many github projects
 Adopt my code?
 Interested in collaborating?
Fin.

More Related Content

PDF
NDC London 2014: Erlang Patterns Matching Business Needs
PDF
NDC London 2014: Thinking Like an Erlanger
PPT
Coldfusion
 
PPTX
Coding standard and coding guideline
PPSX
Coding standard
PPT
Clean Code summary
PPT
Packer Genetics: The selfish code
KEY
Re-imaginging CakePHP
NDC London 2014: Erlang Patterns Matching Business Needs
NDC London 2014: Thinking Like an Erlanger
Coldfusion
 
Coding standard and coding guideline
Coding standard
Clean Code summary
Packer Genetics: The selfish code
Re-imaginging CakePHP

What's hot (19)

PDF
ShaREing Is Caring
PDF
PHP 5.4 - Begin your love affair with traits
ODP
2009 Eclipse Con
PPTX
News In The Net40
PDF
Dlsecyx pgroammr (Dyslexic Programmer - cool stuff for scaling)
PDF
Lennart Regebro What Zope Did Wrong (And What To Do Instead)
PDF
Erlang Developments: The Good, The Bad and The Ugly
PDF
Measuring Your Code
PPTX
Programming Paradigm & Languages
PDF
Project Automation
PDF
How to really obfuscate your pdf malware
PPT
LocalizingStyleSheetsForHTMLOutputs
PPS
Clean Code and Common Engineering Practices
PDF
NLP using JavaScript Natural Library
PDF
Introduction to Writing Readable and Maintainable Perl (YAPC::EU 2011 Version)
PPTX
Refactoring, 2nd Edition
PPTX
Static Code Analysis
PPT
Bottom-Line Web Services
ODP
Python for Data Logistics
ShaREing Is Caring
PHP 5.4 - Begin your love affair with traits
2009 Eclipse Con
News In The Net40
Dlsecyx pgroammr (Dyslexic Programmer - cool stuff for scaling)
Lennart Regebro What Zope Did Wrong (And What To Do Instead)
Erlang Developments: The Good, The Bad and The Ugly
Measuring Your Code
Programming Paradigm & Languages
Project Automation
How to really obfuscate your pdf malware
LocalizingStyleSheetsForHTMLOutputs
Clean Code and Common Engineering Practices
NLP using JavaScript Natural Library
Introduction to Writing Readable and Maintainable Perl (YAPC::EU 2011 Version)
Refactoring, 2nd Edition
Static Code Analysis
Bottom-Line Web Services
Python for Data Logistics
Ad

Viewers also liked (20)

PDF
2015: L'année d'Elixir, Code, écosystème et communauté
PDF
Nanomsg - Scalable Networking Library
PDF
Event Driven Architecture Concepts in Web Technologies - Part 2
ZIP
OneTeam Media Server
ZIP
WaveOne server and client by ProcessOne
ZIP
ProcessOne Push Platform: XMPP-based Push Solutions
PDF
Multi Chat
PDF
Archipel Introduction - ejabberd SF Meetup
ZIP
Real time Web Application with XMPP and Wave
PDF
Create Your Own Language
PDF
Real life XMPP Instant Messaging
PDF
XMPP Academy #1
PDF
Nodejs Applications in Production
PDF
Multitasking in iOS 7
PDF
Event Driven Architecture Concepts in Web Technologies - Part 1
PDF
Practical Look at Erlang
PDF
A vision for ejabberd - ejabberd SF Meetup
PDF
Phoenix Presence: Le service temps réel de Phoenix - Paris.ex #8
KEY
The Real Time Web with XMPP
PDF
What is XMPP Protocol
2015: L'année d'Elixir, Code, écosystème et communauté
Nanomsg - Scalable Networking Library
Event Driven Architecture Concepts in Web Technologies - Part 2
OneTeam Media Server
WaveOne server and client by ProcessOne
ProcessOne Push Platform: XMPP-based Push Solutions
Multi Chat
Archipel Introduction - ejabberd SF Meetup
Real time Web Application with XMPP and Wave
Create Your Own Language
Real life XMPP Instant Messaging
XMPP Academy #1
Nodejs Applications in Production
Multitasking in iOS 7
Event Driven Architecture Concepts in Web Technologies - Part 1
Practical Look at Erlang
A vision for ejabberd - ejabberd SF Meetup
Phoenix Presence: Le service temps réel de Phoenix - Paris.ex #8
The Real Time Web with XMPP
What is XMPP Protocol
Ad

Similar to Erlang White Label (20)

KEY
SD, a P2P bug tracking system
KEY
Site Performance - From Pinto to Ferrari
PPT
Dmitry Lebedev: Agile Testing Using Agile Tools
PDF
Volker Fröhlich - How to Debug Common Agent Issues
PDF
Killing the Angle Bracket
PDF
Code quality; patch quality
 
PDF
Code quality. Patch quality
PDF
Nodejs - A quick tour (v6)
PDF
Jsonsaga 100605143125-phpapp02
PDF
Tigahost
PPTX
Web Scraping Basics
PDF
Making it fast: Zotonic & Performance
PDF
Flickr Architecture Presentation
ODP
ActiveRecord is good enough
PDF
Elk stack @inbot
PPTX
Test driven development for infrastructure as-a-code, the future trend_Gianfr...
PDF
Lessons Learnt in 2009
ODP
Php Site Optimization
PDF
Microblogging via XMPP
ODP
Caching and tuning fun for high scalability
SD, a P2P bug tracking system
Site Performance - From Pinto to Ferrari
Dmitry Lebedev: Agile Testing Using Agile Tools
Volker Fröhlich - How to Debug Common Agent Issues
Killing the Angle Bracket
Code quality; patch quality
 
Code quality. Patch quality
Nodejs - A quick tour (v6)
Jsonsaga 100605143125-phpapp02
Tigahost
Web Scraping Basics
Making it fast: Zotonic & Performance
Flickr Architecture Presentation
ActiveRecord is good enough
Elk stack @inbot
Test driven development for infrastructure as-a-code, the future trend_Gianfr...
Lessons Learnt in 2009
Php Site Optimization
Microblogging via XMPP
Caching and tuning fun for high scalability

More from Mickaël Rémond (11)

PDF
Go for Real Time Streaming Architectures - DotGo 2017
PDF
Fighting XMPP abuse and spam with ejabberd - ejabberd Workshop #1
PDF
Managing ejabberd Platforms with Docker - ejabberd Workshop #1
PDF
Messaging temps réel avec Go
PDF
Building Scalable Systems: What you can learn from Erlang - DotScale 2016
PPTX
Property-based testing of XMPP: generate your tests automatically - ejabberd ...
PDF
IoT Studio #1: Protocols introduction and connected jukebox
PDF
Deep Dive Into ejabberd Pubsub Implementation
PDF
XMPP Academy #3
PPTX
XMPP Academy #2
ZIP
OneTeam Media Server
Go for Real Time Streaming Architectures - DotGo 2017
Fighting XMPP abuse and spam with ejabberd - ejabberd Workshop #1
Managing ejabberd Platforms with Docker - ejabberd Workshop #1
Messaging temps réel avec Go
Building Scalable Systems: What you can learn from Erlang - DotScale 2016
Property-based testing of XMPP: generate your tests automatically - ejabberd ...
IoT Studio #1: Protocols introduction and connected jukebox
Deep Dive Into ejabberd Pubsub Implementation
XMPP Academy #3
XMPP Academy #2
OneTeam Media Server

Recently uploaded (20)

PPTX
1. Introduction to Computer Programming.pptx
PPTX
cloud_computing_Infrastucture_as_cloud_p
PPT
What is a Computer? Input Devices /output devices
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PPTX
Tartificialntelligence_presentation.pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
WOOl fibre morphology and structure.pdf for textiles
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Getting Started with Data Integration: FME Form 101
PDF
STKI Israel Market Study 2025 version august
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Hybrid model detection and classification of lung cancer
PDF
Web App vs Mobile App What Should You Build First.pdf
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
1. Introduction to Computer Programming.pptx
cloud_computing_Infrastucture_as_cloud_p
What is a Computer? Input Devices /output devices
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Tartificialntelligence_presentation.pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
WOOl fibre morphology and structure.pdf for textiles
Programs and apps: productivity, graphics, security and other tools
Getting Started with Data Integration: FME Form 101
STKI Israel Market Study 2025 version august
Group 1 Presentation -Planning and Decision Making .pptx
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Hybrid model detection and classification of lung cancer
Web App vs Mobile App What Should You Build First.pdf
OMC Textile Division Presentation 2021.pptx
1 - Historical Antecedents, Social Consideration.pdf
DP Operators-handbook-extract for the Mautical Institute
NewMind AI Weekly Chronicles - August'25-Week II
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...

Erlang White Label