How do you design and implement a custom, complex web-based email system that must be robust, scalable across dozens of machines, and support two million users at the start? The small size of your entire staff is a handicap. Everything must be tested to the rigorous standards of telecom giant in Asia which overlooks very, very few details.
I'll describe one way to do it, using Erlang at its heart for:
* Communicating with the Web browser client
* Speaking SMTP, POP, and IMAP to the rest of the email world
* Interfacing with a proprietary, external text index/search and user authentication services
* Gluing C++ components for speed-critical and legacy feature support
* Using a dynamically scalable key-value DB to store everything.
All email, user profile, and vCard data is stored in a
distributed key-value database that supports dynamic online resizing as the service grows while keeping email stored safely and consistently.
We make heavy use of protocol contracts (using UBF) to enforce over-the-wire sanity of all intra-system communication and with the browser. It's tested extensively with EUnit, QuickCheck, and Python scripts. I'll give details of what has worked well and what we should have done differently through each stage of design, implementation,
testing, and deployment.
Elixir macros give programmers the power to write code that writes code. This power eliminates boilerplate, allows Domain Specific Language abstractions, and provides the freedom to extend the language. Leveraging the fact that it can be represented by its own data structures, Elixir can interrogate its own code to peer in for analysis or to add additional functionality. Used appropriately, macros offer effective module composition and code generation techniques, while more liberal use can serve as an outlet for novel insights through experimentation.
Starting from the basics of macros, we’ll explore these ideas from an introductory level through advanced topics and real-world use-cases. Along the way, we’ll see how Elixir uses meta-programming to generate parts of its own standard library. We’ll also examine how macros can be used to save time and share functionality in a fun and productive way.
This talk will introduce developers to Elixir and the underlying Erlang VM and show how they introduce a completely new vocabulary which shapes how developers design and build concurrent, distributed and fault-tolerant applications. The end of the talk will focus on Elixir and include some live coding.
[Expectations: Introduce Elixir, its ecosystem and design goals within the Erlang Virtual Machine]
Phoenix is an Elixir web framework for building productive, reliable applications with the performance to take on the modern computing world. Together, we’ll review what makes Phoenix great and how it uses Elixir to optimize code for performance – without sacrificing programmer productivity. Along the way, we’ll see neat features like live-reload and generators and how Phoenix’s realtime layer takes on the modern web.