Implement new Concept Exercise: genserver
#559
Labels
concept-exercise
Adding or improving a concept exercise
help wanted 🤝
v3
Related to Exercism v3
x:action/create
Work on something from scratch
x:knowledge/intermediate
Quite a bit of Exercism knowledge required
x:module/concept-exercise
Work on Concept Exercises
x:size/large
Large amount of work
x:type/content
Work on content (e.g. exercises, concepts)
Getting started
Please please please read the docs before starting. Posting PRs without reading these docs will be a lot more frustrating for you during the review cycle, and exhaust Exercism's maintainers' time. So, before diving into the implementation, please read up on the following documents:
Goal
The student should understand the GenServer behaviour and know how to use it, writing a public module API and implementing the behaviour's callbacks.
Learning objectives
handle_call
,handle_cast
, andhandle_info
.handle_info
to avoid an ever-growing process inbox.GenServer.call
themselves.Agent
is good enough, if there is no need to keep state)Out of scope
:DOWN
messagesConcepts
genserver
Prerequisites
atoms
tuples
processes
pid
agent
(it will be easier to understand after having learned about agents)use
(as inuse GenServer
)behaviours
Practice exercises
Those practice exercises should have
genserver
in their prerequisites:bank-account
react
Resources to refer to
Story
It might be a good idea to either duplicate or come up with a continuation of the stories used for the
processes
exercise (take-a-number machine) or theagent
exercise (community garden). Ideally the story would force the student to use all three types of callbacks.Analyzer
The analyzer should check that indeed a module using the GenServer behaviour was implemented, and not a generic receive loop or an Agent.
Help
If you have any questions while implementing the exercise, please post the questions as comments in this issue.
The text was updated successfully, but these errors were encountered: