O'Reilly logo

Elixir in Action by Saša Jurić

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 10. Sharing state

This chapter covers

  • Overcoming single-process bottlenecks
  • Using ETS tables

From chapter 5 on, we’ve relied on processes to maintain state. Managing a state is one of the most important reasons to reach for processes. But when this state must be used by many processes, then the single server process (the one that manages the state) may become a bottleneck. Whenever a single process must serve many clients, those clients effectively become serialized while accessing that single process. This happens because a process can handle only one client at a time. Such behavior can have some negative consequences on the system performance and scalability. To resolve this situation, we have a facility called Erlang Term Storage ...

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