O'Reilly logo

Elixir Cookbook by Paulo A Pereira

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

Chapter 5. Processes and Nodes

This chapter will cover the following recipes:

  • Sending messages between processes
  • Making code run on all available CPUs
  • Using tasks to perform multiple concurrent computations
  • Creating a stateful server process (messages with counters)
  • Using agents as an abstraction around states
  • Using an ETS table to share the state
  • Creating named nodes
  • Connecting nodes
  • Executing code in a different node

Introduction

In this chapter, our recipes will make use of nodes and processes. We will see how message passing takes a key role in making it possible to distribute our applications and how seamlessly we can interchange information between running processes in the same virtual machine or between processes in different virtual machines that ...

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

Start Free Trial

No credit card required