Links:
José Valim - How I Start (Elixir)
A nice introduction to Elixir covering Agents, Structs, and distribution.
Lessons about the Elixir programming language, inspired by Twitter’s Scala School.
Bringing you the News & Interviews from around the Elixir Community.
Elixir's Getting Started Guide
The official guide for getting started with Elixir
The official Elixir documentation.
The package manager for the Erlang ecosystem.
Exercise
For this week's exercise, we're going to build a small <q>microservice</q> that can be sent strings and will reply with those strings, upcased.
- Create a new process in the same way that we did in the PingPong episode.
- Send the process messages like
{"some string", self}
- The process should pattern match out the string and the process id from the 2-tuple in the message.
- It should then call
String.upcase
on the provided string, responding with{:ok, "SOME STRING"}
- Write a function that will send the message to the process and then immediately wait to receive the response back.
网友评论