13 Running the system

 

This chapter covers

  • Running the system with the Elixir tools
  • OTP releases
  • Analyzing system behavior

You’ve spent a lot of time building a to-do system, and now it’s time to prepare it for production. There are various ways to start a system, but the basic idea is always the same. You have to compile your code as well as your dependencies. Then you start the BEAM instance and ensure that all compiled artifacts are in the load path. Finally, from within the BEAM instance, you need to start your OTP application together with its dependencies. Once the OTP application is started, you can consider your system to be running.

There are various approaches to achieving this, and in this chapter we’ll focus on two of them. First we’ll look at how you can use Elixir tools, most notably mix, to start the system. Then we’ll discuss OTP releases. Finally, I’ll end the chapter and the book by providing some pointers on how to interact with a running system, so you can detect and analyze faults and errors that inevitably happen at runtime.

13.1 Running a system with Elixir tools

Regardless of the method you use to start the system, some common principles always hold. Running the system amounts to doing the following:

13.1.1 Using the mix and elixir commands

 
 

13.1.2 Running scripts

 

13.1.3 Compiling for production

 
 
 

13.2 OTP releases

 
 
 

13.2.1 Building a release with distillery

 
 
 

13.2.2 Using a release

 
 
 
 

13.2.3 Release contents

 
 

13.3 Analyzing system behavior

 
 

13.3.1 Debugging

 
 
 

13.3.2 Logging

 
 
 

13.3.3 Interacting with the system

 
 
 

13.3.4 Tracing

 
 

Summary

 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest