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 created a new child app under our umbrella.

  • We built a counter that demonstrates how some OTP behaviours 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.

  • You implemented an ETS backed cache, with GenServer powered cache expiration.

  • We implemented an information system abstract frontend with concrete backends.

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

In the next chapter, we’ll look at how to test your applications. You’ll see how to test channels and OTP, and also how our umbrella project will help us manage all of it. Don’t stop now—you’re almost done!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.142.85