Laying Grounds for QuizSession Implementation
Explore how to implement a QuizSession module in Elixir using GenServer to isolate state and manage quiz interactions for individual users. Learn to initialize servers, handle user data, and process question selection efficiently. This lesson prepares you to build isolated processes within OTP boundaries for better state management and system reliability.
We'll cover the following...
The quiz session will use the code we implemented in our functional core along with the code that answers and selects questions for a given user. Our core implements the business functions that advance the state of the quiz based on mastery. The quiz session will add the process machinery we’ll need to manage state independently.
Data required by the user
Each of our users will need the following to give the quiz:
-
The state for the quiz ...