O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adopting Elixir

Book Description

Adoption is more than programming. Elixir is an exciting new language, but to successfully get your application from start to finish, you're going to need to know more than just the language. The case studies and strategies in this book will get you there. Learn the best practices for the whole life of your application, from design and team-building, to managing stakeholders, to deployment and monitoring. Go beyond the syntax and the tools to learn the techniques you need to develop your Elixir application from concept to production.

Learn real-life strategies from the people who built Elixir and use it successfully at scale. See how Ben Marx and Bleacher Report maintain one of the highest-traffic Elixir applications by selling the concept to management and delivering on that promise. Find out how Bruce Tate and icanmakeitbetter hire and train Elixir engineers, and the techniques they've employed to design and ensure code consistency since Elixir's early days. Explore customer challenges in deploying and monitoring distributed applications with Elixir creator Jose Valim and Plataformatec.

Make a business case and build a team before you finish your first prototype. Once you're in development, form strategies for organizing your code and learning the constraints of the runtime and ecosystem. Convince stakeholders, both business and technical, about the value they can expect. Prepare to make the critical early decisions that will shape your application for years to come. Manage your deployment with all of the knobs and gauges that good DevOps teams demand. Decide between the many options available for deployment, and how to best prepare yourself for the challenges of running a production application.

This book picks up where most Elixir books leave off. It won't teach you to program Elixir, or any of its tools. Instead, it guides you through the broader landscape and shows you a holistic approach to adopting the language.

What You Need:

This book works with any version of Elixir.

Table of Contents

  1.  Acknowledgments
    1. From Ben:
    2. From José:
    3. From Bruce:
  2.  Introduction
    1. Who This Book Is For
    2. About the Authors
    3. How To Read This Book
    4. About the Code
    5. Online Resources
  3. 1. Three Adoption Stories
    1. The Acquisition of icanmakeitbetter
    2. Bleacher Report Improves Performance and Reliability
    3. Plataformatec Supports Early Adopters
    4. Embracing End-To-End Adoption
    5. Wrapping Up
  4. Part I. Concept
    1. 2. Team Building
      1. Training Developers
      2. When Things Go Wrong
      3. Hiring Elixir Developers
      4. Conducting Interviews
      5. Wrapping Up
    2. 3. Ensuring Code Consistency
      1. Coding Standards
      2. Typespecs and Dialyxir
      3. Documentation
      4. Tests and Code Coverage
      5. Putting It All Together: Code Reviews
      6. Wrapping Up
    3. 4. Legacy Systems and Dependencies
      1. Replacing a Legacy Web App
      2. Terraform and API Evolution
      3. Moving Incremental Releases into Production
      4. Umbrella Projects: Between Monoliths and Services
      5. Managing Third-Party Dependencies
      6. Wrapping Up
  5. Part II. Development
    1. 5. Making the Functional Transition
      1. Elixir vs. Mutable Objects
      2. Polymorphism
      3. Agents and Tasks
      4. The Generic Server
      5. Supervisors
      6. Wrapping Up
    2. 6. Distributed Elixir
      1. Remote Message Passing
      2. Persistence Strategies
      3. Finding Processes
      4. Cache and ETS
      5. Message Delivery Guarantees
      6. Homogeneous vs. Heterogeneous Systems
      7. Wrapping Up
    3. 7. Integrating with External Code
      1. Lay of the Land
      2. Strategy 1: Native Implemented Functions (NIFs)
      3. Strategy 2: Communicating via I/O with Ports
      4. Strategy 3: The Erlang Distribution Protocol
      5. Wrapping Up
  6. Part III. Production
    1. 8. Coordinating Deployments
      1. Deploying with Mix
      2. run_erl and heart
      3. Releases
      4. Upgrading Code
      5. Distributed Erlang
      6. Wrapping Up
    2. 9. Metrics and Performance Expectations
      1. Instrumenting Your System
      2. Instrumenting Ecto
      3. Instrumenting Phoenix
      4. Performance Assessment Workflow
      5. Load Testing
      6. Profiling
      7. Benchmarking
      8. Wrapping Up
    3. 10. Making Your App Production Ready
      1. Logs and Errors
      2. SASL Reports
      3. Tracing
      4. Using Other Advanced Tools
      5. Wrapping Up
  7.  Bibliography