Wrapping Up

In this chapter dedicated to OTP services, we first took our time so you could build a solid understanding of how OTP uses concurrency and message passing to safely encapsulate state without implicit state, or instance or global variables. Then, we built an information system for our annotations. Along the way:

  • We built a counter that demonstrates how some OTP behaviors work.

  • You looked at several OTP supervision and restart strategies.

  • You saw examples of a full OTP service as GenServer.

  • You learned how tasks wrap behavior and agents encapsulate state.

  • We implemented an information system abstract front end with concrete backends.

  • You learned to fetch WolframAlpha results from an HTTP service and share them with our channels.

Next, ...

Get Programming Phoenix now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.